Cross-Model KV Cache Transfer in LLM Families: A Closed-Form Linear Mapping for Prefill Reuse
Summary
Shows within-family matched-KV pairs (shared KV head count and head dim) have substantial linear structure: on Qwen3 14B->32B one source layer explains 56%/32% of target key/value variance, 79%/65% with multiple layers. A closed-form per-head ridge mapper with top-k cross-layer source selection and RoPE-stripped content-space keys retains 73-98% of standalone-prefill accuracy on four of six pairs (Qwen3, Llama 3.1, Ministral 3) and is 2.7-25x faster than re-prefill; two Ministral pairs collapse and a nonlinear MLP recovers up to +37 pp HellaSwag. Attention-output cosine predicts retention better than reconstruction R^2.
- Venue
- arXiv / NVIDIA
- Source
- arxiv
- Access
- free
- License
- CC BY 4.0
- License family
- Permissive
- Language
- en
- Purpose
- Skip re-prefill when swapping models in a family by mapping the source KV cache into the receiver's expected format
- Scale
- Six matched-KV pairs; calibration 500 FineWeb-Edu sequences x 1024 tokens (~128k tokens/head); mapper 1.01-3.36B params (4-12 GB); eval ARC-C/HellaSwag/WinoGrande/MMLU/GSM8K plus CoQA multi-turn
- Used for
- Unknown
- Time period
- 2026-08-04 (arXiv 2608.03893 v1)
- Author type
- human
- Added
- Aug 14, 2026
- Verified
- Aug 14, 2026
- Research status
- done
- Found via
- #random-papers
From the source
- Published
- Aug 4, 2026
- arXiv categories
- cs.LG
- Citations
- 9 (4 influential)
- References
- 29
Abstract (from arXiv)
Production deployments often swap between different-sized models in a family for cost-quality cascading, mid-conversation switching, and routing, and each swap forces the receiver to repay the prefill from scratch. We propose cross-model KV cache transfer, where the receiver reuses the source's KV cache, skipping prefill. We find that cross-model KV has substantial linear structure across matched-KV pairs, where source and target share KV head count and per-head dimension. On Qwen3 14B->32B, one source layer explains 56% of variance in the target's keys and 32% in values, rising to 79% and 65% with multiple source layers. Building on this, we design a closed-form ridge mapper that operates per head and proceeds in three steps. First, for each target layer we select the top-k most predictive source layers and concatenate their KV as input. Second, we strip RoPE from the keys before mapping, so the fit is position-free and reusable across context lengths. Third, we fit ridge regression on a small calibration set of 500 FineWeb-Edu sequences of 1,024 tokens each. Surprisingly, across six pairs in three families, this linear mapper retains 73-98% of the receiver's standalone-prefill accuracy on four pairs, while two degrade sharply. A nonlinear MLP recovers up to +37 pp HellaSwag retention on the failures. The mapper runs 2.7-25x faster than re-prefill and remains stable across multi-turn handoff, making cross-model KV cache transfer practical.
Tags
Topics
LLM serving, KV cache, inference
Research notes
- Primary: arxiv abs (CC BY 4.0, cs.LG). NVIDIA. No official code on abs; HF paper page 1 upvote with two unofficial linked models. Discord posted abs link.
Cited by, within this collection
Similar entries
- Paper Full-Pipeline Inference Optimization for MiMo-V2.5 Series: Pushing Hybrid SWA Efficiency to the Limit
- Other Shard: getting to 10x KV cache compression
- Paper WeDLM: Reconciling Diffusion Language Models with Standard Causal Attention for Fast Inference
- Code n8loom
- Idea KV cache as GPU-memory bottleneck in Transformer serving (GQA/MQA, quantization, sliding window)
- Thread Scaling KV Cache Compression to Frontier Models (X thread by @RampLabs)