atlas

Research map / Architectures and efficiency / Attention and transformers

Model Tells You What to Discard: Adaptive KV Cache Compression for LLMs

ICLR 2024 · Architectures and efficiency › Attention and transformers · approach: KV cache eviction and compression · 5 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 FastGen, a training-free adaptive KV cache compression method that profiles each attention head during prompt encoding and assigns it a compression policy (special tokens, punctuation, locality, frequency, or full cache) to cut KV memory while keeping generation quality.

Problem

The KV cache of autoregressive LLMs grows linearly with generation length and consumes large GPU memory; existing compression methods either need retraining or apply one fixed eviction policy to all heads, ignoring that attention heads have different structures.

Approach

Profile each attention head's attention map once during prompt encoding, choose the minimum-memory combination of compression policies (special tokens, punctuation, frequency, locality, full) that recovers a target fraction of attention scores, and build a head-specific KV cache without any fine-tuning.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add the special-token policy to the adaptive policy set (ablation)FastGen · AlpacaEvalwin rate: 47.64% -> 49.75%Helped
add the punctuation policy to the adaptive policy set (ablation)FastGen · AlpacaEvalwin rate: 49.56% -> 49.75%No clear effect
add the frequent-token policy to the adaptive policy set (ablation)FastGen · AlpacaEvalwin rate: 46.08% -> 49.75%Helped
add the locality policy to the adaptive policy set (ablation)FastGen · AlpacaEvalwin rate: 49.06% -> 49.75%Helped
use special → frequent → local → punctuation instead of special → punctuation → frequent → local (ablation)FastGen · AlpacaEvalwin rate: 49.75% -> 47.64%Hurt
change the frequency-policy ratio from 0.3 to 0.1 (ablation)FastGen · AlpacaEvalgeneration qualityNo clear effect

Surprising findings

Limitations

Experimental setup

Datasets: LIMA Open Assistant (oasst1) GSM8K HumanEval Natural Questions TriviaQA AlpacaEval

Benchmarks: GSM8K HumanEval NQ TQA AlpacaEval

Metrics: F1 Pass@1 win rate vs full cache pruned KV cache ratio end-to-end latency GPU memory

Baselines: H2O (local+frequent) Scissorhands Frequency-only KV cache Local-only KV cache Full KV cache DeepSpeed Inference Hugging Face Accelerate

Builds on: H2O Scissorhands DeepSpeed Inference Hugging Face Accelerate

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