Lune

ICLR2025顶会

Not All Heads Matter: A Head-Level KV Cache Compression Method with Integrated Retrieval and Reasoning

Yu Fu, Zefan Cai, Abedelkadir Asi, Wayne Xiong, Yue Dong, Wen Xiao

摘要

Key-Value (KV) caching is a common technique to enhance the computational efficiency of Large Language Models (LLMs), but its memory overhead grows rapidly with input length. Prior work has shown that not all tokens are equally important for text generation, proposing layer-level KV cache compression to selectively retain key information. Recognizing the distinct roles of attention heads in generation, we propose HeadKV, a head-level KV cache compression method, and HeadKV-R2, which leverages a novel contextual reasoning ability estimation for compression. Our approach operates at the level of individual heads, estimating their importance for contextual QA tasks that require both retrieval and reasoning capabilities. Extensive experiments across diverse benchmarks (LongBench, LooGLE), model architectures (e.g., Llama-3-8B-Instruct, Mistral-7B-Instruct), and long-context abilities tests demonstrate that our head-level KV cache compression significantly outperforms strong baselines, particularly in low-resource settings (KV size = 64 & 128). Notably, our method retains just 1.5% of the KV cache while achieving 97% of the performance of the full KV cache on the contextual question answering benchmark. All code and data are available at https://github.com/FYYFU/HeadKV .

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 43 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Efficient Streaming Language Models with Attention Sinks 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models 引用了 Efficient Streaming Language Models with Attention Sinks
  • Efficient Streaming Language Models with Attention Sinks 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • R-KV: Redundancy-aware KV Cache Compression for Reasoning Models 引用了 Efficient Streaming Language Models with Attention Sinks
  • R-KV: Redundancy-aware KV Cache Compression for Reasoning Models 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • R-KV: Redundancy-aware KV Cache Compression for Reasoning Models 引用了 SnapKV: LLM Knows What You are Looking for Before Generation
  • R-KV: Redundancy-aware KV Cache Compression for Reasoning Models 引用了 Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM Inference
  • InfiniPot-V: Memory-Constrained KV Cache Compression for Streaming Video Understanding 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • InfiniPot-V: Memory-Constrained KV Cache Compression for Streaming Video Understanding 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • InfiniPot-V: Memory-Constrained KV Cache Compression for Streaming Video Understanding 引用了 SnapKV: LLM Knows What You are Looking for Before Generation
  • Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attention 引用了 Efficient Streaming Language Models with Attention Sinks
  • Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attention 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • SnapKV: LLM Knows What You are Looking for Before Generation 引用了 Efficient Streaming Language Models with Attention Sinks
  • SnapKV: LLM Knows What You are Looking for Before Generation 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • SnapKV: LLM Knows What You are Looking for Before Generation 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Reasoning Path Compression: Compressing Generation Trajectories for Efficient LLM Reasoning 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • Reasoning Path Compression: Compressing Generation Trajectories for Efficient LLM Reasoning 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Reasoning Path Compression: Compressing Generation Trajectories for Efficient LLM Reasoning 引用了 SnapKV: LLM Knows What You are Looking for Before Generation
  • Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM Inference 引用了 Efficient Streaming Language Models with Attention Sinks
  • Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM Inference 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM Inference 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM Inference 引用了 SnapKV: LLM Knows What You are Looking for Before Generation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper43

  1. Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse AttentionJingyang Yuan, Huazuo Gao, Damai Dai, Junyu Luo 等ACL 2025 · 334 次引用
  2. Ada-KV: Optimizing KV Cache Eviction by Adaptive Budget Allocation for Efficient LLM InferenceYuan Feng, Junlin Lv, Yukun Cao, Xike Xie 等NeurIPS 2025 · 256 次引用
  3. InfiniPot-V: Memory-Constrained KV Cache Compression for Streaming Video UnderstandingMinsoo Kim, Kyuhong Shim, Jungwook Choi, Simyung ChangNeurIPS 2025 · 62 次引用
  4. R-KV: Redundancy-aware KV Cache Compression for Reasoning ModelsZefan Cai, Wen Xiao, Hanshi Sun, Cheng Luo 等NeurIPS 2025 · 50 次引用
  5. Reasoning Path Compression: Compressing Generation Trajectories for Efficient LLM ReasoningJiwon Song, Dongwon Jo, Yulhwa Kim, Jae-Joon KimNeurIPS 2025 · 25 次引用

它引用的 Paper20

  1. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 次引用
  2. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
  3. Inference-Time Intervention: Eliciting Truthful Answers from a Language ModelKenneth Li, Oam Patel, Fernanda B. Viégas, Hanspeter Pfister 等NeurIPS 2023 · 1,549 次引用
  4. SnapKV: LLM Knows What You are Looking for Before GenerationYuhong Li, Yingbing Huang, Bowen Yang, Bharat Venkitesh 等NeurIPS 2024 · 1,019 次引用
  5. H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language ModelsZhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen 等NeurIPS 2023 · 1,003 次引用

相关 Paper

  1. Which Heads Matter for Reasoning? RL-Guided KV Cache CompressionWenjie Du, Li Jiang, Keda TAO, Xue Liu 等ICML 2026 · 11 次引用
  2. DiffKV: Differentiated Memory Management for Large Language Models with Parallel KV CompactionYanqi Zhang, Yuwei Hu, Runyuan Zhao, John C. S. Lui 等SOSP 2025
  3. RazorAttention: Efficient KV Cache Compression Through Retrieval HeadsHanlin Tang, Yang Lin, Jing Lin, Qingsen Han 等ICLR 2025
  4. Value-Guided KV Compression for LLMs via Approximated CUR DecompositionAyan Sengupta, Siddhant Chaudhary, Tanmoy ChakrabortyNeurIPS 2025 · 6 次引用
  5. FreqKV: Key-Value Compression in Frequency Domain for Context Window ExtensionJushi Kai, Yixuan Wang, Boyi Zeng, Haoli Bai 等ICLR 2026 · 7 次引用
黄昏的海面,两侧是细线勾勒的悬崖