arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.17043cs.LGcs.NI
收藏

结合模型部署与通信调度优化混合专家模型推理时间

Optimizing Mixture-of-Experts Inference Time Combining Model Deployment and Communication Scheduling

Jialong Li, Shreyansh Tripathi, Lakshay Rastogi, Yiming Lei, Rui Pan, Yiting Xia

AI总结:

本文提出 Aurora 方法,通过联合优化 MoE 模型的部署与全对全通信调度,在多种 GPU 集群场景下最小化推理时间,并在同构和异构环境中分别实现最高 2.38 倍和 3.54 倍加速。

摘要:

随着机器学习模型在规模和复杂度上的不断增长,其计算需求已成为一个显著障碍。混合专家(MoE)模型通过选择性激活相关专家来缓解这一问题。尽管如此,MoE 模型仍受到全对全通信操作带来的高通信开销、同步通信约束导致的低 GPU 利用率以及异构 GPU 环境带来的复杂性的制约。本文提出 Aurora,通过同时优化模型部署和全对全通信调度来应对 MoE 推理中的这些挑战。Aurora 通过在全对全通信中策略性地安排令牌传输顺序,实现最小通信时间。它通过将来自不同模型的专家共同部署在同一设备上,避免同步全对全通信的限制,从而提高 GPU 利用率。我们在四种常见 GPU 集群设置下对 Aurora 的优化策略进行了理论分析:GPU 上独占模型与共置模型,以及同构 GPU 与异构 GPU。Aurora 为其中三种情况提供了最优解,对于剩余的 NP 难场景,它提供了一个多项式时间的次优解,其性能相比最优解仅退化 1.07 倍。Aurora 是首个通过在各种场景下进行最优模型部署和通信调度来最小化 MoE 推理时间的方法。评估结果表明,Aurora 显著加速了推理,在同构集群中实现了高达 2.38 倍的加速,在异构环境中实现了高达 3.54 倍的加速。此外,与现有方法相比,Aurora 将 GPU 利用率提高了高达 1.5 倍。

英文摘要:

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.

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

↑