NVIDIA新研究:KV缓存可在模型间迁移,跳过预填充提速最高25倍
NVIDIA researchers did it again!
做LLM推理优化的同学必看,这是首个免训练的跨模型KV缓存迁移方案,直接解决模型切换时缓存失效的痛点,赶紧读论文验证一下效果。
NVIDIA researchers did it again!
They found a way to make KV cache transferable between models.
The target model skips prefill entirely, and the conversion runs 2.7 to 25x faster than processing the context again.
Let's understand why this is so important today.
LLM APIs are stateless, so every turn sends the entire conversation back to the model. The model reads all of it again before writing a single new token, and all of it is billed as input.
Prompt caching allows Anthropic and other providers to hold the KV cache for a stable prefix and bill a hit at roughly 10% of the base input rate, because the compute was already done once.
The 90% reduction is one of the largest lever in LLM serving, which is why so much production work goes into keeping prefixes byte-stable.
But the cache only works on the model that produced it. Keys and values are produced from that model's weights, so no other model can read them.
In pratice, the constraint shows up in LLM routing. If the traffic is shifted to a different model for cost/capability reasons, the accumulated KV cache becomes invalid.
As a result, the accumulated context has to be processed from scratch, and it's billed at full rate.
NVIDIA's recent paper treats this as a representation problem.
Prefill's only output is the KV cache, so to move KV between models, we need to convert one model's cache into the format the other expects.
They first checked whether the conversion has any structure worth exploiting.
They found that moving from Qwen3 14B to 32B, a plain linear regression from a single source layer reconstructed 56% of the variance in the target model's keys.
The two models obviously may have different layer counts, so there is no natural one-to-one pairing between them.
For each target layer they rank every source layer by how well it predicts that layer, then feed the top eight in together, which takes the reconstruction to 79%.
The mapper itself has three parts:
> Each target layer and head gets its own independent linear map, solved in one closed-form step rather than by gradient descent.
> The cross-layer selection described above is the second part, and their ablation shows it carries the most weight of the three.
> Keys also carry a position-dependent rotation from RoPE. They strip that rotation, fit the map in position-free space, then re-apply the target model's rotation at inference.
Across six pairs from Qwen3, Llama 3.1 and Ministral 3, four retain 73 to 98% of the receiving model's standalone accuracy, and the conversion runs 3-25x faster than processing the context again.
Prior work on cross-model KV reuse exists, but it either trains a neural adapter per pair or requires both models to be architecturally identical.
This is probably the first version that is closed-form and training-free, so a lot of it is still open research.
Every pair tested belongs to one family, so it works on Qwen to Qwen and Llama to Llama.
Cross-family transfer is listed as future work.
All six pairs mentioned above also happen to share KV head count and per-head dimension across scales. Mismatched head configurations are currently untested.
The researchers scoped this to dense full-attention only, so sliding-window and attention-recurrent hybrids still need work.
Here's the paper: https://arxiv.org/abs/2608.03893
Plenty of work is yet to be done. Still, the constraint being solved is genuine.
Every model swap currently invalidates the full KV that was already paid for, and this is the first result showing that work might be recoverable without training anything extra.
That said, all of this only matters because of what the KV cache is doing in the first place.
I wrote a first-principles breakdown of it, covering why the model stores keys and values at all, why the cache grows with every token, and what generation speed looks like with and without it.
Read it below.
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力