arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.27138cs.LG
收藏

ScoutAttention:通过层前CPU预计算实现高效的KV缓存卸载以用于LLM推理

ScoutAttention: Efficient KV Cache Offloading via Layer-Ahead CPU Pre-computation for LLM Inference

Huazhong University of Science and Technology(华中科技大学);Huawei Technologies(华为技术有限公司)

Qiuyang Zhang, Kai Zhou, Ding Tang, Kai Lu, Cheng Li, Zhenyu Yang, Peng Xu, Jiguang Wan

AI总结:

本文提出ScoutAttention框架,通过GPU-CPU协作计算加速LLM推理,采用层前CPU预计算和异步召回机制,减少CPU负载,实验表明在保持2.4%准确率的同时,比现有方法快2.1倍。

摘要:

大型语言模型在长上下文推理过程中面临关键的GPU内存容量限制,其中KV缓存内存消耗严重限制了解码批处理大小。尽管现有研究已探索将KV缓存卸载到DRAM,但这些方法要么需要频繁的GPU-CPU数据传输,要么对CPU计算要求很高,导致系统在等待I/O操作或CPU处理时GPU利用率低下。我们提出ScoutAttention,一种新的KV缓存卸载框架,通过GPU-CPU协作注意力计算加速LLM推理。为防止CPU计算成为瓶颈,ScoutAttention引入GPU-CPU协作的块状稀疏注意力,显著减少CPU负载。与传统并行计算方法不同,我们的框架具有新的层前CPU预计算算法,使CPU能够提前一层启动注意力计算,辅以异步周期性召回机制以维持最小的CPU计算负载。实验结果表明,ScoutAttention在保持与基线2.4%的准确性的同时,相比现有卸载方法实现了2.1倍的速度提升。

英文摘要:

Large language models encounter critical GPU memory capacity constraints during long-context inference, where KV cache memory consumption severely limits decode batch sizes. While existing research has explored offloading KV cache to DRAM, these approaches either demand frequent GPU-CPU data transfers or impose extensive CPU computation requirements, resulting in poor GPU utilization as the system waits for I/O operations or CPU processing to complete. We propose ScoutAttention, a novel KV cache offloading framework that accelerates LLM inference through collaborative GPU-CPU attention computation. To prevent CPU computation from bottlenecking the system, ScoutAttention introduces GPU-CPU collaborative block-wise sparse attention that significantly reduces CPU load. Unlike conventional parallel computing approaches, our framework features a novel layer-ahead CPU pre-computation algorithm, enabling the CPU to initiate attention computation one layer in advance, complemented by asynchronous periodic recall mechanisms to maintain minimal CPU compute load. Experimental results demonstrate that ScoutAttention maintains accuracy within 2.4% of baseline while achieving 2.1x speedup compared to existing offloading methods.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