Expand description
§Mamba-1 Inference Caches
State carried between calls during autoregressive (token-by-token)
generation. During training or prefill the whole sequence is processed
at once by Mamba1::forward; during decoding one token is processed per
call by Mamba1::step. Both modes thread the same two pieces of state:
-
Convolution window — the last
conv_kernelpre-activation inputs to the depthwise Conv1d, kept so each step can apply the causal filter without reprocessing earlier tokens. -
SSM hidden state — the per-channel state matrix that compresses the entire past into a fixed-size representation (independent of how many tokens have been seen).
Mirrors crate::mamba2::cache; Mamba-1 has a single SSD-free recurrence
so the cache holds plain tensors rather than the head-structured state of
Mamba-2.
Structs§
- Mamba1
Cache - The mutable state carried between calls for a single Mamba-1 layer.
- Mamba1
Cache Config - Configuration / factory for a single
Mamba1Cache. - Mamba1
Caches - A collection of per-layer caches for a complete Mamba-1 network.
- Mamba1
Caches Config - Configuration / factory for
Mamba1Caches.