pub struct MlaDims {
pub n_head: usize,
pub d_nope: usize,
pub d_rope: usize,
pub d_v: usize,
pub kv_rank: usize,
}Expand description
MLA head geometry. GLM-5.2: n_head=64, d_nope=192, d_rope=64, d_v=256, kv_rank=512.
Fields§
§n_head: usize§d_nope: usizeqk nope head dim (P)
d_rope: usizeqk rope head dim (R); latent cache row = kv_rank + d_rope
d_v: usizev head dim (V)
kv_rank: usizekv lora rank (Lkv)
Implementations§
Source§impl MlaDims
impl MlaDims
pub const GLM52: MlaDims
Sourcepub const GLM5_NEXT: MlaDims
pub const GLM5_NEXT: MlaDims
glm5_next (GLM-5.3-Flash) MLA geometry: NoPE — rope_head_dim is 0, so there is no
decoupled rope plane at all and the latent cache row is kv_rank wide (not kv_rank+rope).
qk_head_dim is therefore ALL nope (256), and the softmax scale is 1/sqrt(256) = 1/16 —
numerically the same 1/16 as GLM-5.2 (192+64), reached by a different decomposition.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MlaDims
impl RefUnwindSafe for MlaDims
impl Send for MlaDims
impl Sync for MlaDims
impl Unpin for MlaDims
impl UnsafeUnpin for MlaDims
impl UnwindSafe for MlaDims
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more