WakeKV: Reactive, Reversible KV Residency for Heads That Change Their Minds
Organizations: UC San Diego
Abstract
Most KV-cache compression methods classify attention heads once, either offline or during prefill, and keep this classification fixed throughout generation. Across three models (1.5B-8B) and three regimes (needle retrieval, long chain-of-thought, and multi-turn recall), we measure head behavior on four model-regime combinations and find that most heads change their reading behavior at least once during generation. We introduce WakeKV, a reactive residency policy that moves cooling heads to a recoverable CPU reservoir rather than freezing or permanently evicting their state. At matched memory or budget, WakeKV consistently improves miss rate over frozen classification and destructive eviction, evaluated across five model-regime combinations and over three cited baselines (SnapKV, uniform R-KV, and ReasonAlloc) across four eligible combinations. A FlexiCache/vLLM implementation on Mistral-7B confirms the benefit on real hardware, improving throughput while retaining LongBench quality.
Figures & tables
| Comparison (matched memory or budget) | Coverage | WakeKV wins |
|---|---|---|
| vs. Frozen, equal memory | 5 model/regime | 17/17 |
| vs. Evict, equal budget | 5 model/regime | 19/20 |
| vs. SnapKV/R-KV/ReasonAlloc, equal memory | 4 model/regime † | 32/32 |
| Config | Rerank int. | Gen tok/s | vs stock | LongBench % |
|---|---|---|---|---|
| Stock FlexiCache | 16 (native) | 114.4 | 1.00 | 100 |
| Reactive (WakeKV) | 1 | 153.6 | 1.34 | 97.4 |
| Reactive | 2 | 193.3 | 1.69 | 97.1 |
| Reactive | 4 | 226.3 | 1.98 | 99.1 |
| Reactive | 8 | 254.2 | 2.22 | 97.9 |
| Reactive | 266.6 | 2.33 | 95.0 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Model/regime | Frozen | Reactive | Evict | SnapKV | R-KV | ReasonAlloc | Reactive mem | |
|---|---|---|---|---|---|---|---|---|
| Qwen-3B/multiturn | 8 | 0.491 | 0.631 | 0.651 | 0.428 | 0.163 | 0.163 | 4,608 |
| 16 | 0.294 | 0.300 | 0.369 | 0.247 | 0.093 | 0.090 | 9,187 | |
| 32 | 0.116 | 0.010 | 0.025 | 0.201 | 0.010 | 0.009 | 17,373 | |
| 64 | 0.110 | 0.000 | 0.000 | 0.201 | 0.000 | 0.000 | 18,621 | |
| Qwen-3B/NIAH | 8 | 0.403 | 0.655 | 0.760 | 0.499 | 0.250 | 0.250 | 4,608 |
| 16 | 0.276 | 0.409 | 0.617 | 0.429 | 0.179 | 0.177 | 9,209 |
| Regime | Model | Adj. Jaccard | Persistently unstable | Ever drifted ( 1 event) |
|---|---|---|---|---|
| NIAH | Qwen2.5-3B | 0.53 (cont.) | 0.064 | 0.63 |
| CoT | R1-Distill-1.5B | 0.82 (bin.) | 0.023 | 0.85 |
| Multi-turn | Qwen2.5-3B | 0.79 (bin.) | 0.085 | 0.76 |
| CoT | R1-Distill-8B | 0.93 (bin.) | 0.042 | 0.79 |
KV-Cache Management
Key-value (KV) cache management reduces and coordinates Transformer attention state to make long-context inference faster and more memory-efficient.
See all 201 papers