KVDrive通过多级缓存管理提升长文本大模型推理速度
KVDrive: A Holistic Multi-Tier KV Cache Management System for Long-Context LLM Inference

- 分层管理GPU、内存和固态盘上的键值缓存,动态适配注意力模式
- 在长上下文场景下实现1.74倍吞吐量提升,精度不下降
- 适合需要处理超长文本的实时推理系统开发者
支持长上下文大模型面临巨大内存压力,源于键值(KV)缓存的高存储需求。现有卸载系统将完整缓存存于主机内存,并在解码时选择性调取关键条目,但该策略受限于稀疏度提升空间,当上下文长度和批量大小增加时,KV数据传输量急剧上升,成为解码延迟的主要来源。我们提出KVDrive,一个贯穿GPU显存、主机内存和固态硬盘的全栈式多级KV缓存管理系统。不同于以往通过算法优化追求更高稀疏度的方法,KVDrive从系统角度出发,协同调度缓存放置、流水线调度与跨层级协调,在紧约束的GPU资源下保持高吞吐推理。系统具备三大能力:根据注意力行为自适应调整缓存管理以最大化重用并减少冗余移动;重构解码流水线,使I/O与CPU/GPU计算阶段重叠,消除异构资源间的停顿;统一各内存层级间的数据流动,突破GPU和内存容量限制,实现可扩展的长上下文推理。我们已实现完整的原型系统,并在多个主流长上下文基准测试中评估了其性能。结果表明,相比当前最优方案,系统在保持精度的前提下,最高提升1.74倍吞吐量。
原文摘要 · Abstract (English)
Supporting long-context LLMs is challenging due to the substantial memory demands of the key-value (KV) cache. Existing offloading systems store the full cache in host memory and selectively fetch critical entries during decoding, but this strategy quickly hits a ceiling: sparsity cannot be pushed further without degrading accuracy. As a result, when context length and batch size grow, the volume of KV transfers rises sharply and becomes the dominant source of decoding latency. We present KVDrive, a holistic multi-tier KV cache management system spanning GPU memory, host DRAM, and SSD. Unlike prior work that pursues greater sparsity through algorithmic refinements, KVDrive tackles the problem from a systems perspective - jointly orchestrating cache placement, pipeline scheduling, and cross-tier coordination to sustain high-throughput inference under tight GPU budgets. KVDrive advances three fundamental capabilities: it adapts cache management to attention behavior to maximize reuse and minimize redundant data movement; it restructures the decoding pipeline to overlap I/O- and CPU/GPU compute-bound stages, eliminating stalls across heterogeneous resources; and it harmonizes data movement across memory tiers to unlock scalable long-context inference far beyond GPU and DRAM limits. We have implemented a fully functional prototype of KVDrive and evaluated it on long-context benchmarks with popular LLMs. The system achieves up to 1.74x higher throughput compared to state-of-the-art works while preserving accuracy.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。