Lune

ACL2024顶会

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

Haoyi Wu, Kewei Tu

摘要

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 .

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Efficient Streaming Language Models with Attention Sinks 引用了 PIQA: Reasoning about Physical Commonsense in Natural Language
  • Efficient Streaming Language Models with Attention Sinks 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Efficient Streaming Language Models with Attention Sinks 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • MiniCache: KV Cache Compression in Depth Dimension for Large Language Models 引用了 Efficient Streaming Language Models with Attention Sinks
  • MiniCache: KV Cache Compression in Depth Dimension for Large Language Models 引用了 PIQA: Reasoning about Physical Commonsense in Natural Language
  • MiniCache: KV Cache Compression in Depth Dimension for Large Language Models 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • MiniCache: KV Cache Compression in Depth Dimension for Large Language Models 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • MiniCache: KV Cache Compression in Depth Dimension for Large Language Models 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
  • FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference 引用了 Efficient Streaming Language Models with Attention Sinks
  • ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference 引用了 MiniCache: KV Cache Compression in Depth Dimension for Large Language Models
  • ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • ChunkKV: Semantic-Preserving KV Cache Compression for Efficient Long-Context LLM Inference 引用了 Many-Shot In-Context Learning
  • Efficient Memory Management for Large Language Model Serving with PagedAttention 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation 引用了 Efficient Streaming Language Models with Attention Sinks
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation 引用了 MiniCache: KV Cache Compression in Depth Dimension for Large Language Models
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper28

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

它引用的 Paper16

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

相关 Paper

  1. PyramidInfer: Pyramid KV Cache Compression for High-throughput LLM InferenceDongjie Yang, Xiaodong Han, Yan Gao, Yao Hu 等ACL Findings 2024 · 31 次引用
  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 次引用
  4. Cost-Efficient Large Language Model Serving for Multi-turn Conversations with CachedAttentionBin Gao, Zhuomin He, Puru Sharma, Qingxuan Kang 等USENIX ATC 2024 · 273 次引用
  5. SpindleKV: A Novel KV Cache Reduction Method Balancing Both Shallow and Deep LayersZicong Tang, Luohe Shi, Zuchao Li, Baoyuan Qi 等ACL 2025 · 7 次引用
黄昏的海面,两侧是细线勾勒的悬崖