Merged field
×The head outputs joined along the feature axis.
- shape
- [B batch, 1 position, 4096 d]
Sources
In codeoutput · 189
Contextual evidence
The head output is transposed and reshaped into the full model-width field.
model.py 188–189 ↗ · meta-llama/llama3 @ a0940f9cf706
Excerpt
output = torch.matmul(scores, values) # (bs, n_local_heads, seqlen, head_dim)
output = output.transpose(1, 2).contiguous().view(bsz, seqlen, -1)