Harness Hub
All papers

LiveLoRA: Exact KV Cache Migration Across LoRA Updates for LLM Agents

Tianyi Huang, Samuel Xu, Ivy Gu, Nathan Huang, Siqi Zhang

Verdict: Incremental

The closed-form migration is a direct consequence of LoRA-FA combined with a frozen activation boundary. The publication protocol is carefully specified. However, the headline speedup is publication-only and comes from a superseded runtime. Under matched conditions the end-to-end gains over full re-prefill are small and disappear beyond about 600 tokens per update. The method roughly ties a simple boundary-replay alternative, and the restricted adapter family is never shown to learn anything.

  • Novelty

    3 out of 5
  • Rigor

    3 out of 5
  • Reproducibility

    2 out of 5
  • Relevance to harnesses

    1 out of 5

TL;DR

LiveLoRA restricts LoRA to the final decoder block and freezes the K/V down-projections. Under that restriction, historical final-block K/V can be rebuilt in closed form after an adapter update instead of re-prefilling the history. The 68.98x headline measures publication latency only, in an older runtime with a custom latest-token kernel and at 32 sessions. In the matched single-session serving study, publication-plus-decoding savings over full re-prefill are 16.24% and 3.90%. The paper's own break-even estimate is about 600 tokens per update. The method is roughly tied with retained-boundary replay.

Adversarial review by Harness Hub · Nov 26, 2026 · read full text · Suggest a correction

Original abstract (authors’ text, select to expand)

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\times$ 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\times$ 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.

Authors’ note

Accepted at the NeurIPS 2026 Workshop AgenticOS: Co-designing Systems and ML Foundations of an OS Layer for Agentic AI

Filed underevaluationruntimeagentsllm

Summary

LiveLoRA targets active agent sessions that must switch to a new LoRA adapter version without mixing KV entries computed under old and new versions. The adapter family is constrained: - Only the final decoder block is adapted. - Final-block K/V adapters use fixed down-projections (LoRA-FA style). - Embeddings, lower blocks, all norms and the LM head stay frozen. Under these constraints, the normalized input to the final block is invariant across versions. The runtime stores, per token, the base K/V projections and the low-rank coordinates. At publication it: 1. Rebuilds final-block K/V as base plus the new up-projection times the stored coordinates. 2. Reruns the final block on the latest token to get new logits. 3. Commits adapter, cache and logits together under a process-local coordinator lock, with precommit failure atomicity. A theorem proves continuation equivalence to full re-prefill in exact arithmetic under these assumptions. Evaluation uses Qwen2.5-3B-Instruct on one H200 with Gaussian (untrained) adapter updates and random-token or constructed histories. There are three protocols with different runtime revisions: - An original five-seed publication-latency study using a custom latest-token kernel. This is the source of the 68.98x. - A revised matched serving study with native SDPA, three seeds, single session. This is the source of the 4.8% decode overhead and the end-to-end totals. - A separate normalized-input retention study. Task-level adaptation quality is explicitly not evaluated.

Key findings

  • Original study (Table 4): single-session median migration latency is 17.15 ms at 2K and 18.03 ms at 32.7K. Full re-prefill takes 40.78 ms and 919.21 ms at the same points. Median paired publication speedup is 51.06x at 32.7K and 68.98x [67.08, 71.39] for 32 sessions at 8K.
  • Revised matched serving (Table 2): LiveLoRA decoding adds 4.75-4.88% over native cached decoding and 0.68-0.81% over equally guarded direct serving. The original runtime measured 19.17%-24.24% decode overhead for state capture (Table 5).
  • Matched 8K publication at 32 tokens/update (Table 3): LiveLoRA 9.66 ms/update, boundary replay 15.11, full re-prefill 155.82. Publication-plus-decoding totals are 1,429.29, 1,429.25 and 1,706.36 ms.
  • At 128 tokens/update (Table 3), LiveLoRA's total is 5,662.15 ms. Boundary replay's is 5,628.49 ms, so LiveLoRA is slower end-to-end than boundary replay at this cadence. Full re-prefill's total is 5,892.03 ms.
  • End-to-end savings versus full re-prefill are 16.24% at cadence 32 and 3.90% at cadence 128. Totals are within 0.60% of retained-boundary replay (Section 6).
  • Compact retention stores 9.48 MiB versus 32.41 MiB for boundary replay at the initial 8K prefix, a 3.42x reduction. The normalized-input variant stores about the same as boundary replay (36.47 vs 36.46 MiB, Table 6).
  • Local break-even at 8K is about 600 tokens per update against full re-prefill and about 30 against boundary replay (Section 6, Eq. 9). With less frequent updates, LiveLoRA's per-token decoding overhead outweighs its publication savings.
  • Reusing stale K/V causes 8.0-17.3% top-1 disagreement in the scaling cases and 35.4% under the 100-update stress condition (Appendix C).

