Attention weights
×Normalized weights over the allowed key positions for each query.
- shape
- [B batch, 32 q heads, 1 query, 1001 keys]
Sources
In codescores · 187
Contextual evidence
Softmax normalizes the last score axis in float32 and restores the query dtype.
model.py 187 ↗ · meta-llama/llama3 @ a0940f9cf706
Excerpt
scores = F.softmax(scores.float(), dim=-1).type_as(xq)