Skip to content

Just Let Linear States Forget the Distant Past: Prefix Caching via Suffix Replay for Hybrid LLMs

Sep 2026 · 0 citations · 41 references
Computer Science

TL;DR

SuffixReplay is presented, the first prefix caching system that lets hybrid LLMs reuse cached prefixes at every cache-supported page boundary without materializing recurrent-state checkpoints and is evaluated on three hybrid LLMs.

Abstract

Hybrid LLMs interleave full-attention layers with linear-attention layers to reduce long-context inference cost, but this structure complicates prefix caching. Full-attention KV caches are token-addressable, whereas linear-attention layers maintain recurrent states that cannot be rolled back to arbitrary prefix boundaries. Existing systems materialize recurrent-state checkpoints, restricting prefix reuse to checkpoint-aligned positions. We present SuffixReplay, the first prefix caching system that lets hybrid LLMs reuse cached prefixes at every cache-supported page boundary without materializing recurrent-state checkpoints. Our key insight is to just let linear states forget the distant past. Modern linear-attention mechanisms use recurrent decay and gating to attenuate the influence of old inputs. Therefore, instead of checkpointing every prefix boundary, SuffixReplay approximates the state at a matched boundary by replaying only a recent suffix of the layer's input hidden states, which we retain as anchors. At the algorithmic level, SuffixReplay combines layer-wise and token-wise anchor sparsity with a bounded replay budget to control storage, computation, and quality. At the system level, it uses an independently managed anchor sidecar and a pipelined replay path to overlap anchor movement and state reconstruction with the native serving pipeline. We evaluate SuffixReplay on three hybrid LLMs: OLMo-Hybrid-7B, Qwen3.5-4B, and Qwen3.6-27B-FP8. Across these models, SuffixReplay retains 91.4-100% of full-prefill quality on average across LongBench and RULER, while using only 0.36-0.51x the amortized per-token storage of SGLang's default 8192-token checkpoint cache. Integrated into SGLang, SuffixReplay reduces median TTFT by 15-70% on branching workloads, sustains 2.3-4.3x SGLang's throughput when the working set exceeds HBM, and matches SGLang on high-hit continuation traffic.

View source

Similar papers

Preprint Aug 2026

DeltaLog: Deferred Materialization of Recurrent States for Linear Attention Decoding

DeltaLog is presented, a recurrent-state decoding scheme that reduces this overhead without changing the model semantics, and is implemented for GDN, KDA, and RWKV6 and integrated into a prototype serving stack.

Jun-Qing Lin, Jing-Wei Sun, Guang-Zhong Sun · 1 citation
Preprint Aug 2026

MARCH: Scaling Recurrent Memory with Content-Routed State Anchors

Memory-Anchor Routing across Context History (MARCH), a network architecture that effectively scales state-space models beyond a fixed-size dimension, while maintaining computational efficiency over long-sequences, is introduced.

Ming Zhang, Kai-Sen Yang, Shu Yu et al. · 1 citation
#machine learning Preprint Aug 2026

PatchKV: Efficient KV Cache Recovery for Dynamically Edited LLM Contexts

PatchKV, a profile-guided recovery system for suffix-preserving revisions, decomposes adjacent context versions into an exact prefix, an updated span, and an aligned suffix, and achieves a speedup in mean resume time-to-first-token over full suffix recomputation.

Guo-Tao Yang, Rui Guo, Si-Wei He et al. · 0 citations
Preprint Aug 2026

Archer: Adaptive Reuse of Cached Hidden States for Efficient Rollback in Diffusion Language Models

Adaptive Reuse of Cached Hidden States for Efficient Rollback (Archer) is introduced, a training-free KV caching method for rollback-capable DLMs that characterizes prompt reuse as a reversibility-aligned cache boundary, bounds its state-dependent approximation error, and gives a decoder-margin condition for preserving...

Xuning He, Zinan Sheng, Yong-Ding Tao et al. · 1 citation · ⚡1

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.