RedKnot通过头感知缓存管理,显著提升长文本大模型服务效率。
RedKnot: Efficient Long-Context LLM Serving with Head-Aware KV Reuse and SegPagedAttention

- 按注意力头分解KV缓存,实现差异化管理
- 支持位置无关复用与冷热数据分离,节省内存
- 无需重训练,适用于多种长文本场景
随着大语言模型(LLM)输入长度持续增长,KV缓存已成为AI基础设施中的主要瓶颈,限制了GPU内存容量、服务并发性、缓存复用及分布式扩展能力。现有服务系统普遍采用统一的单体式KV缓存抽象,对所有注意力头和场景使用相同管理策略。我们发现,不同注意力头在功能角色、关注距离和运行重要性上差异显著,因此并非所有头在所有场景下都需要完整缓存。为此,我们提出RedKnot,一种面向LLM服务的头感知缓存管理系统。RedKnot通过沿注意力头维度分解缓存,将原本同质的缓存结构转变为具有结构性的内存对象,从而统一支持位置无关的缓存复用、前缀压缩、冷热分离及分布式放置,同时保持输出精度并提升资源效率,且无需模型重训练或微调。RedKnot将KV缓存从静态的运行时产物转变为动态、模型感知的可扩展基础架构,为大模型服务提供新范式。
原文摘要 · Abstract (English)
As the input length of large language model (LLM) serving continues to grow, the KV cache has become a dominant bottleneck in AI infrastructure. It limits GPU memory capacity, serving concurrency, cache reuse, and distributed scalability. Multiple important problems, including position-independent KV cache, prefix KV cache compression, hot/cold KV cache separation, and distributed KV cache management, all depend on how the KV cache is represented and managed. However, existing serving systems largely rely on a monolithic KV cache abstraction, where the KV cache is treated as a homogeneous sequence of token-level memory blocks and managed with similar policies across attention heads and serving scenarios. We observe that KV cache utility is highly structured across KV heads: different heads exhibit different functional roles, attention distances, and runtime importance. Therefore, a full KV cache is not always necessary for every head, token range, or serving scenario. We present RedKnot, a head-aware KV cache management system for LLM serving. RedKnot breaks the conventional monolithic KV cache abstraction by decomposing the KV cache along KV heads, whose importance and effective attention ranges vary significantly across serving scenarios. This head-level decomposition turns the KV cache from a monolithic tensor abstraction into a structured memory object, enabling RedKnot to uniformly support position-independent KV reuse, prefix KV compression, hot/cold KV separation, and distributed KV placement while preserving output fidelity and improving resource efficiency, without requiring model retraining or fine-tuning. RedKnot establishes a new foundation for AI infrastructure by transforming the KV cache from a monolithic, passive runtime artifact into a dynamic, model-aware runtime substrate for scalable LLM serving.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。