pub struct DsaDims {
pub hidden: usize,
pub index_heads: usize,
pub index_head_dim: usize,
pub index_kpool: usize,
pub index_topk: usize,
pub always_select_tail: bool,
pub q_lora_rank: usize,
pub heads: usize,
pub kv_lora_rank: usize,
pub qk_nope_head_dim: usize,
pub qk_rope_head_dim: usize,
pub v_head_dim: usize,
}Expand description
Indexer + MLA geometry, read from the checkpoint config — never defaulted.
Fields§
§index_heads: usizeIndexer heads (index_n_heads), NOT the MLA head count.
index_head_dim: usizeIndexer head dim (index_head_dim), NOT the MLA head dim.
index_kpool: usize§index_topk: usize§always_select_tail: bool§q_lora_rank: usize§heads: usize§kv_lora_rank: usize§qk_nope_head_dim: usize§qk_rope_head_dim: usizeZero on GLM-5.3-Flash. Kept explicit so a nonzero value is a loud change.
v_head_dim: usizeImplementations§
Source§impl DsaDims
impl DsaDims
pub fn qk_head_dim(&self) -> usize
Sourcepub fn select_k(&self, n_pools: usize) -> usize
pub fn select_k(&self, n_pools: usize) -> usize
Pools selected per query: index_topk / index_kpool, capped by how many pools exist.
Sourcepub fn out_width(&self) -> usize
pub fn out_width(&self) -> usize
Width of the emitted index row. The tail adds kpool - 1 slots.
pub fn is_nope(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DsaDims
impl RefUnwindSafe for DsaDims
impl Send for DsaDims
impl Sync for DsaDims
impl Unpin for DsaDims
impl UnwindSafe for DsaDims
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