KVpop -- Key-Value Cache Compression with Predictive Online Pruning
Summary
KVpop (KV compression with Predictive Online Pruning) is a novel sparse-attention retrofit designed to address the KV cache bottleneck in Transformer-based large language models during long-context inference. It maintains a fixed per-head KV budget by retaining sink tokens, a protected window of recent tokens, and a learned long-range top-k cache for older tokens. KVpop distinguishes itself by supervising its lightweight head-wise scoring modules with future-attention mass, evaluated at the eviction boundary, and efficiently computed via a transposed-attention pass. It also supports stateful scorers that delay scoring until the eviction boundary, integrating near-future context. Empirically, KVpop preserves 97% and 100% of dense-attention performance on Qwen3-4B and Qwen3-8B, respectively, at 88% KV cache compression, outperforming heuristic and learned eviction baselines like DMS. It also demonstrates strong generalization to out-of-domain tasks and significantly reduces VRAM growth, maintaining constant memory use and faster long-generation decoding compared to dense attention and DMS.
Key takeaway
For AI Scientists and Machine Learning Engineers optimizing LLM inference for long contexts, KVpop offers a robust solution to the KV cache memory bottleneck. You should consider retrofitting your Transformer models with KVpop to achieve significant memory compression (e.g., 88%) while preserving high performance (e.g., 97-100% on Qwen3 models). This approach ensures stable, faster decoding for long generations and generalizes well across diverse reasoning tasks, making it a strong candidate for deploying efficient, long-context LLMs.
Key insights
KVpop uses future-attention supervision and delayed stateful scoring to predict token utility for efficient, fixed-budget KV cache compression.
Principles
- Supervise eviction decisions at the boundary where tokens become evictable.
- Delay scoring to integrate near-future context for better utility prediction.
- Homogeneous per-head cache budgets enable efficient GPU execution.
Method
KVpop trains lightweight scorers using a boundary-aware loss and a transposed-attention pass for future-attention targets. It employs a Fenwick tree and FlexAttention for running top-k sparse mask generation.
In practice
- Apply KVpop as a post-training retrofit for Transformer LLMs.
- Use mLSTM-based stateful scorers for improved token accuracy.
- Prioritize retaining reasoning-structural tokens over purely numeric ones.
Topics
- KV Cache Compression
- Transformer LLMs
- Sparse Attention
- Predictive Pruning
- mLSTM Scorers
- Long-Context Inference
Best for: Research Scientist, NLP Engineer, AI Scientist, Machine Learning Engineer, AI Engineer
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by cs.AI updates on arXiv.org.