SqueezeAttention: 2D Management of KV-Cache in LLM Inference via Layer-wise Optimal Budget
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
- 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMs3 Oct
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttention12 Sep
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models24 Jun
- 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Time26 May
Other references · 11
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2023Mistral 7Bcited by 3,065
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
- 2023FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPUcited by 567
- 2019Adaptive Attention Span in Transformerscited by 148
- 2023SkipDecode: Autoregressive Skip Decoding with Batching and Caching for Efficient LLM Inferencecited by 89
- 2023LLMCarbon: Modeling the end-to-end Carbon Footprint of Large Language Modelscited by 71
- 2023Dynamic Context Pruning for Efficient and Interpretable Autoregressive Transformerscited by 67
- 2020Do Transformers Need Deep Long-Range Memorycited by 24
Built on by
Citing papers per year: 2024: 3; 2025: 8; 2026: 10.
21 papers.
Sort:
By area:
- 2024PQCache: Product Quantization-based KVCache for Long Context LLM Inferencecited by 93
- 2025Cognitive Memory in Large Language Modelscited by 28
- 2025Dialogue Without Limits: Constant-Sized KV Caches for Extended Responses in LLMscited by 20
- 2025KV Cache Compression for Inference Efficiency in LLMs: A Reviewcited by 12
- 2024LightTransfer: Your Long-Context LLM is Secretly a Hybrid Model with Effortless Adaptationcited by 11
- 2025ZSMerge: Zero-Shot KV Cache Compression for Memory-Efficient Long-Context LLMscited by 8
- 2026DualMap: Enabling Both Cache Affinity and Load Balancing for Distributed LLM Servingcited by 8
- 2025Rethinking Key-Value Cache Compression Techniques for Large Language Model Servingcited by 7
- 2025SemShareKV: Efficient KVCache Sharing for Semantically Similar Prompts via Token-Level LSH Matchingcited by 6
- 2026Enhancing Instruction Following of LLMs via Activation Steering with Dynamic Rejectioncited by 4
- 2025HCAttention: Extreme KV Cache Compression via Heterogeneous Attention Computing for LLMscited by 3
- 2026Adaptive Layer Selection for Layer-Wise Token Pruning in LLM Inferencecited by 3
9 more
- 2026ResKV: Reconstructing Omitted Attention Contributions for Fixed-Budget KV Cache Compressioncited by 3
- 2024Batch-Max: Higher LLM Throughput using Larger Batch Sizes and KV Cache Compressioncited by 0
- 2025BaKlaVa -- Budgeted Allocation of KV cache for Long-context Inferencecited by 0
- 2026Whole-Piece Training for Symbolic Music Language Models via Full-Horizon Compressed Recurrencecited by 0
- 2026WindowQuant: Mixed-Precision KV Cache Quantization based on Window-Level Similarity for VLMs Inference Optimizationcited by 0
- 2026From Tensor Buffer to Distributed Memory Hierarchy: A Survey of KV Cache Management for LLM Servingcited by 0
- 2026HeadWiseKV: Budgeted Per-Head Cache Residency for Hybrid Long-Context Language Modelscited by 0
- 2026KV-Kaizen: Learning Context-Adaptive Cache Compression Choicescited by 0
- 2026JevSpawn: Adaptive Agentic Inference through Compositional Action Spacescited by 0
- 2026JevSpawn: Adaptive Agentic Inference through Compositional Action Spaces30 Sep 2026
- 2026KV-Kaizen: Learning Context-Adaptive Cache Compression Choices29 Sep 2026
- 2026HeadWiseKV: Budgeted Per-Head Cache Residency for Hybrid Long-Context Language Models2 Sep 2026
- 2026ResKV: Reconstructing Omitted Attention Contributions for Fixed-Budget KV Cache Compression31 Jul 2026
- 2026From Tensor Buffer to Distributed Memory Hierarchy: A Survey of KV Cache Management for LLM Serving30 Jun 2026
- 2026WindowQuant: Mixed-Precision KV Cache Quantization based on Window-Level Similarity for VLMs Inference Optimization4 May 2026
- 2026Enhancing Instruction Following of LLMs via Activation Steering with Dynamic Rejection6 Mar 2026
- 2026Whole-Piece Training for Symbolic Music Language Models via Full-Horizon Compressed Recurrence23 Feb 2026
- 2026DualMap: Enabling Both Cache Affinity and Load Balancing for Distributed LLM Serving6 Feb 2026
- 2026Adaptive Layer Selection for Layer-Wise Token Pruning in LLM Inference12 Jan 2026
- 2025SemShareKV: Efficient KVCache Sharing for Semantically Similar Prompts via Token-Level LSH Matching29 Sep 2025
- 2025KV Cache Compression for Inference Efficiency in LLMs: A Review8 Aug 2025
9 more
- 2025HCAttention: Extreme KV Cache Compression via Heterogeneous Attention Computing for LLMs26 Jul 2025
- 2025Cognitive Memory in Large Language Models3 Apr 2025
- 2025Rethinking Key-Value Cache Compression Techniques for Large Language Model Serving31 Mar 2025
- 2025ZSMerge: Zero-Shot KV Cache Compression for Memory-Efficient Long-Context LLMs13 Mar 2025
- 2025Dialogue Without Limits: Constant-Sized KV Caches for Extended Responses in LLMs2 Mar 2025
- 2025BaKlaVa -- Budgeted Allocation of KV cache for Long-context Inference18 Feb 2025
- 2024Batch-Max: Higher LLM Throughput using Larger Batch Sizes and KV Cache Compression7 Dec 2024
- 2024LightTransfer: Your Long-Context LLM is Secretly a Hybrid Model with Effortless Adaptation17 Oct 2024
- 2024PQCache: Product Quantization-based KVCache for Long Context LLM Inference1 Jul 2024
- 2024PQCache: Product Quantization-based KVCache for Long Context LLM Inferencecited by 93
- 2025Dialogue Without Limits: Constant-Sized KV Caches for Extended Responses in LLMscited by 20
- 2025KV Cache Compression for Inference Efficiency in LLMs: A Reviewcited by 12
- 2025ZSMerge: Zero-Shot KV Cache Compression for Memory-Efficient Long-Context LLMscited by 8
- 2026DualMap: Enabling Both Cache Affinity and Load Balancing for Distributed LLM Servingcited by 8
- 2025Rethinking Key-Value Cache Compression Techniques for Large Language Model Servingcited by 7
- 2025SemShareKV: Efficient KVCache Sharing for Semantically Similar Prompts via Token-Level LSH Matchingcited by 6
- 2025HCAttention: Extreme KV Cache Compression via Heterogeneous Attention Computing for LLMscited by 3
- 2026Adaptive Layer Selection for Layer-Wise Token Pruning in LLM Inferencecited by 3
- 2026ResKV: Reconstructing Omitted Attention Contributions for Fixed-Budget KV Cache Compressioncited by 3
- 2024Batch-Max: Higher LLM Throughput using Larger Batch Sizes and KV Cache Compressioncited by 0
- 2025BaKlaVa -- Budgeted Allocation of KV cache for Long-context Inferencecited by 0
12 most cited of 15 All 15 (JSON)
- 2026KV-Kaizen: Learning Context-Adaptive Cache Compression Choices29 Sep 2026
- 2026ResKV: Reconstructing Omitted Attention Contributions for Fixed-Budget KV Cache Compression31 Jul 2026
- 2026From Tensor Buffer to Distributed Memory Hierarchy: A Survey of KV Cache Management for LLM Serving30 Jun 2026
- 2026WindowQuant: Mixed-Precision KV Cache Quantization based on Window-Level Similarity for VLMs Inference Optimization4 May 2026
- 2026DualMap: Enabling Both Cache Affinity and Load Balancing for Distributed LLM Serving6 Feb 2026
- 2026Adaptive Layer Selection for Layer-Wise Token Pruning in LLM Inference12 Jan 2026
- 2025SemShareKV: Efficient KVCache Sharing for Semantically Similar Prompts via Token-Level LSH Matching29 Sep 2025
- 2025KV Cache Compression for Inference Efficiency in LLMs: A Review8 Aug 2025
- 2025HCAttention: Extreme KV Cache Compression via Heterogeneous Attention Computing for LLMs26 Jul 2025
- 2025Rethinking Key-Value Cache Compression Techniques for Large Language Model Serving31 Mar 2025
- 2025ZSMerge: Zero-Shot KV Cache Compression for Memory-Efficient Long-Context LLMs13 Mar 2025
- 2025Dialogue Without Limits: Constant-Sized KV Caches for Extended Responses in LLMs2 Mar 2025
12 newest of 15 All 15 (JSON)
- 2025Cognitive Memory in Large Language Modelscited by 28
- 2026Enhancing Instruction Following of LLMs via Activation Steering with Dynamic Rejectioncited by 4
- 2026Whole-Piece Training for Symbolic Music Language Models via Full-Horizon Compressed Recurrencecited by 0
- 2026HeadWiseKV: Budgeted Per-Head Cache Residency for Hybrid Long-Context Language Modelscited by 0
- 2026HeadWiseKV: Budgeted Per-Head Cache Residency for Hybrid Long-Context Language Models2 Sep 2026
- 2026Enhancing Instruction Following of LLMs via Activation Steering with Dynamic Rejection6 Mar 2026
- 2026Whole-Piece Training for Symbolic Music Language Models via Full-Horizon Compressed Recurrence23 Feb 2026
- 2025Cognitive Memory in Large Language Models3 Apr 2025
Similar, not cited
Close in wording, no citation either way
- 2025KVCompose: Efficient Structured KV Cache Compression with Composite Tokens
- 2026KV Cache Optimization Strategies for Scalable and Efficient LLM Inference
- 2024MiniCache: KV Cache Compression in Depth Dimension for Large Language Models
- 2025KV Pareto: Systems-Level Optimization of KV Cache and Model Compression for Long Context Inference
- 2024Get More with LESS: Synthesizing Recurrence with KV Cache Compression for Efficient LLM Inference
- 2026C2KV: Compressed and Composable KV Cache Reuse for Efficient LLM Inference
- 2025KeepKV: Achieving Periodic Lossless KV Cache Compression for Efficient LLM Inference
- 2026KVSculpt: KV Cache Compression as Distillation