Lune

ICLR2025顶会

SqueezeAttention: 2D Management of KV-Cache in LLM Inference via Layer-wise Optimal Budget

Zihao Wang, Bin Cui, Shaoduo Gan

摘要

Optimizing the Key-Value (KV) cache of the Large Language Model (LLM) has been considered critical to saving the cost of inference. Most of the existing KVcache compression algorithms attempted to sparsify the sequence of tokens by taking advantage of the different importance of tokens. However, most of these methods treat all layers equally, allocating the same KV budget to each layer. This approach is suboptimal, as some layers may be less sensitive to input tokens yet still receive the same budget as others. In this work, we found that by identifying the importance of attention layers, we could optimize the KV-cache jointly from two dimensions, i.e., sequence-wise and layer-wise. Based on our observations regarding layer-wise importance in inference, we propose SQUEEZEATTENTION to precisely optimize the allocation of KV-cache budget among layers on-the-fly and then incorporate three representative sequence-wise algorithms to compress the KV-cache for each layer with its very own budget. Specifically, we first measure each layer's importance by calculating the cosine similarity of the input prompt differences before and after the self-attention layers. Based on this similarity, we then categorize the layers into two groups and adjust their KV budgets accordingly. By optimizing the KV-cache from both sequence's and layer's dimensions, SQUEEZEATTENTION achieves around 30% to 70% of the memory reductions and up to 2.2 × of throughput improvements in a wide range of LLMs and benchmarks. The code is available at https://github.com/hetailang/SqueezeAttention.

问 Lune

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

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

已有 6 篇顶会 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
  • MPCache: MPC-Friendly KV Cache Eviction for Efficient Private LLM Inference 引用了 Efficient Streaming Language Models with Attention Sinks
  • MPCache: MPC-Friendly KV Cache Eviction for Efficient Private LLM Inference 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • MPCache: MPC-Friendly KV Cache Eviction for Efficient Private LLM Inference 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
  • EntroKV: Entropy-Guided Dynamic Budget Allocation for KV-Cache Compression 引用了 Efficient Streaming Language Models with Attention Sinks
  • EntroKV: Entropy-Guided Dynamic Budget Allocation for KV-Cache Compression 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • Efficient Memory Management for Large Language Model Serving with PagedAttention 引用了 FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPU
  • DualMap: Enabling Both Cache Affinity and Load Balancing for Distributed LLM Serving 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
  • SGLang: Efficient Execution of Structured Language Model Programs 引用了 FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPU
  • SGLang: Efficient Execution of Structured Language Model Programs 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
  • PQCache: Product Quantization-based KVCache for Long Context LLM Inference 引用了 Efficient Streaming Language Models with Attention Sinks
  • PQCache: Product Quantization-based KVCache for Long Context LLM Inference 引用了 FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPU
  • PQCache: Product Quantization-based KVCache for Long Context LLM Inference 引用了 Efficient Memory Management for Large Language Model Serving with PagedAttention
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. PQCache: Product Quantization-based KVCache for Long Context LLM InferenceHailin Zhang, Xiaodong Ji, Yilin Chen, Fangcheng Fu 等SIGMOD 2025 · 13 次引用
  2. DualMap: Enabling Both Cache Affinity and Load Balancing for Distributed LLM ServingYing Yuan, Pengfei Zuo, Bo Wang, Zhangyu Chen 等ICLR 2026 · 10 次引用
  3. Enhancing Instruction Following of LLMs via Activation Steering with Dynamic RejectionMinjae Kang, Jaehyung KimICLR 2026 · 6 次引用
  4. MPCache: MPC-Friendly KV Cache Eviction for Efficient Private LLM InferenceWenxuan Zeng, Ye Dong, Jinjin Zhou, Jin Tan 等NeurIPS 2025 · 4 次引用
  5. EntroKV: Entropy-Guided Dynamic Budget Allocation for KV-Cache CompressionWenhao Gao, Haoran Cao, Yueyan Li, YongGao Xiao 等ICML 2026

它引用的 Paper10

  1. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
  2. SGLang: Efficient Execution of Structured Language Model ProgramsLianmin Zheng, Liangsheng Yin, Zhiqiang Xie, Chuyue Sun 等NeurIPS 2024 · 1,586 次引用
  3. Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng 等SOSP 2023 · 1,016 次引用
  4. H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language ModelsZhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen 等NeurIPS 2023 · 1,003 次引用
  5. FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPUYing Sheng, Lianmin Zheng, Binhang Yuan, Zhuohan Li 等ICML 2023 · 683 次引用

相关 Paper

  1. PyramidInfer: Pyramid KV Cache Compression for High-throughput LLM InferenceDongjie Yang, Xiaodong Han, Yan Gao, Yao Hu 等ACL Findings 2024 · 31 次引用
  2. ZipCache: Accurate and Efficient KV Cache Quantization with Salient Token IdentificationYefei He, Luoming Zhang, Weijia Wu, Jing Liu 等NeurIPS 2024 · 100 次引用
  3. Layer-Condensed KV Cache for Efficient Inference of Large Language ModelsHaoyi Wu, Kewei TuACL 2024
  4. RazorAttention: Efficient KV Cache Compression Through Retrieval HeadsHanlin Tang, Yang Lin, Jing Lin, Qingsen Han 等ICLR 2025
  5. KVmix: Gradient-Based Layer Importance-Aware Mixed-Precision Quantization for KV CacheFei Li, Song Liu, Weiguo Wu, Shiqiang Nie 等AAAI 2026 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