Module state

Module state 

Source
Expand description

2026-09-25: Pool-free allocation of a GLM-5.3 KDA layer’s per-sequence state.

The state is the SSM pool’s SsmLayerState, not a GLM type: rollback_ssm_states_dispatch downcasts the state of every LinearAttention layer to that type, and every KDA layer is LinearAttention.

Owner: model-arch (GLM-5.3). Invariants: none beyond the types.

Functions§

alloc_kda_ssm_state
2026-09-25: Allocate a KDA layer’s recurrent and conv state outside the SSM pool, FP32 (h_is_f16: false), zeroed, with no checkpoints or intermediates. The model path uses pool slots instead (Glm5NextLayer::uses_ssm_pool).