Split content heads
×Partition the content features into 64 heads.
- in
- [B batch, 1 position, 12288 heads × content]
- out
- [B batch, 64 heads, 1 position, 192 content]
Sources
In codeself.q_b_proj(q_resid).view(query_shape).transpose(1, 2)
Direct evidence
Queries are produced from the normalized query latent and split into a non-rotated and a rotated part.
modeling_glm_moe_dsa.py 383–385 ↗ · huggingface/transformers @ c4c4605f9618
Excerpt
q_resid = self.q_a_layernorm(self.q_a_proj(hidden_states))
q_states = self.q_b_proj(q_resid).view(query_shape).transpose(1, 2)
q_pass, q_rot = torch.split(q_states, [self.qk_nope_head_dim, self.qk_rope_head_dim], dim=-1)