Expand description
The double-SSD cache (ssm/k_state/v_state/cum_angle; no conv cache).
§Mamba-3 Inference Caches
During autoregressive (token-by-token) generation, three pieces of state must be preserved between calls:
- SSM hidden state —
hₜ ∈ ℝ^{per_head_dim×state_rank}per head, compressed context. - Previous K state —
Bₜ₋₁per rank[batch, mimo_rank, nheads, state_rank], needed for the β term of the (double-ssd) trapezoidal recurrence. - Previous V state —
xₜ₋₁per head[batch, nheads, per_head_dim], paired with k_state to reconstruct β Bₜ₋₁ ⊗ xₜ₋₁. - Cumulative RoPE angle — the accumulated rotation angle up to position
t, needed to correctly continue data-dependent rotary embeddings.
Note: Mamba-3 has no conv cache (the short 1-dimensional convolution present in Mamba-3 is removed; its role is absorbed by the trapezoidal discretization and the learnable B/C biases).
Structs§
- Mamba3
Double SsdCache - The mutable state carried between decoding steps for a single Mamba-3 layer.
- Mamba3
Double SsdCache Config - Configuration / factory for a single
Mamba3DoubleSsdCache. - Mamba3
Double SsdCache Record - The record type for the module.
- Mamba3
Double SsdCache Record Item - The record item type for the module.
- Mamba3
Double SsdCaches - A collection of per-layer caches for a complete Mamba-3 network.
- Mamba3
Double SsdCaches Config - Configuration / factory for
Mamba3DoubleSsdCaches. - Mamba3
Double SsdCaches Record - The record type for the module.
- Mamba3
Double SsdCaches Record Item - The record item type for the module.