理解高效服务大语言模型推理的瓶颈:KV卸载
Understanding Bottlenecks for Efficiently Serving LLM Inference With KV Offloading
AI总结:
本文通过分析KV缓存卸载的瓶颈,提出优化硬件互连、模型架构和调度算法以提升大语言模型推理效率的方法。
摘要:
KV缓存卸载通过将缓存存储在CPU DRAM中,实现了长上下文LLM推理,但PCIe带宽限制造成了严重的瓶颈。在本文中,我们开发了一个分析框架,推导出$κ_{\text{crit}}$,即缓存到预填充令牌的比例临界值,其中执行成为内存受限。经验特征揭示了99%的延迟花费在传输和处理卸载请求上,导致GPU仅消耗其额定TDP的28%,这促使我们提出针对硬件互连、模型架构和调度算法的优化方案。
英文摘要:
KV cache offloading enables long-context LLM inference by storing caches in CPU DRAM, but PCIe bandwidth limitations create severe bottlenecks. In this paper, we develops an analytical framework that derives $κ_{\text{crit}}$, the critical cached-to-prefill token ratio where execution becomes memory-bound and show typical workloads exceed this threshold by orders of magnitude. Empirical characterization reveals 99\% of latency spent on transfers and serving offloaded requests results in GPU's consuming only 28\% of their rated TDP, motivating our proposed optimizations for hardware interconnects, model architectures, and scheduling algorithms.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。