arXiv:2601.10729cs.AIcs.LG2026-01中稿 · the 52nd Internati…被引 6

动态调整长文本生成的缓存策略,显著降低延迟并提升吞吐量。

OrbitFlow: SLO-Aware Long-Context LLM Serving with Fine-Grained KV Cache Reconfiguration

  • 基于轻量级整数规划求解器,实时决定每请求的缓存保留层
  • 在重载下将延迟95分位降低38%,吞吐量最高提升3.3倍
  • 适合高并发长文本生成场景,尤其对SLO敏感的应用

长上下文大模型服务面临请求长度和批处理构成动态变化的问题,导致运行时内存占用剧烈波动。将键值缓存(KV cache)卸载到主机内存虽能提高内存利用率,但现有静态卸载策略无法适应长上下文服务中快速变化的内存需求,常引发大量CPU-GPU间缓存传输,造成延迟飙升和性能指标(SLO)不达标。为此,我们提出OrbitFlow,一种细粒度自适应的KV缓存管理机制,在满足延迟SLO的前提下优化长上下文大模型服务。OrbitFlow利用轻量级整数线性规划(ILP)求解器,在内存约束下为每个请求动态决策应保留在GPU上的层;并在生成过程中根据运行时反馈持续优化缓存部署。在负载过重时,系统会触发降级机制,临时推迟内存占用大的请求,以保障整体SLO达成。实验表明,OrbitFlow在TPOT和TBT任务上将SLO达标率分别提升66%和48%,95分位延迟降低38%,吞吐量最高达现有方法的3.3倍。

原文摘要 · Abstract (English)

Serving long-context LLMs is challenging because request lengths and batch composition vary during token generation, causing the memory footprint to fluctuate significantly at runtime. Offloading KV caches to host memory limits effective memory usage, but existing static and predetermined offloading strategies cannot adapt to the rapidly shifting memory demands of long-context serving. This often leads to excessive CPU-to-GPU KV transfers that translate into latency spikes and frequent SLO violations. To address these challenges, we introduce OrbitFlow, a fine-grained and adaptive KV cache management system that meets latency SLOs in long-context LLM serving. OrbitFlow employs a lightweight ILP solver to decide which layers' KV caches to retain on the GPU for each request, within memory capacity constraints. It continuously refines KV placements based on runtime feedback when the active plan becomes suboptimal during token generation. Under heavy load, OrbitFlow invokes a fallback mechanism to temporarily defer in-flight requests with large memory footprints, preserving overall SLO attainment. Our experiments demonstrate that OrbitFlow improves SLO attainment for TPOT and TBT by up to 66% and 48%, respectively, while reducing the 95th percentile latency by 38% and achieving up to 3.3x higher throughput compared to existing offloading methods.

长文本生成缓存管理SLO优化大模型服务

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。