The paper at a glance

01Prefill history;store base K/Vprojections andfixed-A low-rankcoordinates at the…02Train a candidateadapter on aseparate copy03Rebuild final-blockK/V for all historyfrom stored stateand the newup-projections04Rerun the finalblock on the latesttoken to getcandidate logits05Under thecoordinator lock,verify prefixes andatomically publishadapter, cache and…
  1. Prefill history; store base K/V projections and fixed-A low-rank coordinates at the frozen final-block boundary
  2. Train a candidate adapter on a separate copy
  3. Rebuild final-block K/V for all history from stored state and the new up-projections
  4. Rerun the final block on the latest token to get candidate logits
  5. Under the coordinator lock, verify prefixes and atomically publish adapter, cache and logits
Fig. 1 — How the paper works, step by step (arXiv:2611.31105).
LiveLoRA (this paper)9.66 ms/updateRetained-boundary replay15.11 ms/updateFull-history re-prefill155.82 ms/update
Fig. 2 — Publication latency at 8K, 32 tokens/update, lower is better. Source: Table 3, arXiv:2611.31105.
Data table
Publication latency at 8K, 32 tokens/update
Methodms/update
LiveLoRA (this paper)9.66 ms/update
Retained-boundary replay15.11 ms/update
Full-history re-prefill155.82 ms/update

Why it matters

This paper is irrelevant to most harness builders. It is a serving-runtime mechanism for teams that self-host a model and push LoRA updates into live agent sessions mid-conversation. Anyone using hosted APIs, or fine-tuning offline between sessions, never encounters this problem. For the small group building online-learning agents on their own GPUs, three takeaways apply. First, reusing a stale KV cache after a weight update measurably changes outputs (8.0-17.3% top-1 disagreement). Second, a simpler alternative, retaining final-block input residuals and replaying only the final block, has nearly the same end-to-end cost. Third, by the paper's own cost model, LiveLoRA only beats full re-prefill end-to-end when updates arrive more often than about every 600 tokens at 8K. The price is a strong restriction on where adapters can be placed, and the paper never shows that such adapters learn anything useful.

