通过优化模型部署与通信调度,显著降低MoE模型推理延迟。
Optimizing Mixture-of-Experts Inference Time Combining Model Deployment and Communication Scheduling
- 按通信顺序调度令牌传输,减少全对全通信开销。
- 跨模型专家共置提升显卡利用率,最高提速3.54倍。
- 适用于异构/同构集群,支持实际部署场景。
随着机器学习模型规模扩大,计算需求成为主要瓶颈。混合专家(MoE)模型通过选择性激活专家缓解此问题,但仍受全对全通信开销高、同步通信导致显卡利用率低、异构硬件环境复杂等限制。本文提出Aurora,通过优化模型部署与全对全通信调度,实现最小通信时间。Aurora通过合理排序令牌传输,降低通信耗时;通过将不同模型的专家共置于同一设备,避免同步通信限制,提升显卡利用率。我们理论分析了四种典型GPU集群配置:单个模型独占或共置,以及同质或异质显卡。Aurora在其中三类场景中提供最优解,对剩余的NP-hard场景,给出多项式时间近似解,仅比最优值差1.07倍。Aurora是首个在多种环境下通过联合优化部署与通信调度最小化MoE推理时间的方法。实验表明,其在同质集群中提速最高达2.38倍,在异构环境中最高达3.54倍;显卡利用率提升最高达1.5倍。
原文摘要 · Abstract (English)
As machine learning models scale in size and complexity, their computational requirements become a significant barrier. Mixture-of-Experts (MoE) models alleviate this issue by selectively activating relevant experts. Despite this, MoE models are hindered by high communication overhead from all-to-all operations, low GPU utilization due to the synchronous communication constraint, and complications from heterogeneous GPU environments. This paper presents Aurora, which optimizes both model deployment and all-to-all communication scheduling to address these challenges in MoE inference. Aurora achieves minimal communication times by strategically ordering token transmissions in all-to-all communications. It improves GPU utilization by colocating experts from different models on the same device, avoiding the limitations of synchronous all-to-all communication. We analyze Aurora's optimization strategies theoretically across four common GPU cluster settings: exclusive vs. colocated models on GPUs, and homogeneous vs. heterogeneous GPUs. Aurora provides optimal solutions for three cases, and for the remaining NP-hard scenario, it offers a polynomial-time sub-optimal solution with only a 1.07x degradation from the optimal. Aurora is the first approach to minimize MoE inference time via optimal model deployment and communication scheduling across various scenarios. Evaluations demonstrate that Aurora significantly accelerates inference, achieving speedups of up to 2.38x in homogeneous clusters and 3.54x in heterogeneous environments. Moreover, Aurora enhances GPU utilization by up to 1.5x compared to existing methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。