Prefix Sliding cuts long-reasoning cost
A Stanford-led research team proposes Prefix Sliding, which keeps only task instructions and recent reasoning tokens in the KV cache while discarding stale intermediate steps. The paper reports up to 3× faster inference without retraining and reasoning traces beyond 100,000 tokens with reinforcement learning.
This is a deceptively simple systems idea that could make long-horizon agents much more practical by attacking KV-cache growth directly.
- –Retains the prompt prefix plus a bounded recent-token window, making per-token inference cost constant after warm-up.
- –Outperforms vanilla sliding windows and repeated summarization by preserving critical task instructions without regeneration overhead.
- –Enables longer RL rollouts through truncated backpropagation, extending reasoning beyond 100,000 tokens.
- –The headline gains are not universal: LiveCodeBench required a 16,384-token window, and the implementation currently depends on custom vLLM and FlashAttention kernels. [Code](https://github.com/Muennighoff/prefix-sliding)
DISCOVERED
7d ago
2026-08-30
PUBLISHED
7d ago
2026-08-30
RELEVANCE
AUTHOR
omarsar0