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

TL;DR
D2O introduces a dynamic, discriminative KV cache compression method for large language models that reduces memory usage and improves inference speed while maintaining high-quality long-text generation without fine-tuning.
Contribution
The paper proposes D2O, a novel KV cache compression technique that dynamically and discriminatively optimizes cache retention at layer and token levels without fine-tuning.
Findings
Achieves over 3× inference throughput improvement.
Provides significant memory savings during inference.
Maintains high-quality long-text generation.
Abstract
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 (D2O), 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, D2O 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, D2O incorporates a compensation mechanism that maintains…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Topic Modeling · Speech Recognition and Synthesis
MethodsSoftmax · Attention Is All You Need
