Pie通过智能内存调度,让大模型推理在不降速的前提下用更多CPU内存。
Pie: Pooling CPU Memory for LLM Inference
- 利用可预测访问模式实现计算与内存交换并行,不增加延迟。
- 动态调整CPU内存分配,在缓存预热期达最优换页策略,吞吐最高提升1.9倍。
- 适合需要高吞吐、低延迟的大模型部署场景,尤其对显存受限的设备友好。
大型语言模型的快速发展推动了自然语言处理与AI分析的进步,但其日益增长的规模和内存需求带来了显著挑战。常规方案是将部分数据溢出至CPU内存,但传统GPU-CPU内存交换常导致更高延迟和更低吞吐。本文提出Pie,一种面向大模型推理的框架,通过性能透明的内存交换与自适应扩展机制解决此问题。借助现代硬件(如NVIDIA GH200 Grace Hopper Superchip)的高带宽及可预测的内存访问模式,Pie实现计算与数据交换并发进行,扩展有效内存且无额外延迟。自适应扩展根据实时信息动态调节CPU内存分配,优化不同负载下的内存使用与性能表现。实验表明,Pie在缓存预热阶段实现最优换页策略,有效平衡内存容量提升与计算开销,吞吐最高达vLLM的1.9倍、延迟降低50%;同时可减少高达1.67倍的GPU内存占用而不损失性能。相比基于离线分析的FlexGen,Pie延迟降低数量级,吞吐高出9.4倍。
原文摘要 · Abstract (English)
The rapid growth of LLMs has revolutionized natural language processing and AI analysis, but their increasing size and memory demands present significant challenges. A common solution is to spill over to CPU memory; however, traditional GPU-CPU memory swapping often results in higher latency and lower throughput. This paper introduces Pie, an LLM inference framework that addresses these challenges with performance-transparent swapping and adaptive expansion. By leveraging predictable memory access patterns and the high bandwidth of modern hardware like the NVIDIA GH200 Grace Hopper Superchip, Pie enables concurrent data swapping without affecting foreground computation, expanding effective memory without added latency. Adaptive expansion dynamically adjusts CPU memory allocation based on real-time information, optimizing memory usage and performance under varying conditions. Pie maintains low computation latency, high throughput, and high elasticity. Our experimental evaluation demonstrates that Pie achieves optimal swapping policy during cache warmup and effectively balances increased memory capacity with negligible impact on computation. With its extended capacity, Pie outperforms vLLM by up to 1.9X in throughput and 2X in latency. Additionally, Pie can reduce GPU memory usage by up to 1.67X while maintaining the same performance. Compared to FlexGen, an offline profiling-based swapping solution, Pie achieves magnitudes lower latency and 9.4X higher throughput.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。