Issues (9)

  • High severity

    The abstract's 68.98x is a publication-latency-only number from the original runtime at 32 sessions. That runtime used a custom latest-token kernel with only 96.0-97.9% top-1 agreement with reference (93.8% under stress), although the paper shows the migrated K/V tensors themselves match exactly. The matched, revised-runtime study measures end-to-end cost for one session only. There, savings over full re-prefill are 16.24% and 3.90%. The abstract reports the publication speedup but not these much smaller end-to-end gains. No multi-session end-to-end measurement is given.

  • High severity

    By the paper's own cost model (Eq. 9, Table 3), the 8K break-even against full re-prefill is about 600 tokens per update, and the saving already falls to 3.90% at 128 tokens/update. Persistent agents are unlikely to receive adapter updates every few hundred tokens. At realistic update intervals, the steady per-token decode overhead (4.75-4.88% vs native) probably makes LiveLoRA slower end-to-end than simply re-prefilling. The paper labels the tested cadences sensitivity points rather than deployment estimates, but it does not state this consequence.

  • High severity

    Task-level adaptation quality is never measured. Adapters are Gaussian perturbations on random-token or constructed histories. Whether final-block-only LoRA with fixed K/V down-projections can learn useful online updates is the central practical question, and it is left open.

  • Medium severity

    Against the strongest baseline, retained-boundary replay, the method has no end-to-end advantage. Totals are within 0.60%, and LiveLoRA is slower at cadence 128 (5,662.15 vs 5,628.49 ms). The only clear win is 3.42x less additional session storage, and that win disappears for the normalized-input variant (36.47 vs 36.46 MiB).

  • Medium severity

    The decode-overhead claim depends on the implementation. The original runtime measured 19.17%-24.24% decode overhead (Table 5). The abstract's 'approximately 4.8%' comes from the revised runtime. The paper itself notes that host and process variation prevents attributing absolute latency differences to a single code change.

  • Medium severity

    Baselines are limited. Full re-prefill runs as one dense, equal-length batch, with no chunked prefill or production serving engine. There is no comparison against LOCAL, the closest prior work on version-aware cache invalidation with scheduled prefill. Timer scope is asymmetric: migration includes its locked commit while full re-prefill excludes reference-state installation. This favors the baseline, but it means the two timings are not identical in scope.

  • Medium severity

    The matched serving study is small. It uses three seeds, one warmup publication and two measured publications per trace, and reports seed ranges rather than confidence intervals. In the normalized-input study, the paired saving of 5.05 ms has a seed range of -59.32 to 58.36 ms.

  • Low severity

    Exactness holds only in exact arithmetic. In BF16, the maximum logit difference versus cached continuation from full re-prefill reaches 5.59375 at cadence 128, though no greedy disagreement was observed. The paper is clear on this point, but the abstract's word 'exact' could mislead readers into expecting bitwise-identical serving.

  • Low severity

    No code URL is printed. Kernels and runtime revisions differ across the three protocols, which makes reproduction harder.

Questions for the authors

  • Can final-block-only LoRA with fixed K/V down-projections match standard LoRA on any agent online-learning task?
  • What end-to-end publication-plus-decoding cost does LiveLoRA show for 32 sessions under the revised native-SDPA runtime?
  • At update intervals of thousands of tokens, does LiveLoRA ever beat full re-prefill or boundary replay end-to-end?
  • How does it compare against LOCAL's version-tagged invalidation with scheduled prefill, and against a re-prefill baseline in a production engine with chunked prefill and paged KV?
  • How does the method interact with paged or distributed KV caches and tensor parallelism?

LLM agents alternate between inference and tool execution, repeatedly reusing their growing context across calls. Under high concurrency, their combined key-value (KV) cache working set can reach hundreds of GiB, far exceeding GPU memory capacity. As idle KV cache blocks are evicted to slower storage tiers, returning agents incur expensive retrievals that stall inference. To address this problem, we present \emph{TripleKV}, a three-tier KV cache management system that hides the delays of these retrievals. %exploits tool execution to hide these delays. In agentic workloads, the KV blocks needed by the next inference request are known in advance; only the time of their reuse is uncertain. TripleKV uses a tool-aware latency predictor to estimate when each tool call will complete and prefetches the required KV blocks from SSD into host DRAM ahead of time. Unlike GPU prefetching, this avoids reserving scarce GPU memory and interfering with concurrent inference requests. To further improve DRAM utilization, TripleKV eliminates duplication of GPU-resident blocks in DRAM, and introduces a victim-cache mechanism that refills blocks from SSD upon their eviction from GPU memory. Across data, web, and coding agents, TripleKV reduces the fraction of requests requiring critical-path SSD reads from 45--76\% to under 10\%. It also reduces P95 time to first token (TTFT) by up to 49\% compared with vLLM extended with DRAM and SSD KV-cache tiers, and achieves 1.5-7$\times$ lower P95 TTFT than recent agent-aware systems.

