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

MoE-Lightning:内存受限 GPU 上的高吞吐量 MoE 推理

MoE-Lightning: High-Throughput MoE Inference on Memory-constrained GPUs

UC Berkeley(加州大学伯克利分校);Stanford(斯坦福大学)

Shiyi Cao, Shu Liu, Tyler Griggs, Peter Schafhalter, Xiaoxuan Liu, Ying Sheng, Joseph E. Gonzalez, Matei Zaharia, Ion Stoica

AI总结:

本文提出高吞吐量 MoE 批量推理系统 MoE-Lightning,通过 CGOPipe 流水线调度、分页权重和分层 Roofline 性能模型,在内存受限的低成本 GPU 上显著提升 Mixtral 等大模型推理吞吐量。

摘要:

在资源受限平台上高效部署大语言模型,尤其是专家混合(Mixture of Experts, MoE)模型,在计算效率和内存利用方面面临重大挑战。MoE 架构以在不按比例增加推理成本的情况下提升模型容量而闻名,与稠密模型相比,它显著降低了 token 生成延迟。然而,庞大的模型规模使得没有高端 GPU 的个人难以使用 MoE 模型。在本文中,我们提出了一个高吞吐量的 MoE 批量推理系统,其性能显著优于以往工作。MoE-Lightning 引入了一种新颖的 CPU-GPU-I/O 流水线调度方案 CGOPipe,并结合分页权重(paged weights)以实现高资源利用率;同时引入了一个基于我们提出的分层 Roofline 模型(Hierarchical Roofline Model)的性能模型 HRM,用于帮助寻找比现有系统吞吐量更高的策略。在单块 T4 GPU(16GB)上对 Mixtral 8x7B 进行推理时,MoE-Lightning 的吞吐量最高可达最先进的、支持卸载的 LLM 推理系统的 10.3 倍。当理论系统吞吐量受 GPU 内存限制时,MoE-Lightning 能够以少 2-3 倍的 CPU 内存达到吞吐量上界,显著提高资源利用率。MoE-Lightning 还支持在多个低成本 GPU(例如 2-4 块 T4)上对更大的 MoE 模型(例如 Mixtral 8x22B 和 DBRX)进行高效批量推理。

英文摘要:

Efficient deployment of large language models, particularly Mixture of Experts (MoE), on resource-constrained platforms presents significant challenges, especially in terms of computational efficiency and memory utilization. The MoE architecture, renowned for its ability to increase model capacity without a proportional increase in inference cost, greatly reduces the token generation latency compared with dense models. However, the large model size makes MoE models inaccessible to individuals without high-end GPUs. In this paper, we propose a high-throughput MoE batch inference system, that significantly outperforms past work. MoE-Lightning introduces a novel CPU-GPU-I/O pipelining schedule, CGOPipe, with paged weights to achieve high resource utilization, and a performance model, HRM, based on a Hierarchical Roofline Model we introduce to help find policies with higher throughput than existing systems. MoE-Lightning can achieve up to 10.3x higher throughput than state-of-the-art offloading-enabled LLM inference systems for Mixtral 8x7B on a single T4 GPU (16GB). When the theoretical system throughput is bounded by the GPU memory, MoE-Lightning can reach the throughput upper bound with 2-3x less CPU memory, significantly increasing resource utilization. MoE-Lightning also supports efficient batch inference for much larger MoEs (e.g., Mixtral 8x22B and DBRX) on multiple low-cost GPUs (e.g., 2-4 T4).

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

↑