KV Packet: Recomputation-Free Context-Independent KV Caching for LLMs
Chuangtao Chen, Grace Li Zhang, Xunzhao Yin, Cheng Zhuo, Bing Li, Ulf Schlichtmann
NeurIPS page · OpenReview · Open on the map
Category: Efficient LLM Inference & Training › KV Cache Optimization · Type: new method · Keywords: KV caching, context-independent, LLM inference, recomputation-free, soft-token adapters
Areas: Memory › Model Memory Optimization › KV Cache Optimization; Long Context › Long-context mechanisms › KV cache eviction
Summary
KV Packet introduces a recomputation-free cache reuse framework that wraps cached documents in trainable soft-token adapters to enable context-independent KV caching for LLMs.
Explained to a 5-year-old
Large language models keep notes while they talk to help answer questions quickly. These notes, called key-value caches, only work for one conversation, so starting a new chat forces the model to make new notes. Some recent tricks try to reuse old notes, but they still need a lot of computer work. The new method wraps the old notes into small packets that can be used in any conversation without making new notes. This lets the models answer faster and use less computer power.
Explained to a 5-year-old, longer
Large language models are computer programs that can write and talk like people. To answer questions quickly, they remember important bits of information in something called a key-value cache. This memory works only for the same conversation, so if you start a new chat, the model has to make fresh notes. Reusing old notes in a new chat would be faster, but the model would give wrong answers because the notes depend on the old context. Some recent ideas try to fix this by recomputing only part of the notes, but that still costs a lot of computer time. The new approach treats the old notes as small, sealed packets that do not change. Inside each packet, a tiny trainable part helps the model adjust the old notes for a new conversation. This trainable part is learned by a self-supervised process that copies knowledge from the full notes. Because the packets are immutable, the model can reuse them without any recomputation. This means the model can answer questions faster and uses almost no extra computer power. The method works for popular models like Llama-3.1 and Qwen2.5, keeping their answer quality high. As a result, running these models on limited hardware becomes easier and cheaper.
For a technical reader
Traditional KV caching stores attention keys and values per token, but these states are tied to the specific context in which they were generated. When the same cached tokens are reused in a new context, the attention distribution changes, requiring recomputation of the KV states. Existing solutions mitigate this by recomputing a subset of tokens, which still adds computational overhead and increases time-to-first-token latency. The proposed framework packages cached documents as immutable packets and attaches lightweight trainable adapters that are distilled to bridge context shifts without recomputation. This results in near-zero FLOPs for reuse and lower TTFT while preserving the original model’s performance, making it attractive for efficient LLM inference.
Problem
Standard KV caches are context-dependent, meaning that reusing a cached document in a new context requires recomputing KV states to account for shifts in attention distribution, leading to extra computation and latency.
Method
The approach treats cached documents as immutable packets wrapped in lightweight trainable soft-token adapters, which are trained via self-supervised distillation to bridge context discontinuities.
Results
The approach achieves near-zero FLOPs and lower TTFT compared to recomputation-based baselines while retaining F1 scores comparable to full recomputation.
Contributions
It introduces a recomputation-free cache reuse framework that makes KV caching context-independent, eliminating the need for token recomputation and reducing inference latency.
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction