FrontierReplay: Split-Free Exact Prefix Caching for Hybrid Language Models
Zekun Wang, Yizhuo Wang
arXiv:2611.26020v1Hybrid language models are becoming important because they try to get the best of both worlds: self-attention for flexible retrieval over the prompt, and recurrent layers for keeping long contexts efficient. You see this design in newer systems like Qwen3.5, Falcon-H1, Jamba, Kimi-K3, and GLM-5.3-Flash. The promise is attractive: cheaper long-context inference without giving up too much modeling power. But this paper is about a practical serving problem that shows up once you try to cache prefixes. In ordinary transformer serving, prefix caching is straightforward because attention keeps a key-value cache per token. If two requests share a prefix, the server can reuse the cached pages and skip recomputing that shared text. Hybrid models break that simplicity. Their recurrent layers do not store a per-token cache; instead, they compress the whole history into a fixed-size state that gets overwritten as tokens arrive. That means you can only reuse the recurrent part if you have saved the exact state at the exact reuse position. That sounds manageable until you look at how serving systems actually operate. A common approach, used for example in vLLM’s default align mode, is to save recurrent states on a coarse grid. The problem is that real reuse boundaries often fall between those grid points. Then the server can reuse some of the prefix, but not all of it, and the leftover tokens must be recomputed through every layer. On the workloads studied here, that wasted work is not tiny: coarse grids leave a noticeable fraction of reusable tokens on the table. There are also finer-grained exact caches in prior work, but they run into a different issue. If you want an exact recurrent state at some boundary in the middle of a prompt, the simplest way is to stop the prefill there, create a checkpoint, and then continue. That means extra scheduler steps and short trailing chunks. Under load, those extra steps can cost more than the reuse saves. So the core tension is: exact reuse is valuable, but the obvious way to materialize exact checkpoints is operationally expensive. The key observation behind FrontierReplay is that reuse boundaries are usually not arbitrary. In the kinds of workloads people actually serve, they tend to land at structural boundaries that the server can predict ahead of time. In multi-turn chat, reuse usually ends at the end of a prior turn or at the start of the generation prompt. In agent loops, it often ends at turn boundaries and shared system prompts. In document question answering, it often ends at the end of the document. In tree search, it often ends at known branch points. So instead of searching for arbitrary future hit positions, the system can focus on a frontier of likely boundaries. That leads to the paper’s main idea: split-free exact prefix caching. FrontierReplay keeps the prefill forward pass uncut. While the model is processing the prompt normally, the runtime logs the recurrent-layer inputs for a short window leading up to a target boundary. After the forward pass finishes, a replay kernel reconstructs only the recurrent state updates over that window. Because replay skips attention, MLPs, and output projections, it is much cheaper than recomputing the whole span. The result is an exact checkpoint at the boundary, created without interrupting the forward pass. This is important because it separates two things that were previously coupled: the normal serving schedule and the act of producing a cacheable recurrent state. The paper emphasizes that this replay happens entirely on the GPU and does not require host synchronization. It also avoids modifying the native forward kernels. That makes the approach more practical than methods that export side outputs during the forward pass or depend on backend-specific tiling details. In other words, the checkpoint is produced after the fact, but exactly. The paper’s characterization study is central to the design. Across the evaluated workloads, most reusable tokens end at earlier turn boundaries, and only a small remainder ends at branch points that were already visible to the server. That means the server can often know in advance where a future cache hit is likely to land. The second part of the design is then to make creating a checkpoint there cheap enough that the benefit survives under load. How cheap is replay? The paper reports that state-only replay is 6 to 37 times cheaper per token than full recomputation, depending on the model and layer. It adds only a small amount of GPU work per checkpoint, on the order of milliseconds, and crucially it avoids the extra scheduler steps that hurt prior exact methods. That is the main systems insight: the expensive part is not just the math, it is the way the serving loop has to be interrupted if you cut the prefill. FrontierReplay also has to manage memory carefully, because recurrent checkpoints are large. The paper says each checkpoint can be tens of MiB, so only a limited number fit in cache. To handle that, it uses a frontier-aware retention policy. The policy prioritizes active anchors and proven branch points, keeps the anchors of running requests, removes dead checkpoints whose corresponding KV is gone, and drops ancestors that have been superseded by deeper checkpoints on the same path. If a checkpoint slot is holding only dead state, that space can be lent back to the attention KV cache. So the system treats checkpoint memory as a shared resource, not a separate silo. The implementation is built on vLLM 0.30.0. The evaluation covers two hybrid architectures, Qwen3.5-9B with interleaved GDN layers and Falcon-H1-7B with parallel Mamba-2 layers. It tests five model sizes from 4B to 34B, and four workloads: ShareGPT conversations, SWE-agent tool-use sessions, LongBench document question answering, and GSM8K tree search. The baselines include vLLM, Marconi, Sparse Prefix Caching, and SuffixReplay, with a 32 GiB cache budget. The paper also evaluates tensor-parallel larger models to show the method still works as scale increases. The main results are strong. FrontierReplay is the best exact cache across all eight operating points reported in the paper. Compared with vLLM, it improves goodput by 1.11 to 4.26 times, raises 80% service-level objective capacity by up to 1.73 times, and cuts median time to first token by 16% to 89%, with one striking example being a reduction from about 1.1 seconds to 125 milliseconds on Falcon SWE-agent. On larger tensor-parallel models, it still cuts median TTFT by 1.4 to 7.7 times and reaches up to 3.67 times goodput on 34B tree search. What do these numbers actually mean? TTFT is the user’s wait for the first token, so lowering it improves responsiveness. SLO capacity means how much traffic the system can support while staying within a latency target. Goodput is the throughput of useful work under that target. The fact that all three improve together suggests FrontierReplay is not just trading one bottleneck for another; it is making prefix reuse practical enough that the server can serve more requests without getting bogged down by checkpoint overhead. Against exact baselines, the story is especially interesting. FrontierReplay outperforms Marconi and Sparse Prefix Caching because it can materialize exact checkpoints without cutting the prefill into extra scheduler steps. The paper reports that, with the same checkpoint placement and the same prefilling tokens, cutting at each target needs 1.44 to 1.86 times as many prefill steps as FrontierReplay on chat, agent, and tree-search traces. That is the operational penalty the new design avoids. The comparison with approximate replay methods is also useful. Approximate approaches like SuffixReplay can be cheaper, but they rebuild the recurrent state from only the last few hundred tokens and therefore change the model’s outputs. FrontierReplay preserves exact task accuracy. The paper reports that it matches approximate replay on chat and agent traces, while delivering 1.10 to 1.54 times higher goodput at high load, and avoiding the 13% to 17% accuracy drop that approximate replay suffers at long contexts. So the point is not just speed; it is speed without giving up correctness. There are still limits and things to watch. First, the method depends on the fact that many real workloads have predictable structural boundaries. That is true in the studied traces, but it may be less true in more irregular or open-ended settings. Second, the system still has to store large recurrent checkpoints, so memory management remains important. Third, the replay window is bounded, so the design works best when the target boundary is not too far from a known anchor. The paper also focuses on a specific class of hybrid architectures, so the exact mechanics may differ as model designs evolve. Even with those caveats, the broader takeaway is clear. Hybrid language models make long-context inference cheaper, but they also make exact prefix caching harder. FrontierReplay shows that you do not need to choose between coarse, wasteful checkpoints and expensive cut-based exact caching. By replaying recurrent state after the forward pass, it gives the server a practical way to place exact checkpoints exactly where future reuse is likely to happen. That is the core contribution: not a new model, but a serving strategy that makes hybrid models much easier to use efficiently in real systems.
Also spotted that day
Previous daily papers