atlas

Research map / Architectures and efficiency / Attention and transformers

ShadowKV: KV Cache in Shadows for High-Throughput Long-Context LLM Inference

ICML 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 ShadowKV, a long-context LLM inference system that stores low-rank pre-RoPE keys and offloads values to CPU, using chunk-level landmarks and static outlier chunks for accurate sparse decoding, achieving up to 3.04x throughput gain on A100.

Problem

High-throughput long-context LLM inference is limited by the growing KV cache, which consumes GPU memory and must be fetched during decoding; existing eviction and sparse attention methods lose accuracy, fail to reduce memory, or incur CPU-fetch latency.

Approach

Pre-RoPE keys are exceptionally low-rank, so the system keeps a rank-160 SVD projection of keys on GPU, offloads values to CPU, reconstructs selected keys on the fly, and selects chunks via mean-key landmarks plus a small set of GPU-resident outlier chunks.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use ShadowKV instead of Quest (V)Llama-3-8B-1M · RULER 128K (Avg.)accuracy: 83.99 -> 86.88Helped
Use ShadowKV instead of Quest (V)GLM-4-9B-1M · LongBench >4K tokens (Avg.)score: 43.68 -> 47.89Helped
Use ShadowKV instead of full attentionLlama-3.1-8B · Generation, 122K contextthroughput (tokens/s): 80.78 -> 245.90; 3.04×Helped
Add MInference prefill to ShadowKV (ablation)Llama-3-8B-1M · RULER with MInference, Avg.accuracy: 81.98 -> 82.04No clear effect
Add outlier chunks rather than using 0 (ablation)ShadowKV on Llama-3-8B-1M · RULER 128K (Avg.)accuracy: 74.05 -> 86.88Helped
Increase outlier chunks from 1 to 48 (ablation)ShadowKV on Llama-3-8B-1M · RULER 128K (Avg.)accuracy: 85.01 -> 86.88Helped
Increase chunk size beyond eight (ablation)ShadowKV · long-context tasksaccuracyHurt
Increase pre-RoPE key rank up to approximately 160 (ablation)ShadowKV · long-context tasksaccuracyHelped
Increase pre-RoPE key rank beyond approximately 160 (ablation)ShadowKV · long-context tasksaccuracyNo clear effect
Project generated-token keys into the prefill low-rank space (ablation)ShadowKV on Llama-3-8B-1M · RULER 128K (Avg.)accuracy: 86.88 -> 86.23Hurt
Project generated-token keys into the prefill low-rank space (ablation)ShadowKV · LongBench >4K tokensscore: 39.94 -> 40.36; 48.24 -> 48.11; 48.96 -> 47.97; 36.85 -> 36.96Mixed

Surprising findings

Limitations

Experimental setup

Datasets: PG-19

Benchmarks: RULER LongBench Needle In A Haystack InfiniteBench

Metrics: accuracy throughput (tokens/s) latency (ms) memory savings

Baselines: Quest Loki InfiniGen Full Attention SnapKV StreamingLLM

Builds on: Quest InfiniGen Loki StreamingLLM MInference

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