Shashwat Jaiswal, Chloe Alverti +6

Large Language Model (LLM) agents can handle increasingly complex tasks, navigating long trajectories of observations and actions. As these trajectories grow, key-value (KV) cache I/O and storage become the dominant cost. Trajectories can also exceed the LLM's maximum context length, requiring control over active cache growth. Prior work uses context engineering to reduce cache size by trimming or summarizing history. However, modifying the trajectory prefix invalidates subsequent cached states and triggers costly re-prefilling of retained context. Task accuracy can also suffer when too little context is retained to limit re-prefill costs. We propose cache engineering as a new scheme. It allows agents to directly control their active KV cache without modifying the trajectory or re-prefilling retained context. Specifically, agents can proactively use drop to exclude selected cache from future attention and repos to adjust retained keys' position encodings. We formalize these cache operations and identify history dependence as a serving challenge: identical token sequences can yield different cache states under different cache operation sequences, making prefix matching insufficient for correct cache reuse. Thus, we co-design the AKV serving engine. It provides a stateless interface compatible with existing serving APIs, while internally managing stateful cache reuse, eviction, and restoration. Experiments show that a tool-response rolling-drop cache policy improves average benchmark scores by 1.7 points and reduces average cost by 27.7%, compared with conventional threshold-triggered summarization. With AKV, it achieves up to 1.2x the output throughput and a 1.5x speedup in P95 request latency. Recursive self-improvement of cache policies further reduces cost by 7.1% over expert design. Our code is at https://github.com/thu-nics/AKV.

Tianyu Fu, Ruoxi Wang +7

Large language model (LLM) serving engines offload the key/value (KV) cache from GPU memory to host DRAM and SSD so multi-turn and agent requests can reuse prompt prefixes. Capacity then limits service at two levels: external tiers govern prefix reuse before eviction, while the GPU KV pool bounds concurrent long requests, and lossy compression alters KV values and outputs. LoomKV brings lossless KV compression to both external tiers (tier mode) and the GPU pool (pool mode) on an unmodified engine. Using a calibrated per-head two-level 3-bit code over BF16 high bytes (sign and upper seven exponent bits), LoomKV stores BF16 KV at 0.71 of its raw size across nine models and FP8 KV at 0.85-0.87. In tier mode, TileStream writes exact-length records with length readback off the load path, leaving tier storage, eviction, and prefetch unchanged, and decompresses fetched records straight into scattered GPU pages. In pool mode, FragPack packs variable-length records into smaller shared-budget GPU pages read in place by a fused decode-attention kernel faster than FlashAttention-3 on BF16. Built with LMCache and vLLM, LoomKV makes compressed tiers act as 1.4x larger raw tiers on AgentX: across LMCache's LRU cliff, tier mode delivers 2.7-3.6x raw's goodput and 1.9-3.1x lower mean time-to-first-token (TTFT), shifts the cliff identically under other simulated replacement policies, and cuts repeated-prompt TTFT up to 1.7x via SSD-to-DRAM promotion. When tiers hold the working set, pool mode fits 1.31-1.34x as many GPU tokens, admitting 12 long requests with roughly raw's queue and goodput at 8. On an AI IDE trace where both tiers and the GPU pool are constrained, tier and pool modes raise goodput by 1.24x and 1.59x. Where raw capacity suffices, compression costs at most 2.2% throughput; tier mode is bit-exact with raw tiers, and pool mode matches FlashAttention-3's numerical accuracy.

Wentao Zhu, Ziao Sheng +5

