FreeKV: Boosting KV Cache Retrieval for Efficient LLM Inference
Guangda Liu, Chengwei Li, Zhenyu Ning, Jing Lin, Yiwu Yao, Danning Ke, Minyi Guo, Jieru Zhao
Abstract
Large language models (LLMs) are widely deployed with rapidly expanding context windows to support increasingly demanding applications. However, long contexts pose significant deployment challenges, primarily due to the KV cache whose size grows proportionally with context length. While KV cache compression methods have been proposed to address this issue, KV dropping methods incur considerable accuracy loss, and KV retrieval methods suffer from significant efficiency bottlenecks. We propose FreeKV, a training-free algorithm-system co-optimization framework to enhance KV retrieval efficiency while preserving accuracy. On the algorithm side, FreeKV introduces speculative retrieval to shift the KV selection and recall processes out of the critical path, combined with fine-grained correction to ensure accuracy. On the system side, FreeKV employs hybrid KV layouts across CPU and GPU memory to eliminate fragmented data transfers, and leverages double-buffered streamed recall to further improve efficiency, enabling effective overlap with computation, full latency hiding, and practical speedups from speculative recall. Experiments demonstrate that FreeKV achieves near-lossless accuracy across various scenarios and models, delivering up to a 13 speedup compared to SOTA KV retrieval methods. Code is available at https://github.com/sjtu-zhao-lab/FreeKV.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 785081c4-ff97-4e08-8741-710f2fd7d627Cited by top-tier papers4
- MuKV: Multi-Grained KV Cache Compression for Long Streaming Video Question-AnsweringJunbin Xiao, Jiajun Chen, Tianxiang Sun, Xun Yang et al.CVPR 2026 · 6 citations
- LouisKV: Efficient KV Cache Retrieval for Long Input-Output SequencesWenbo Wu, Qingyi Si, Xiurui Pan, Ye Wang et al.ICLR 2026 · 5 citations
- When Replanning Becomes the Bottleneck: Budgeted Replanning for Embodied AgentsShuaijun Liu, Feiyang You, Xingwei Chen, Ningxin SuICML 2026
- ECHO: Efficient KV Cache Offloading with Lossless Prefetching for Serving Native Sparse Attention LLMsGuangda Liu, Wenhao Chen, Chengwei Li, Zhenyu Ning et al.OSDI 2026
Builds on22
- FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 citations
- Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han et al.ICLR 2024 · 1,714 citations
- SnapKV: LLM Knows What You are Looking for Before GenerationYuhong Li, Yingbing Huang, Bowen Yang, Bharat Venkitesh et al.NeurIPS 2024 · 1,019 citations
- H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language ModelsZhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen et al.NeurIPS 2023 · 1,003 citations
- MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse AttentionHuiqiang Jiang, Yucheng Li, Chengruidong Zhang, Qianhui Wu et al.NeurIPS 2024 · 479 citations
Related papers
- RocketKV: Accelerating Long-Context LLM Inference via Two-Stage KV Cache CompressionPayman Behnam, Yaosheng Fu, Ritchie Zhao, Po-An Tsai et al.ICML 2025
- SpeCache: Speculative Key-Value Caching for Efficient Generation of LLMsShibo Jie, Yehui Tang, Kai Han, Zhi-Hong Deng et al.ICML 2025
- RazorAttention: Efficient KV Cache Compression Through Retrieval HeadsHanlin Tang, Yang Lin, Jing Lin, Qingsen Han et al.ICLR 2025
- StreamKV: Streaming Video Question-Answering with Segment-based KV Cache Retrieval and CompressionYilong Chen, Xiang Bai, Zhibin Wang, Chengyu Bai et al.AAAI 2026 · 1 citation
- LaCache: Ladder-Shaped KV Caching for Efficient Long-Context Modeling of Large Language ModelsDachuan Shi, Yonggan Fu, Xiangchi Yuan, Zhongzhi Yu et al.ICML 2025
