ReplaySSM cuts recurrent-state traffic during language-model decoding
ReplaySSM: Cache SSM Inputs, Not State · arXiv:2610.13778
In plain words
State-space layers in some language models keep a running summary of earlier tokens. Usually, the model updates and writes that whole summary after each new token, even though each update does little work.
ReplaySSM keeps a saved summary and a short list of recent inputs, updating the saved copy only now and then. In tests of four hybrid models at batch size 256, standard decoding took less time per step than with tuned conventional decoding. The result applies to those tested models and conditions.
The research
When a model's state-space layers write a large recurrent state after every token, can those writes be reduced without changing the outputs? The question matters because these state updates can be a major part of decoding latency, even in hybrid models whose attention cost grows with context. The paper tests a different way to represent and update that state.
ReplaySSM stores recent inputs beside a checkpoint, computing outputs between periodic state updates to reduce memory traffic and support rollback.
The paper asks whether state-space layers must write their full running state after every token, even when each update does little work. ReplaySSM stores recent inputs beside a checkpoint and updates it periodically, aiming to reduce those writes while retaining the same outputs.
In four hybrid models at batch size 256, its whole-model decode step was 1.20–1.47 times faster than tuned conventional vLLM decoding. This supports the value of changing state management in those tests; separate experiments also show why keeping low-precision reads out of recurrent updates matters.
These results come from four hybrid models tested on one GPU each without tensor parallelism; the low-precision experiments used emulated quantization. The measurements do not establish the same performance or accuracy elsewhere.
What the evidence shows
- The cost of eager updates
ReplaySSM is a decoding method for state-space layers in hybrid language models. Conventional decoding folds each token's inputs into a recurrent state and writes the full state at every step, despite doing little computation per update.
The paper asks whether this eager state writing is necessary for producing outputs, handling rejected draft tokens, and using lower-precision storage.
- A different state representation
ReplaySSM represents the state with a checkpoint and a bounded buffer of recent inputs. Most steps compute outputs from those pieces without writing a full state; when the buffer fills, its inputs are folded into the checkpoint.
The outputs match conventional decoding up to floating-point differences. This state representation also lets the method commit an accepted prefix by moving a buffer pointer after speculative verification.
- Evidence on standard decoding
The authors first establish why reducing state traffic could matter: in Nemotron-3-Super-120B-A12B-NVFP4, at batch size 256 on one B300 GPU, state updates remained the largest latency component up to about 100K tokens of context.
They then compared whole-model decode-step latency in four hybrid models. At batch size 256, ReplaySSM was 1.20–1.47 times faster than tuned conventional vLLM decoding. The comparison changes both state management and kernel implementation.
- Rollback without snapshots
Speculative decoding checks tokens proposed by a drafter and must discard any rejected suffix. ReplaySSM buffers the proposed inputs, computes verification outputs without materializing intermediate states, and commits accepted tokens by moving a pointer.
For two 120B-class models serving GSM8K prompts, at batch size 512 with four tokens checked per step, it produced 1.85 and 2.10 times the generated tokens per wall-clock time of conventional vLLM speculative decoding. This measure includes prefill, and acceptance lengths were similar.
- Keeping rounding out of recurrence
Low-precision rounding can affect later recurrent updates if the same stored state serves both output reads and recurrence. ReplaySSM keeps those roles separate.
On Qwen3.5-4B, its next-token distributions at 128K generated tokens were closer to conventional FP32-state decoding with NVFP4 reads and FP32 recurrence than with a shared NVFP4 checkpoint. On GPQA-Diamond, a 198-question test scored by answer accuracy, the four-model mean loss from FP32 was 2.36 percentage points with NVFP4 reads and FP16 recurrence, compared with 13.05 points for a shared NVFP4 checkpoint.
Deep
- Original paper authors
- Ze-Wei Liou, Harris Nover, Amey Naik, Andrii Skliar, Igor Shovkun
- Submitted to arXiv
- License
- CC BY 4.0