Merge heads
×Concatenate the heads at each position.
- in
- [B batch, 64 heads, 1 position, 128 value]
- out
- [B batch, 1 position, 8192 heads × value]
Explanation
Heads are concatenated in order: head fills features .
Sources
In codeattn_output.reshape(bsz, q_len, self.num_heads * self.v_head_dim)
Direct evidence
Head outputs are flattened and projected back to the model width.
modeling_deepseek.py 843–848 ↗ · moonshotai/Kimi-K2.6 @ 7eb5002f6aad
Excerpt
attn_output = attn_output.transpose(1, 2).contiguous()
attn_output = attn_output.reshape(bsz, q_len,
self.num_heads * self.v_head_dim)
attn_output = self.o_proj(attn_output)