PrefixChain: Compact Prefix Caching for Hybrid LLMs

Wang, Genglin, Yin, Wangsong, Zeng, Liekang, Abudunuer, Yeerzhati, Xu, Haoxuan, Yan, Zhenyu, Xing, Guoliang

–arXiv.org Artificial Intelligence 

Hybrid LLMs combine linear attention with full attention to bound memory growth during long-context inference. Each linear-attention layer summarizes token history in a fixed-size recurrent state instead of a growing KV cache. However, this design creates a severe capacity bottleneck for prefix caching. Because recurrent states are overwritten in place, rolling back to prefixes requires saving bulky state checkpoints repeatedly. We introduce PrefixChain, a compact prefix caching system for hybrid LLMs. Our key insight is that recurrent states evolve across tokens with strong inter-state redundancy, as each linear-attention step decays the prior state before applying an incremental update. Inspired by inter-frame video coding, PrefixChain organizes checkpoints into closed-loop chains of anchor I-states and low-rank residual P-states, allocating per-head ranks via offline readout-error profiling. To serve chains efficiently online, PrefixChain pipelines layer-grouped encoding asynchronously off the forward path, reconstructs multi-step chains in a single fused GPU kernel, and coordinates dependency-aware eviction with the KV cache. Across three hybrid LLMs and four workloads, PrefixChain shrinks checkpoints by $31.3\times$ to $55.7\times$ with negligible quality loss and reduces mean TTFT by up to $5.03\times$ over state-of-the-art serving systems, such as SGLang, vLLM, and Marconi, while incurring low online encoding overhead.