Updating an LLM adapter should not require replaying the full interaction history of every active session. Yet reusing key-value (KV) cache entries computed under an earlier version mixes model versions, while full-history re-prefill becomes increasingly costly as histories and session fleets grow. We introduce LiveLora, a model-runtime co-design for exact final-block KV cache migration. Frozen lower decoder blocks and fixed K/V adapter down-projections preserve each token's base projections and low-rank coordinates across adapter versions. The runtime reconstructs candidate K/V, reevaluates the latest token through the final block, and commits the adapter, cache, and next-token logits together. We prove continuation equivalence to full-history re-prefill in exact arithmetic under the stated model assumptions. On Qwen2.5-3B-Instruct, median paired publication speedups over full-history re-prefill average 68.98× across five runs for 32 active sessions with 8K tokens each. Serving benchmarks show approximately 4.8% decoding overhead relative to native cached decoding. Compared with retained-boundary replay, compact retention gives a 3.42× reduction in additional session storage at 8K, with similar measured publication-plus-decoding cost. LiveLora allows persistent LLM agents to adopt new adapter versions without replaying their full interaction histories.
Figures & tables
Figure 1: Fixed- A final-block cache migration. (a) Retain invariant base projections and low-rank coordinates. (b) Reconstruct candidate K/V. (c) Reevaluate the latest token against the rebuilt history to obtain new logits. Lower-block caches are reused; the O-to-MLP stage includes residual connections and normalization.
Figure 2: Coherent adapter publication. K/V reconstruction and latest-token reevaluation run privately. The coordinator validates captured references and publishes the adapter, cache, and logits together; stale captures are rejected.
Representation
Retained history bytes
Candidate-version work
Compact, fixed A
bn(dK+dV+rK+rV)
Reconstruct K/V; reevaluate latest token
Trainable A
bn(dK+dV+d)
Recompute coordinates and K/V; reevaluate latest token
Normalized inputs
bnd
Recompute base and adapter K/V; reevaluate latest token
Boundary residuals
bnd
Replay the final block over the history
Table 1: Retention choices for exact publication. Counts are dominant per-session history terms for n tokens and b bytes per scalar; the conventional KV cache, metadata, and latest-token state are additional. The trainable- A ablation uses the original publication protocol (Appendix E ).
Figure 3: Original five-seed publication study. (a) Mean within-run median publication latency. (b) Mean within-run median and 5th-percentile paired re-prefill/migration speedups. (c) Publication, snapshot, and retained-state ratios relative to fixed- A rank 32 at 8K; trainable- A retains normalized inputs. Error bars are two-stage hierarchical-bootstrap 95% intervals over five 30-update runs; byte ratios are exact tensor counts. This study uses the original latest-token kernel and publication timer scope described in Section 5 .
Latency (ms/token)
Added cost versus
Context
Native
Guarded
LiveLoRA
Native
Guarded
2K
20.851
21.699
21.855
4.81%
0.72%
8K
20.829
21.642
21.818
4.75%
0.81%
32K
21.604
22.506
22.659
4.88%
0.68%
Table 2: Compact-retention decoding with native SDPA. Values are means across three seeds, each with 48 measured tokens per initial context; BF16, one session. Native cached decoding is a diagnostic baseline. Guarded direct serving includes the same coordinator safeguards as LiveLoRA .
Publication (ms/update)
Publication + decoding (ms)
Tokens/update
LiveLoRA
Boundary
Full
LiveLoRA
Boundary
Full
32
9.66
15.11
155.82
1,429.29
1,429.25
1,706.36
128
10.55
15.47
156.87
5,662.15
5,628.49
5,892.03
Table 3: Matched compact-retention publication and serving at 8K. Publication columns are mean milliseconds per update. Total columns sum two measured publications and 64 or 256 generated tokens; three equally weighted seeds in BF16. All methods include coordinator safeguards and commit. Initial prefill, training, warmups, and diagnostics are outside these totals.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Tokens
Sessions
LiveLoRA ms
Re-prefill ms
Median speedup
5th-pctl. speedup
2,048
1
17.15 [16.31,17.93]
40.78 [40.40,41.10]
2.38 [2.29,2.48]
2.22 [2.19,2.27]
8,192
1
17.17 [15.94,18.29]
150.05 [149.40,150.69]
8.79 [8.23,9.45]
8.36 [7.89,8.90]
16,384
1
17.59 [16.75,18.20]
347.19 [346.00,348.36]
19.78 [19.10,20.77]
18.01 [17.36,18.60]
32,700
1
18.03 [17.68,18.34]
919.21 [914.45,923.63]
51.06 [50.10,52.07]
46.09 [44.81,47.80]
8,192
8
29.16 [28.63,29.63]
1,128.21 [1,121.70,1,135.47]
38.70 [38.10,39.39]
36.51 [35.60,37.12]
8,192
32
65.71 [63.80,67.60]
4,534.46 [4,511.63,4,557.90]
68.98 [67.08,71.39]
62.96 [60.61,66.06]
Appendix
Table 4: Publication scaling in the original fixed-history study. Latencies average within-run medians; speedups average within-run medians and 5th percentiles of paired re-prefill/ LiveLoRA ratios. Brackets are two-stage hierarchical-bootstrap 95% CIs. Each ordinary case uses five 30-update runs; † marks five 100-update runs.
Figure 4: Cache-coherence diagnostics. (a) Custom-kernel versus reference top-1 disagreement. (b) Stale versus migrated final-block K/V MAE. (c,d) Logit MAE and top-1 disagreement after a common reference-selected token using SDPA; migrated and reference outputs coincide in these tests. Stale-state error bars are two-stage hierarchical-bootstrap 95% CIs. Shading marks the 100-update stress case; ordinary cases use 30 updates per run (five runs each).
Case
KV cache MiB
LiveLoRA MiB
Steady OH
Decode OH [95% CI]
2K × 1
72.0
76.3
6.04%
21.94% [20.34,23.38]
8K × 1
288.0
299.2
3.90%
22.33% [20.96,23.62]
16K × 1
576.0
596.4
3.55%
22.25% [21.31,23.40]
32.7K × 1
1,149.6
1,188.3
3.37%
19.17% [18.13,20.11]
8K × 8
2,304.0
2,381.6
3.37%
24.24% [22.81,25.51]
8K × 32
9,216.0
9,521.2
3.31%
24.02% [22.46,25.51]
Appendix
Table 5: Memory and decoding overhead in the original fixed-history study. Analytical memory excludes training state, workspaces, and caller-owned candidates; percentages use unrounded byte counts. Decode overhead for migration-state capture averages within-run median percentage overheads over 20 cached-decoding steps relative to direct cached evaluation. Brackets are two-stage hierarchical-bootstrap 95% CIs.
LiveLoRA , normalized
Retained boundary
Publication (ms/update)
6.55 [5.65, 8.29]
15.95 [14.95, 17.09]
Decoding (ms/token)
19.45 [18.34, 20.90]
19.42 [18.38, 20.80]
Publication + decoding (ms)
19,940.61
19,945.65
Final retained state (MiB)
36.47
36.46
Appendix
Table 6: Normalized-input retention at cadence 256; three seeds. Each total sums four publications and 1,024 decoded tokens. Brackets are seed ranges. Initial prefill, training, warmups, and diagnostics are excluded.
Large language models rely on KV caching to reduce repeated prefill computation in long context and interactive applications. As lightweight adapters evolve, cached states reflect earlier versions, so stale reuse distorts current model outputs, while complete affected suffix recomputation restores fidelity at substantial cost. We seek minimal recomputation that recovers current adapter behavior. Existing systems track token, context, or stable adapter identity, but neither represent caches from earlier adapter versions nor distinguish update propagation from the recomputation required for behavioral recovery. To address these gaps, we introduce CacheReforge, which represents stale KV caches as layerwise mixed-version objects. It combines per-layer adapter anchors, calibrated sensitivity, accumulated drift, and executable restart boundaries to select direct reuse, bounded recomputation, or complete affected-suffix recovery. We distinguish dependency depth from the functional recomputation horizon and use cumulative tail influence to characterize when bounded recovery preserves current-model behavior. We evaluate CacheReforge on Qwen2.5-1.5B and Qwen2.5-7B with continual LoRA updates, including 16K HotpotQA and 2WikiMQA workloads. CacheReforge reduces mean KL divergence by 92.4% relative to stale reuse, while recomputing only 5.44% of layers and reducing cache-maintenance time by 93.2% relative to fresh full prefill. These results show that version-aware recovery preserves model fidelity and most KV caching gains.
LLM agents today communicate via text, which incurs considerable latency and information loss due to the need to autoregressively decode the sharer model's state and encode at the receiver model. Recent work such as Cache-to-Cache (C2C; Fu et al., 2026) seeks to exchange KV caches by learning adapters that translate sharer KV matrices to the receiver model. However, the adapters are large and expensive to train, and translate individual tokens, which requires the target context to be identical. This is unsuitable for agent communication, where the LLMs have differing context. We introduce Latent Cache Flow (LCF). To address efficiency, we observe that keys and values can be jointly translated and compressed, reducing the adapter to about 4% of C2C's size. To address differing context, we design the adapter to transmit a summary of new information that the target model does not have. Our early experiments show that a pruned 13 MB LCF adapter can be more accurate than C2C at 956 MB in shared-context settings; for different contexts, LCF improves F1 by 7.5% and Exact Match by 23% while 8.5 times faster than text-based communication.
Long-running LLM agent workflows often revise interior context spans while retaining long suffixes. Although suffix tokens remain unchanged, altered causal histories and rotary positions prevent exact reuse of their offloaded key-value (KV) states. Full suffix recomputation wastes prefill work, while indiscriminate reuse propagates stale states and full-precision restoration adds data movement. We present PatchKV, a profile-guided recovery system for suffix-preserving revisions. PatchKV decomposes adjacent context versions into an exact prefix, an updated span, and an aligned suffix. It predicts an edit-local dirty region using an offline length-conditioned drift model, augments this region with sparse nonlocal blocks selected from stored attention, and block-rounds their union into a fixed repair set. The remaining suffix blocks are restored from CPU memory using frozen per-block precision tags and a fused path for dequantization, RoPE correction, and KV-page placement. Across three models and three long-context question-answering workloads, PatchKV achieves a 2.51-3.85× speedup in mean resume time-to-first-token over full suffix recomputation and a 1.26-2.06× speedup over CacheBlend, while matching or exceeding CacheBlend's F1 score in six of nine settings and remaining within 1.36 points in the others.