atlas

Research map / Architectures and efficiency / Attention and transformers

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

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: KV cache eviction and compression · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes SqueezeAttention, a 2D KV-cache compression method that reallocates per-layer cache budgets using cosine-similarity-based layer importance clustering, combined with existing sequence-wise eviction policies.

Problem

KV-cache compression methods for LLM inference allocate the same token budget to every attention layer, which is suboptimal because layers differ in importance.

Approach

Measure each layer's importance during prefill by the cosine similarity between hidden states before and after self-attention, cluster layers into three groups with KMeans, and shift budget from less important layers to important ones while keeping the total budget fixed; any sequence-wise eviction policy can then be applied per layer.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add layer-wise KV-budget reallocation on top of Sliding WindowMistral-7B · Mistral-7B, batch size 32, 512 + 1024throughput (token / s): 404.5 -> 496.5Helped
Add layer-wise KV-budget reallocation on top of Sliding WindowMistral-7B · Mistral-7B, batch size 64, 512 + 1024throughput (token / s): 512.2 -> 682.7Helped
Add layer-wise KV-budget reallocation on top of StreamingLLMLlama2-7B · Llama2-7B, batch size 32, 512 + 1024throughput (token / s): 113.7 -> 143.0Helped
Add layer-wise KV-budget reallocation on top of StreamingLLMLlama2-70B · Llama2-70B, batch size 64, 256 + 512throughput (token / s): OOM -> 170.7Helped
Add layer-wise KV-budget reallocation (ablation)SqueezeAttention · Mistral-7B, SAMSUMROUGE-L: 15.7; 34.01; 37.26; 37.69; 27.41; 26.29; 11.11; 10.48; 8.72; 9.07Mixed
Set p to 0.4 rather than p=1.0 (ablation)SqueezeAttention on Mistral-7B · SAMSUMROUGE-L: 9.07 -> 37.69Helped
Set p to 0.1 rather than p=0.4 (ablation)SqueezeAttention on Mistral-7B · SAMSUMROUGE-L: 37.69 -> 15.7Hurt

Surprising findings

Limitations

Experimental setup

Datasets: CNN/Daily Mail XSUM SAMSUM NarrativeQA TriviaQA LongBench

Benchmarks: CNN/Daily Mail XSUM SAMSUM NarrativeQA TriviaQA LongBench

Metrics: Rouge-2 Rouge-L F1 memory usage throughput (token/s) prefilling time

Baselines: Heavy-Hitter Oracle (H2O) Sliding Window Attention StreamingLLM Full Cache

Builds on: H2O StreamingLLM FastGen Early-exiting LLM

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy