NEO:通过CPU卸载缓解在线LLM推理的GPU内存危机
NEO: Saving GPU Memory Crisis with CPU Offloading for Online LLM Inference
AI总结:
针对在线LLM推理中GPU内存不足限制批大小与吞吐量的问题,提出NEO系统通过CPU卸载部分注意力计算与KV缓存,结合非对称流水线与负载感知调度,在多场景下显著提升推理吞吐量。
摘要:
在线大语言模型(LLM)推理支撑着智能聊天机器人、自主智能体等诸多前沿应用。现代LLM推理引擎普遍依赖请求批处理来提升推理吞吐量,旨在在昂贵的GPU加速器上运行时实现成本效益。但GPU内存有限极大限制了实际可达到的批大小,造成大量GPU计算资源浪费。\n 我们提出NEO——一款在线LLM推理系统,它将部分注意力计算与KV缓存状态从GPU卸载到本地主机CPU,有效增大GPU批大小进而提升推理吞吐量。为此,NEO提出非对称GPU-CPU流水线技术与负载感知调度策略,以平衡GPU与CPU负载,充分利用二者的计算与内存资源。我们在多种工作负载(即代码生成、文本摘要)、GPU(即T4、A10G、H100)及LLM模型(即7B、8B、70B)上评估了NEO。在保持相同延迟的前提下,与纯GPU方案相比,NEO在T4、A10G、H100 GPU上的吞吐量分别最高提升7.5倍、26%、14%;搭配性能更强的CPU时,NEO在A10G GPU上的吞吐量最高可提升79.3%。
英文摘要:
Online LLM inference powers many exciting applications such as intelligent chatbots and autonomous agents. Modern LLM inference engines widely rely on request batching to improve inference throughput, aiming to make it cost-efficient when running on expensive GPU accelerators. However, the limited GPU memory has largely limited the batch size achieved in practice, leaving significant GPU compute resources wasted. We present NEO, an online LLM inference system that offloads part of attention compute and KV cache states from the GPU to the local host CPU, effectively increasing the GPU batch size and thus inference throughput. To this end, NEO proposes asymmetric GPU-CPU pipelining and load-aware scheduling to balance GPU and CPU loads and fully utilize their compute and memory resources. We evaluate NEO on a wide range of workloads (i.e., code generation, text summarization), GPUs (i.e., T4, A10G, H100), and LLM models (i.e., 7B, 8B, 70B). NEO achieves up to 7.5$\times$, 26%, and 14% higher throughput compared to GPU-only approach on T4, A10G, and H100 GPUs, respectively, while maintaining the same latency; with more powerful CPUs, NEO achieves up to 79.3% throughput gain on A10G GPU.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。