跳到正文
arXiv (AI + Vision + Imaging)· Tianyi Huang, Samuel Xu, Ivy Gu, Nathan Huang, Siqi Zhang·· 2 天前AI 评分38

LiveLoRA:跨LoRA更新的精确KV Cache迁移,面向LLM Agent

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

AI 导读

LiveLoRA提出一种模型与运行时协同设计,可在LoRA适配器版本更新时精确迁移最终解码块的KV Cache,无需重放完整交互历史。在Qwen2.5-3B-Instruct上,32个各含8K token的活跃会话相对全历史重预填的中位配对发布加速平均达68.98倍,解码开销约为原生缓存解码的4.8%。紧凑保留策略在8K下将额外会话存储降低3.42倍,发布加解码成本相近。

正文 · 原文

arXiv:2611.31105v1 Announce Type: new Abstract: 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.

来源:arXiv (AI + Vision + Imaging) · arxiv.org