Coding agents resend a growing context on every model call, and context policies are usually judged by the prompt tokens they save. Executed work also depends on call count and prefix reuse: a caching runtime prefills only the tokens after the longest cached prefix. A shorter prompt can therefore cost more if it rewrites cached history. Our quality-gated protocol splits executed prefill into logical prompt minus reused prefix and measures KV residency, time, and energy. On 450 localization cases derived from SWE-rebench V2, preloading ten retrieved blocks (Eager) and adding anchored history compaction (Compact) both pass a five-point non-inferiority gate. In a separate 900-cell study, Eager cuts model calls by 35.7% and the GPU-energy proxy by 33.2% against on-demand search (Grep); Compact saves nothing further. Enabling prefix caching leaves Eager's prompt volume similar (+8.3%; its 95% CI spans zero) but cuts its uncached prefill by 67.7%. Deleting history can turn a token saving into extra work. With mini-SWE-agent on 100 SWE-bench Verified instances, keeping only the last five observations (Mask-5) cuts Eager's prompt volume by 33.3% but loses 135.9k reusable tokens per task. Uncached prefill rises by 608.5%, the energy proxy by 125.6%, and the policy misses the quality gate. Policies thus save physical work by shortening the trajectory and can multiply it by editing reusable history.

Zhongming Yu, Yitong Ma +5

To avoid the quadratic cost of dense attention over long contexts, models such as DeepSeek-V4 and Hy4 have turned natively sparse, and speculative decoding, which matters most where decoding is slowest, increasingly runs on them. Their drafters, however, still keep a context cache of their own, over the whole prompt or a sliding window. Beyond memory, such a cache costs prefill time, prefix-cache hits and decode concurrency. Drafters that read the target's cache avoid one of their own, but settle only which cache, not which positions, and still read everything or a recent window. Neither rule is made for the query at hand, and computing a selection per query in the drafter would cost more as the context grows. Yet a natively sparse target already picks positions for each query, over a cache it keeps anyway. Both of the drafter's choices are therefore already made, and paid for, by the target: its cache and its selection. We measure how far one selection carries: made a step early, it still covers close to nine tenths of what each later token selects on DS-V4.1-Flash. We present DFly2, a block-parallel drafter that shares the target's sparsity. Each draft layer reads the KV its paired target layer cached (KV sharing), at the positions that layer's indexer selected, a fixed number anywhere in the context (Index sharing). DFly2 thus runs no scoring pass and keeps no cache of its own. On DS-V4.1-Flash, GLM-5.3-Flash and Hy4~flash, whose sparse attention and architecture differ, it accepts more tokens per step than DFlash and DSpark trained on the same recipe, over general, long-context and agentic benchmarks. Its margin over the stronger baseline widens from 3.9%-10.5% on general workloads to 10.0%-31.5% on long-context and agentic ones. At high concurrency on DS-V4.1-Flash, at matched per-user decode speed, its throughput is 62% and 81% higher on two 64K sets.

Hong Liu, Rui Cen +11

LLM agents run long, multi-turn programs whose contexts grow at every step, and serving them is limited by KV cache capacity. To alleviate this limitation, systems use context compression techniques, which typically wait until the KV cache crosses a large threshold and then summarize large spans of history at once, either in the background while the agent progresses or on the critical path. These summarizations can be done using the same model running on the same engine, or using the same or a different model running on extra hardware. When running on the same engine, summarization competes with the requests being served for both compute and memory capacity. To maximize the cost-effectiveness of summarization, this paper presents a new serving system called {\em Aggron}. Aggron summarizes agentic requests at every turn and selectively summarizes only certain parts of the KV cache. As a result, Aggron retains accuracy and keeps summarization requests lightweight. Moreover, Aggron launches summarization requests from a separate {\em Summarization Queue} while the corresponding agentic request whose KV cache we want to compress is stalled in the main request queue due to head-of-line stalls. The Summarization queue utilizes compute and memory capacity left over by the head-of-line stalls in the main queue. Further, to maximize efficiency, the server issues summarizations only when it predicts that they can complete before the corresponding agentic request will finally execute. In our evaluation, we compare Aggron to state-of-the-art asynchronous summarization. At high load, Aggron reduces P99 program latency by $27$--$31\%$, and raises throughput by $1.34$--$1.40\times$.

Rishabh Ravi, Tony Hong +6

The Harness Hub newsletter

New harness companies, projects, releases and the monthly State of Harness report, in your inbox.