mlsanityData to 7 Oct 2026

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

arXiv 2404.04793 ↗First posted 7 Apr 2024cs.LG cs.CLcited by 21

On the map: Efficient LLM inference and serving → KV cache optimization

Abstract (arXiv)

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 KV-cache 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 times of throughput improvements in a wide range of LLMs and benchmarks. The code is available at https://github.com/hetailang/SqueezeAttention.

Key facts. Cited by 21 papers in the map (data through 7 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 15 of its 18 references that are in the map. First posted on arXiv 7 Apr 2024.

Builds on

15 of 18 references.

Closest ancestors · 4

Same direction, newest first

  1. 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMs3 Oct
  2. 2023Efficient Memory Management for Large Language Model Serving with PagedAttention12 Sep
  3. 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models24 Jun
  4. 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Time26 May

Other references · 11

  1. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  2. 2020Longformer: The Long-Document Transformercited by 3,362
  3. 2023Mistral 7Bcited by 3,065
  4. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  5. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
  6. 2023FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPUcited by 567
  7. 2019Adaptive Attention Span in Transformerscited by 148
  8. 2023SkipDecode: Autoregressive Skip Decoding with Batching and Caching for Efficient LLM Inferencecited by 89
  9. 2023LLMCarbon: Modeling the end-to-end Carbon Footprint of Large Language Modelscited by 71
  10. 2023Dynamic Context Pruning for Efficient and Interpretable Autoregressive Transformerscited by 67
  11. 2020Do Transformers Need Deep Long-Range Memorycited by 24

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 3; 2025: 8; 2026: 10.

21 papers.

Sort:

By area:

  1. 2024PQCache: Product Quantization-based KVCache for Long Context LLM Inferencecited by 93
  2. 2025Cognitive Memory in Large Language Modelscited by 28
  3. 2025Dialogue Without Limits: Constant-Sized KV Caches for Extended Responses in LLMscited by 20
  4. 2025KV Cache Compression for Inference Efficiency in LLMs: A Reviewcited by 12
  5. 2024LightTransfer: Your Long-Context LLM is Secretly a Hybrid Model with Effortless Adaptationcited by 11
  6. 2025ZSMerge: Zero-Shot KV Cache Compression for Memory-Efficient Long-Context LLMscited by 8
  7. 2026DualMap: Enabling Both Cache Affinity and Load Balancing for Distributed LLM Servingcited by 8
  8. 2025Rethinking Key-Value Cache Compression Techniques for Large Language Model Servingcited by 7
  9. 2025SemShareKV: Efficient KVCache Sharing for Semantically Similar Prompts via Token-Level LSH Matchingcited by 6
  10. 2026Enhancing Instruction Following of LLMs via Activation Steering with Dynamic Rejectioncited by 4
  11. 2025HCAttention: Extreme KV Cache Compression via Heterogeneous Attention Computing for LLMscited by 3
  12. 2026Adaptive Layer Selection for Layer-Wise Token Pruning in LLM Inferencecited by 3
9 more
  1. 2026ResKV: Reconstructing Omitted Attention Contributions for Fixed-Budget KV Cache Compressioncited by 3
  2. 2024Batch-Max: Higher LLM Throughput using Larger Batch Sizes and KV Cache Compressioncited by 0
  3. 2025BaKlaVa -- Budgeted Allocation of KV cache for Long-context Inferencecited by 0
  4. 2026Whole-Piece Training for Symbolic Music Language Models via Full-Horizon Compressed Recurrencecited by 0
  5. 2026WindowQuant: Mixed-Precision KV Cache Quantization based on Window-Level Similarity for VLMs Inference Optimizationcited by 0
  6. 2026From Tensor Buffer to Distributed Memory Hierarchy: A Survey of KV Cache Management for LLM Servingcited by 0
  7. 2026HeadWiseKV: Budgeted Per-Head Cache Residency for Hybrid Long-Context Language Modelscited by 0
  8. 2026KV-Kaizen: Learning Context-Adaptive Cache Compression Choicescited by 0
  9. 2026JevSpawn: Adaptive Agentic Inference through Compositional Action Spacescited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2025KVCompose: Efficient Structured KV Cache Compression with Composite Tokens
  2. 2026KV Cache Optimization Strategies for Scalable and Efficient LLM Inference
  3. 2024MiniCache: KV Cache Compression in Depth Dimension for Large Language Models
  4. 2025KV Pareto: Systems-Level Optimization of KV Cache and Model Compression for Long Context Inference
  5. 2024Get More with LESS: Synthesizing Recurrence with KV Cache Compression for Efficient LLM Inference
  6. 2026C2KV: Compressed and Composable KV Cache Reuse for Efficient LLM Inference
  7. 2025KeepKV: Achieving Periodic Lossless KV Cache Compression for Efficient LLM Inference
  8. 2026KVSculpt: KV Cache Compression as Distillation