atlas

Research map / Architectures and efficiency / Quantization

MiniCache: KV Cache Compression in Depth Dimension for Large Language Models

NeurIPS 2024 · Architectures and efficiency › Quantization · approach: KV cache quantization · 14 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.

MiniCache compresses KV caches across adjacent layers in the middle-to-deep depth of LLMs by SLERP-merging direction vectors while keeping per-token magnitudes and retaining highly distinct tokens, training-free and orthogonal to quantization.

Problem

KV cache memory grows linearly with sequence length and batch size, limiting long-context and batched LLM inference; prior compression works focus on intra-layer redundancy (quantization, token eviction) and ignore inter-layer redundancy.

Approach

Observes that KV states of adjacent middle-to-deep layers are highly similar; merges paired layers' KV caches via spherical linear interpolation of normalized direction vectors, stores per-token magnitudes to restore norms, and keeps a small set of highly dissimilar tokens unmerged.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use MiniCache instead of full cacheLLaMA-2-7B-Chat · LongBenchAverage: 36.41 -> 35.44Hurt
Use MiniCache instead of KIVI-2LLaMA-2-7B-Chat · LongBenchAverage: 31.51 -> 35.44Helped
Use MiniCache instead of full cacheLLaMA-2-13B-Chat · LongBenchAverage: 32.71 -> 32.61No clear effect
Use MiniCache instead of full cacheMistral-7B · LongBenchAverage: 37.33 -> 35.75Hurt
Use MiniCache instead of full cacheMistral-7B-Instruct · LongBenchAverage: 48.32 -> 46.99Hurt
Use MiniCache instead of KIVI-2Mistral-7B-Instruct · LongBenchAverage: 43.74 -> 46.99Helped
Add 4-bit MiniCache rather than use the FP16 full-cache baselineLLaMA-2-7B on ShareGPT batch serving · ShareGPTThroughput: approximately 5×Helped
Add 4-bit MiniCache rather than use 2-bit KIVILLaMA-2-7B on ShareGPT batch serving · ShareGPTThroughput: 1.29× higher throughputHelped
Set token retention threshold γ to 0.05 instead of 0 (ablation)MiniCache with LLaMA-2-7B · COQAscore: 0.603 -> 0.647Helped
Set token retention threshold γ to 0.05 instead of 0.01 (ablation)MiniCache with LLaMA-2-7B · COQAscore: 0.620 -> 0.647Helped
Set token retention threshold γ to 0.05 instead of 0.02 (ablation)MiniCache with LLaMA-2-7B · COQAscore: 0.630 -> 0.647Helped
Set token retention threshold γ to 0.1 instead of 0.05 (ablation)MiniCache with LLaMA-2-7B · COQAscore: 0.647 -> 0.643Hurt

Surprising findings

Limitations

Experimental setup

Datasets: ShareGPT COQA GSM8K TruthfulQA LongBench COPA MathQA OpenBookQA PIQA RTE WinoGrande XSUM

Benchmarks: GSM8K COQA TruthfulQA LongBench ShareGPT COPA MathQA OpenBookQA PIQA RTE WinoGrande XSUM

Metrics: accuracy compression ratio peak memory decoding throughput ROUGE

Baselines: FP16 full cache RTN SmoothQuant KIVI-2 H2O average merging

Builds on: SLERP weight normalization KIVI DoRA

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