让低配显卡跑MoE大模型,速度提升超10倍。
MoE-Lightning: High-Throughput MoE Inference on Memory-constrained GPUs
- 设计新型CPU-GPU-I/O流水线与分页权重,提升资源利用率。
- 单张T4显卡上,Mixtral 8x7B推理吞吐量达现有系统10.3倍。
- 适合在低成本多T4 GPU上高效运行超大MoE模型。
大规模语言模型,尤其是混合专家(MoE)架构,在资源受限平台上的高效部署面临计算效率与内存利用的挑战。尽管MoE能以较低开销提升模型容量并显著降低生成延迟,但其庞大模型尺寸仍使普通用户难以使用高端显卡。本文提出高吞吐量的MoE批量推理系统MoE-Lightning,引入新颖的CPU-GPU-I/O流水调度机制CGOPipe与分页权重技术,实现高资源利用率;同时构建基于层级屋顶模型(HRM)的性能预测模型,指导策略选择以获得更高吞吐。在单张T4 GPU(16GB)上,MoE-Lightning对Mixtral 8x7B的吞吐量比当前最优的可卸载推理系统高出最多10.3倍。当系统吞吐受GPU内存限制时,其可达到理论吞吐上限,且所需CPU内存仅为2-3倍,大幅提高资源利用率。系统还支持在多个低成本GPU(如2-4张T4)上高效推理更大规模的MoE模型(如Mixtral 8x22B和DBRX)。
原文摘要 · Abstract (English)
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).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。