per_sequence_state_bytes

Function per_sequence_state_bytes 

Source
pub fn per_sequence_state_bytes(
    config: &ModelConfig,
    max_seq_len: usize,
    spec_on: bool,
) -> Result<PerSequenceState>
Expand description

2026-09-25: Per-sequence owned device state for config, at a context of max_seq_len tokens.

Returns zeros for any model_type other than glm5_next. The proposer term needs spec_on and a sparse-attention MTP layer. Errors when the GLM skeleton cannot be built from config.