Lune

ACL2024Top-tier venue

Layer-Condensed KV Cache for Efficient Inference of Large Language Models

Haoyi Wu, Kewei Tu

Abstract

Huge memory consumption has been a major bottleneck for deploying high-throughput large language models in real-world applications. In addition to the large number of parameters, the key-value (KV) cache for the attention mechanism in the transformer architecture consumes a significant amount of memory, especially when the number of layers is large for deep language models. In this paper, we propose a novel method that only computes and caches the KVs of a small number of layers, thus significantly saving memory consumption and improving inference throughput. Our experiments on large language models show that our method achieves up to 26× higher throughput than standard transformers and competitive performance in language modeling and downstream tasks. In addition, our method is orthogonal to existing transformer memory-saving techniques, so it is straightforward to integrate them with our model, achieving further improvement in inference efficiency. Our code is available at https://github.com/whyNLP/LCKV .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

28 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Efficient Streaming Language Models with Attention Sinks cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • Efficient Streaming Language Models with Attention Sinks cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Efficient Streaming Language Models with Attention Sinks cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • MiniCache: KV Cache Compression in Depth Dimension for Large Language Models cites Efficient Streaming Language Models with Attention Sinks
  • MiniCache: KV Cache Compression in Depth Dimension for Large Language Models cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • MiniCache: KV Cache Compression in Depth Dimension for Large Language Models cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • MiniCache: KV Cache Compression in Depth Dimension for Large Language Models cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • MiniCache: KV Cache Compression in Depth Dimension for Large Language Models cites Efficient Memory Management for Large Language Model Serving with PagedAttention
  • FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference cites Efficient Streaming Language Models with Attention Sinks
  • ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference cites MiniCache: KV Cache Compression in Depth Dimension for Large Language Models
  • ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference cites Many-Shot In-Context Learning
  • Efficient Memory Management for Large Language Model Serving with PagedAttention cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation cites Efficient Streaming Language Models with Attention Sinks
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation cites MiniCache: KV Cache Compression in Depth Dimension for Large Language Models
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation cites Efficient Memory Management for Large Language Model Serving with PagedAttention
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers28

  1. Many-Shot In-Context LearningRishabh Agarwal, Avi Singh, Lei Zhang, Bernd Bohnet et al.NeurIPS 2024 · 271 citations
  2. MiniCache: KV Cache Compression in Depth Dimension for Large Language ModelsAkide Liu, Jing Liu, Zizheng Pan, Yefei He et al.NeurIPS 2024 · 160 citations
  3. Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level ComputationSangmin Bae, Yujin Kim, Reza Bayat, Sungnyun Kim et al.NeurIPS 2025 · 143 citations
  4. ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM InferenceXiang Liu, Zhenheng Tang, Peijie Dong, Zeyu Li et al.NeurIPS 2025 · 71 citations
  5. Cache-to-Cache: Direct Semantic Communication Between Large Language ModelsTianyu Fu, Zihan Min, Hanling Zhang, Jichao Yan et al.ICLR 2026 · 59 citations

Builds on16

  1. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
  2. PIQA: Reasoning about Physical Commonsense in Natural LanguageYonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao et al.AAAI 2020 · 2,916 citations
  3. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 citations
  4. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han et al.ICLR 2024 · 1,714 citations
  5. Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng et al.SOSP 2023 · 1,016 citations

Related papers

  1. PyramidInfer: Pyramid KV Cache Compression for High-throughput LLM InferenceDongjie Yang, Xiaodong Han, Yan Gao, Yao Hu et al.ACL Findings 2024 · 31 citations
  2. SqueezeAttention: 2D Management of KV-Cache in LLM Inference via Layer-wise Optimal BudgetZihao Wang, Bin Cui, Shaoduo GanICLR 2025
  3. A Simple and Effective L_2 Norm-Based Strategy for KV Cache CompressionAlessio Devoto, Yu Zhao, Simone Scardapane, Pasquale MinerviniEMNLP 2024 · 3 citations
  4. Cost-Efficient Large Language Model Serving for Multi-turn Conversations with CachedAttentionBin Gao, Zhuomin He, Puru Sharma, Qingxuan Kang et al.USENIX ATC 2024 · 273 citations
  5. SpindleKV: A Novel KV Cache Reduction Method Balancing Both Shallow and Deep LayersZicong Tang, Luohe Shi, Zuchao Li, Baoyuan Qi et al.ACL 2025 · 7 citations
Dusk over the sea between two cliffs drawn in fine vertical lines