ReplaySSM: Cache SSM Inputs, Not State

Ze-Wei Liou, Harris Nover, Amey Naik, Andrii Skliar, Igor Shovkun, Ido Shahaf, Tri DaoarXiv 2026

TL;DR

ReplaySSM is a novel state-management strategy for State-Space Models (SSMs) that represents the recurrent state as a periodic checkpoint plus a buffer of recent inputs. By "unrolling" the recurrence, it halves memory traffic during decoding, enables near-instant rollbacks for speculative decoding, and allows for mixed-precision states that prevent quantization errors from accumulating over long sequences.

What Problem Does This Paper Address?

State-Space Models like Mamba-2 and Gated DeltaNet are rising stars in the LLM world because they replace the massive, growing KV cache of Transformers with a fixed-size recurrent state. However, "fixed-size" doesn't mean "free."

The authors identify three major bottlenecks in current SSM decoding:

  1. Low Arithmetic Intensity: Conventional decoding reads and writes the entire state matrix at every single step. For large models, this means moving megabytes of data just to perform a simple rank-1 update, making the process heavily memory-bound.
  2. Expensive Rollbacks: In speculative decoding, a model "guesses" several future tokens and then verifies them. If a guess is wrong, the model must roll back its state. For SSMs, this usually requires storing a full state snapshot for every draft token, which eats up GPU memory and slows down inference.
  3. Quantization Error Propagation: When you quantize an SSM state to save space, the rounding error from one step is fed directly into the next. Over thousands of tokens, these tiny errors compound, eventually degrading the model's accuracy.
Figure 1: ReplaySSM overview. Top: conventional decoding loads and stores the full state at every step. ReplaySSM unrolls the recurrence to separate output computation from checkpoint updates: it caches recent SSM inputs and folds them into the checkpoint periodically, avoiding full-state writes on most steps. Bottom: three challenges of conventional decoding, and how ReplaySSM addresses each. (1) SSM layers can bottleneck hybrid models up to 100K tokens (Nemotron-3-Super-120B- A12B-NVFP4, batch size 256, one B300); ReplaySSM roughly halves their state traffic. (2) State rollback, expensive to support in conventional speculative decoding, becomes a buffer-pointer move. (3) A low-precision checkpoint serves outputs while a high-precision one carries the recurrence, so rounding error no longer re-enters the recurrence.

Methods

The core "aha!" moment of ReplaySSM is realizing that the current state is just a decayed version of an older checkpoint plus a weighted sum of the inputs received since then.

Instead of updating the state eagerly, ReplaySSM:

  • Caches Inputs: It keeps a small buffer of recent SSM inputs (like decay factors and value vectors).
  • Separates Output from Update: On most steps ("non-flush" steps), it computes the output using the last checkpoint and the buffered inputs without ever writing a new state to memory.
  • Periodic Flushes: Only once every $L$ steps (the authors use $L=16$) does it "flush" the buffer, folding the inputs into the checkpoint and writing the new state back to memory.
  • Output-Only Verification: For speculative decoding, it uses a mathematical trick to compute outputs directly from the checkpoint and cached inputs without materializing intermediate state matrices at all.
  • Two-Precision Checkpoints: It maintains a high-precision checkpoint for the "true" recurrence and a low-precision copy for generating outputs. This ensures that rounding errors in the low-precision copy never "poison" the future state of the model.

Datasets

The researchers evaluated ReplaySSM across several hybrid models (combining SSM and Attention layers) including Nemotron-3 and Qwen3.5. They used the following benchmarks:

  • PG-19: Used to measure KL divergence and how quantization error grows over long sequences (up to 128K tokens).
  • MMLU-Pro, GPQA-Diamond, and Math-L5: Used to evaluate downstream task accuracy.
  • GSM8K: Used for speculative decoding prompts.
  • RULER-128K: Used to test performance on very long input contexts.

Key Insights and Ideas

  • Stop Eager Updating: By treating the state as a "checkpoint + delta" rather than a single monolithic block that must be rewritten constantly, you can drastically reduce HBM (High Bandwidth Memory) traffic.
  • Rollback is just a Pointer Move: Because the history is stored in an input buffer, rolling back the state after a failed speculative guess is as simple as moving a pointer back in the buffer.
  • Breaking the Error Loop: The separation of the "read" state (for output) and the "write" state (for recurrence) is a powerful tool for quantization. You can be aggressive with quantizing the output state because it doesn't feed back into the model's long-term memory.

Key Results

  • Standard Decoding Speedup: ReplaySSM achieved a 1.20x to 1.47x end-to-end speedup over a tuned vLLM baseline across various hybrid models at a batch size of 256. Standard decoding speedup over vLLM baseline.

  • Speculative Decoding Throughput: On 120B-class models, it delivered ~1.8x the throughput of vLLM's standard speculative decoding. Speculative serving throughput comparison.

  • Quantization Accuracy: Using separate precisions reduced the output KL divergence of an NVFP4 (4-bit) checkpoint by 13–36x at long generation lengths compared to a shared low-precision checkpoint. This allowed models to maintain high accuracy even with heavily compressed states.

Figure 2: Standard-decoding speedup over tuned conventional vLLM (B = 256, L = 16, FP32 state). Kernel numbers include flush costs.
Figure 3: Speculative serving throughput (L = 16, T = 4, FP32 state, one B300 per model).

Limitations and Future Work

While ReplaySSM eliminates state writes on most steps, it still requires a state read to compute the output. The authors suggest that future work could involve skipping these reads for "heads" in the model that decay very quickly, as their contribution from the old checkpoint becomes negligible. Additionally, while the method works exceptionally well for decoding, its application to the "prefill" phase (initial processing of the prompt) remains an area for further optimization.

Summary updated

BibTeX
@misc{liou2026replayssm,
  author = {Ze-Wei Liou and Harris Nover and Amey Naik and Andrii Skliar and Igor Shovkun and Ido Shahaf and Tri Dao},
  title = {{ReplaySSM: Cache SSM Inputs, Not State}},
  year = {2026},
  eprint = {2610.13778},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.13778},
}
Figure