KV Packet: Recomputation-Free Context-Independent KV Caching for LLMs
Organizations: Technical University of Munich Munich, Germany · Technical University of Darmstadt Darmstadt, Germany · Zhejiang University Hangzhou, China · Technische Universität Ilmenau Ilmenau, Germany
Abstract
Large Language Models (LLMs) rely heavily on Key-Value (KV) caching to minimize inference latency. However, standard KV caches are context-dependent: reusing a cached document in a new context requires recomputing KV states to account for shifts in attention distribution. Existing solutions such as CacheBlend, EPIC, and SAM-KV mitigate this issue by selectively recomputing a subset of tokens; however, they still incur non-negligible computational overhead (FLOPs) and increased Time-to-First-Token (TTFT) latency. In this paper, we propose KV Packet, a recomputation-free cache reuse framework that treats cached documents as immutable ``packets'' wrapped in light-weight trainable soft-token adapters, which are trained via self-supervised distillation to bridge context discontinuities. Experiments on Llama-3.1 and Qwen2.5 demonstrate that the proposed KV Packet method achieves near-zero FLOPs and lower TTFT than recomputation-based baselines, while retaining F1 scores comparable to those of the full recomputation baseline.
Figures & tables
| Evaluation Dataset | ||||
| Training Dataset | Biography | HotpotQA | MusiQue | NIAH |
| No Recompute | 0.06 | 0.24 | 0.01 | 0.39 |
| Biography | 0.96 | 0.18 | 0.16 | 0.44 |
| HotpotQA | 0.88 | 0.44 | 0.39 | 0.36 |
| MusiQue | 0.87 | 0.36 | 0.37 | 0.34 |
| Needle-in-a-Haystack (NIAH) | 0.54 | 0.28 | 0.07 | 0.80 |
KV Caching
Key-value (KV) caching reuses Transformer states to speed generation while managing memory and data movement.
See all 281 papers