max_dsa_context

Function max_dsa_context 

Source
pub fn max_dsa_context(cfg: &Glm5NextDsaConfig) -> usize
Expand description

2026-09-25: Rows a sequence’s indexer cache holds: cfg.max_context rounded down to whole pools (dsa_capacity).

Each row costs 2 · index_head_dim BF16 plus 1 B per DSA layer (513 B at index_head_dim 128, 5,643 B over GLM-5.3’s 11 DSA layers), and every rank holds a full copy. Glm5NextTextSkeleton::state_budget charges the same bytes per token.