InstInfer:用于高性价比长上下文 LLM 推理的存储内注意力卸载
InstInfer: In-Storage Attention Offloading for Cost-Effective Long-Context LLM Inference
AI总结:
针对长上下文离线 LLM 推理中 KV 缓存导致的 GPU 显存与 PCIe 带宽瓶颈,InstInfer 将注意力计算和 KV 缓存卸载至 CSD,并通过 P2P 优化实现最高 11.1 倍吞吐提升。
摘要:
大语言模型(LLM)的广泛普及标志着生成式 AI 的一个重要里程碑。然而,在离线 LLM 推理中,不断增长的上下文长度和批大小会提高键值(KV)缓存的内存需求,从而给 GPU VRAM 带来巨大负担,尤其是在资源受限场景(例如边缘计算和个人设备)中。若干高性价比解决方案利用主机内存或 SSD 来降低离线推理场景的存储成本并提高吞吐量。然而,由于 PCIe 带宽有限,密集的 KV 缓存访问使它们承受显著的性能损失。为解决这些问题,我们提出 InstInfer,这是一种新颖的 LLM 推理系统,将对性能最关键的计算部分(即解码阶段的注意力)和数据部分(即 KV 缓存)卸载到 Computational Storage Drives(CSD,计算存储驱动器),从而最大限度减少巨大的 KV 传输开销。InstInfer 设计了专用的闪存感知存储内注意力引擎,并配备 KV 缓存管理机制,以利用 CSD 的高内部带宽,而不是受限于 PCIe 带宽。GPU 与 CSD 之间经过优化的 P2P 传输进一步降低了数据迁移开销。实验结果表明,对于使用 NVIDIA A6000 GPU 的 13B 模型,与 FlexGen 等现有基于 SSD 的解决方案相比,InstInfer 将长序列推理的吞吐量最高提升了 11.1 倍。
英文摘要:
The widespread of Large Language Models (LLMs) marks a significant milestone in generative AI. Nevertheless, the increasing context length and batch size in offline LLM inference escalate the memory requirement of the key-value (KV) cache, which imposes a huge burden on the GPU VRAM, especially for resource-constraint scenarios (e.g., edge computing and personal devices). Several cost-effective solutions leverage host memory or SSDs to reduce storage costs for offline inference scenarios and improve the throughput. Nevertheless, they suffer from significant performance penalties imposed by intensive KV cache accesses due to limited PCIe bandwidth. To address these issues, we propose InstInfer, a novel LLM inference system that offloads the most performance-critical computation (i.e., attention in decoding phase) and data (i.e., KV cache) parts to Computational Storage Drives (CSDs), which minimize the enormous KV transfer overheads. InstInfer designs a dedicated flash-aware in-storage attention engine with KV cache management mechanisms to exploit the high internal bandwidths of CSDs instead of being limited by the PCIe bandwidth. The optimized P2P transmission between GPU and CSDs further reduces data migration overheads. Experimental results demonstrate that for a 13B model using an NVIDIA A6000 GPU, InstInfer improves throughput for long-sequence inference by up to 11.1$\times$, compared to existing SSD-based solutions such as FlexGen.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。