D2O: Dynamic Discriminative Operations for Efficient Long-Context Inference of Large Language Models
Zhongwei Wan, Xinjian Wu, Yu Zhang, Yi Xin, Chaofan Tao, Zhihong Zhu, Xin Wang, Siqi Luo, Jing Xiong, Longyue Wang, Mi Zhang
摘要
Generative inference in Large Language Models (LLMs) is impeded by the growing memory demands of Key-Value (KV) cache, especially for longer sequences. Traditional KV cache eviction strategies, which discard less critical KV pairs based on attention scores, often degrade generation quality, leading to issues such as context loss or hallucinations. In this work, we introduce Dynamic Discriminative Operations (D 2 O), a KV cache compression method that optimizes KV cache size dynamically and discriminatively at two levels without fine-tuning, while preserving essential context. At layer level, D 2 O leverages the varying densities of attention weights between shallow and deep layers to dynamically determine which layers should avoid excessive eviction via a novel dynamic allocation strategy to minimize information loss. At token level, D 2 O incorporates a compensation mechanism that maintains a similarity threshold to re-discriminate the importance of currently discarded tokens, determining whether they should be recalled and merged with similar tokens. We conduct experiments on various benchmarks and LLM architectures. Our results show that D 2 O not only achieves significant memory savings and enhances inference throughput by more than 3× but also maintains high-quality long-text generation.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 12 篇顶会 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 引用了 Compressive Transformers for Long-Range Sequence Modelling
- FreqKV: Key-Value Compression in Frequency Domain for Context Window Extension 引用了 Efficient Streaming Language Models with Attention Sinks
- FreqKV: Key-Value Compression in Frequency Domain for Context Window Extension 引用了 SnapKV: LLM Knows What You are Looking for Before Generation
- FreqKV: Key-Value Compression in Frequency Domain for Context Window Extension 引用了 Compressive Transformers for Long-Range Sequence Modelling
- Fast KV Compaction via Attention Matching 引用了 Efficient Streaming Language Models with Attention Sinks
- Fast KV Compaction via Attention Matching 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
- H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models 引用了 Compressive Transformers for Long-Range Sequence Modelling
- 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
- Neural Attention Search 引用了 Efficient Streaming Language Models with Attention Sinks
- Neural Attention Search 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
- Neural Attention Search 引用了 Compressive Transformers for Long-Range Sequence Modelling
- Homogeneous Keys, Heterogeneous Values: Exploiting Local KV Cache Asymmetry for Long-Context LLMs 引用了 Efficient Streaming Language Models with Attention Sinks
- Homogeneous Keys, Heterogeneous Values: Exploiting Local KV Cache Asymmetry for Long-Context LLMs 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
- Homogeneous Keys, Heterogeneous Values: Exploiting Local KV Cache Asymmetry for Long-Context LLMs 引用了 SnapKV: LLM Knows What You are Looking for Before Generation
引用它的顶会 Paper12
- Neural Attention SearchDifan Deng, Marius LindauerNeurIPS 2025 · 431 次引用
- SRPO: Enhancing Multimodal LLM Reasoning via Reflection-Aware Reinforcement LearningZhongwei Wan, Zhihao Dou, Che Liu, Yu Zhang 等NeurIPS 2025 · 63 次引用
- Fast KV Compaction via Attention MatchingAdam Zweiger, Xinghong Fu, Han Guo, Yoon KimICML 2026 · 14 次引用
- FreqKV: Key-Value Compression in Frequency Domain for Context Window ExtensionJushi Kai, Yixuan Wang, Boyi Zeng, Haoli Bai 等ICLR 2026 · 7 次引用
- Homogeneous Keys, Heterogeneous Values: Exploiting Local KV Cache Asymmetry for Long-Context LLMsWanyun Cui, Mingwei XuNeurIPS 2025 · 7 次引用
它引用的 Paper21
- TruthfulQA: Measuring How Models Mimic Human FalsehoodsStephanie Lin, Jacob Hilton, Owain EvansACL 2022 · 3,228 次引用
- Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
- SnapKV: LLM Knows What You are Looking for Before GenerationYuhong Li, Yingbing Huang, Bowen Yang, Bharat Venkitesh 等NeurIPS 2024 · 1,019 次引用
- H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language ModelsZhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen 等NeurIPS 2023 · 1,003 次引用
- Compressive Transformers for Long-Range Sequence ModellingJack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Chloe Hillier 等ICLR 2020 · 833 次引用
相关 Paper
- Dynamic Memory Compression: Retrofitting LLMs for Accelerated InferencePiotr Nawrot, Adrian Lancucki, Marcin Chochowski, David Tarjan 等ICML 2024 · 106 次引用
- DiffKV: Differentiated Memory Management for Large Language Models with Parallel KV CompactionYanqi Zhang, Yuwei Hu, Runyuan Zhao, John C. S. Lui 等SOSP 2025
- RefreshKV: Updating Small KV Cache During Long-form GenerationFangyuan Xu, Tanya Goyal, Eunsol ChoiACL 2025 · 6 次引用
- HitKV: Activation Frequency Knows Which Tokens Are ImportantSanle Zhao, Yujuan Tan, Jing Yu, Zhuoxin Bai 等AAAI 2026
- Model Tells You What to Discard: Adaptive KV Cache Compression for LLMsSuyu Ge, Yunan Zhang, Liyuan Liu, Minjia Zhang 等ICLR 2024 · 432 次引用
