通过细粒度通信计算重叠,显著提升MoE模型训练效率
Comet: Fine-grained Computation-communication Overlapping for Mixture-of-Experts
- 基于数据依赖分析与任务重调度,实现通信与计算的细粒度重叠
- 单个MoE层加速1.96倍,端到端平均提速1.71倍
- 适用于大规模分布式训练,已在万卡集群生产落地
混合专家(MoE)被广泛用于将大语言模型扩展至万亿参数以上,同时保持固定计算成本。在分布式场景下,大型MoE模型面临严重的通信开销问题,一个MoE层的跨设备通信可占整个模型执行时间的47%。现有方法虽尝试通过流水线方式重叠通信与计算,但粗粒度方案导致计算效率下降,延迟隐藏效果不佳。为此,本文提出COMET系统,通过数据依赖分析与任务重调度,实现通信与计算的精确细粒度重叠。结合自适应负载分配,有效消除细粒度通信瓶颈,提升系统在不同场景下的适应性。评估显示,COMET使单个MoE层执行速度提升1.96倍,端到端平均加速1.71倍。该系统已部署于万卡级集群生产环境,累计节省数百万GPU小时。
原文摘要 · Abstract (English)
Mixture-of-experts (MoE) has been extensively employed to scale large language models to trillion-plus parameters while maintaining a fixed computational cost. The development of large MoE models in the distributed scenario encounters the problem of large communication overhead. The inter-device communication of a MoE layer can occupy 47% time of the entire model execution with popular models and frameworks. Therefore, existing methods suggest the communication in a MoE layer to be pipelined with the computation for overlapping. However, these coarse grained overlapping schemes introduce a notable impairment of computational efficiency and the latency concealing is sub-optimal. To this end, we present COMET, an optimized MoE system with fine-grained communication-computation overlapping. Leveraging data dependency analysis and task rescheduling, COMET achieves precise fine-grained overlapping of communication and computation. Through adaptive workload assignment, COMET effectively eliminates fine-grained communication bottlenecks and enhances its adaptability across various scenarios. Our evaluation shows that COMET accelerates the execution of a single MoE layer by $1.96\times$ and for end-to-end execution, COMET delivers a $1.71\times$ speedup on average. COMET has been adopted in the production environment of clusters with ten-thousand-scale of GPUs, achieving savings of millions of GPU hours.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。