InferScale: GPU-Native KV Injection for Personalized LLM Serving

📄 arXiv: 2607.27090v1 📥 PDF

作者: Peter Li, Prashant Pandey

分类: cs.DC, cs.LG

发布日期: 2026-07-29


💡 一句话要点

提出InferScale以解决个性化LLM服务中的延迟问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 个性化服务 大型语言模型 GPU计算 记忆系统 延迟优化 吞吐量提升 上下文编码 深度学习

📋 核心要点

  1. 现有的个性化LLM服务在处理用户请求时,面临重复填充相同内容导致的延迟问题,尤其是在检索预算增加时。
  2. InferScale通过在GPU上预计算和存储KV表示,替代了传统的提示填充方式,从而提高了服务效率。
  3. 实验表明,InferScale在TTFT上减少了72-79%,并在并发负载下实现了3.7-4.5倍的吞吐量提升。

📝 摘要(中文)

大型语言模型(LLM)越来越多地与持久的个性化上下文一起部署,例如累积的记忆档案或长对话历史,这些上下文在用户的多个请求中共享。现有的生产记忆系统在检索相关记忆时,迫使服务引擎重复填充相同内容,导致时间延迟增加。本文提出InferScale,一个基于GPU的LLM记忆系统,通过可重用的KV状态替代重复的提示填充,显著降低了时间到第一个标记(TTFT)。InferScale在GPU上预计算每个记忆事实的KV表示,并在服务时直接注入到vLLM的分页缓存中。实验结果表明,InferScale在检索预算增加时,TTFT几乎保持不变,并在并发负载下显著提高了吞吐量。

🔬 方法详解

问题定义:本文旨在解决个性化LLM服务中,由于重复填充相同内容而导致的延迟问题。现有的生产记忆系统在检索相关记忆时,随着检索预算的增加,时间到第一个标记(TTFT)也随之增加,影响了用户体验。

核心思路:InferScale的核心思路是通过可重用的KV状态替代重复的提示填充,利用GPU的计算能力来预计算和存储记忆事实的KV表示,从而在服务时直接注入,减少延迟。

技术框架:InferScale的整体架构包括预计算阶段和服务阶段。在预计算阶段,系统将每个记忆事实的KV表示与语义嵌入一起存储在GPU上;在服务阶段,系统根据请求动态检索相关事实,并将其KV直接注入到vLLM的分页缓存中。

关键创新:最重要的技术创新在于引入了Chunked RoPE和Context-Window Encoding,前者在旋转前存储键并在注入时应用其服务时间位置,后者则在编码记忆事实时结合了前面的对话上下文,从而保留了跨事实的上下文信息。

关键设计:InferScale通过vLLM的KV连接器接口实现,无需对引擎进行修改或模型微调。系统在处理时,使用了动态组装的记忆和优化的KV状态管理,确保在提高性能的同时保持应用质量。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

InferScale在TTFT上减少了72-79%(相当于3.6-4.8倍的提升),在准确率上达到了60.3%,与Mem0的63.3%相近,同时在并发负载下实现了3.7-4.5倍的吞吐量提升,展现了其在个性化LLM服务中的显著优势。

🎯 应用场景

InferScale的研究成果在个性化对话系统、智能客服和个性化推荐等领域具有广泛的应用潜力。通过显著降低响应延迟和提高吞吐量,该系统能够提升用户体验,适应更复杂的交互场景,未来可能推动个性化AI助手的普及与发展。

📄 摘要(原文)

Large language models are increasingly deployed with persistent personalized context, such as accumulated memory profiles or long conversation histories, that is shared across a user's many requests. Production memory systems (e.g., Mem0, MemGPT, and Zep) retrieve a relevant subset of this memory and inject it into the prompt, forcing the serving engine to repeatedly prefill the same content. As the retrieval budget grows, time-to-first-token (TTFT) increases even though the underlying memory is reused across requests. We present InferScale, a GPU-native LLM memory system that replaces repeated prompt prefilling with reusable KV state. InferScale precomputes each memory fact's KV representation, stores it alongside a semantic embedding on the GPU, retrieves relevant facts at serving time, and injects their KV directly into vLLM's paged cache. To support dynamically assembled memories under rotary position embeddings, we introduce Chunked RoPE, which stores keys before rotation and applies their serving-time positions during injection. However, encoding memory facts independently omits the cross-fact context available during joint prefilling. We mitigate this with Context-Window Encoding, which encodes each memory fact together with a small window of preceding conversation context while caching only the target fact's KV. InferScale is implemented through vLLM's KV-connector interface, requiring neither engine modifications nor model fine-tuning. Across three open-weight models on LoCoMo, InferScale keeps TTFT nearly constant as the retrieval budget increases: at k=50 it reduces TTFT by 72-79% (3.6-4.8x), achieves 60.3% accuracy versus 63.3% for Mem0 without serving-time recomputation, and delivers 3.7-4.5x the throughput under concurrent load. Reusable KV state thus decouples memory-conditioned serving latency from retrieved-context size while preserving application quality.