HierMoE:通过分层令牌去重与专家交换加速MoE训练
HierMoE: Accelerating MoE Training with Hierarchical Token Deduplication and Expert Swap
AI总结:
针对MoE模型训练中的通信和负载不平衡问题,提出HierMoE系统,通过分层令牌去重和专家交换两种拓扑感知技术,在32-GPU集群上实现1.18至1.27倍的端到端训练加速。
摘要:
稀疏激活的混合专家(MoE)transformer由于其稀疏性,已成为大语言模型(LLMs)的常见架构,这种稀疏性在轻松扩展模型规模的同时仅需更少的计算需求。在MoE模型中,每个MoE层需要动态选择令牌以激活特定专家进行计算,而被激活的专家可能并不位于与令牌相同的设备或GPU上。然而,这会导致所有GPU之间的大量通信和负载不平衡,从而阻碍了GPU集群内分布式系统的可扩展性。为此,我们引入了HierMoE,通过两种拓扑感知技术来加速MoE模型的训练:1)令牌去重以减少通信流量,以及2)专家交换以平衡所有GPU之间的工作负载。为了使上述两种方法更具通用性,我们构建了理论模型,旨在不同模型配置和硬件环境下实现最佳的令牌去重和专家交换策略。我们在Megatron-LM之上实现了我们的原型HierMoE系统,并在一个32-GPU集群上使用DeepSeek-V3和Qwen3-30B-A3B模型进行了实验。实验结果表明,与最先进的MoE训练系统Tutel-2DH、SmartMoE和Megatron-LM相比,我们的HierMoE实现了1.55倍至3.32倍的更快通信,并提供了1.18倍至1.27倍的更快端到端训练速度。
英文摘要:
The sparsely activated mixture-of-experts (MoE) transformer has become a common architecture for large language models (LLMs) due to its sparsity, which requires fewer computational demands while easily scaling the model size. In MoE models, each MoE layer requires to dynamically choose tokens to activate particular experts for computation while the activated experts may not be located in the same device or GPU as the token. However, this leads to substantial communication and load imbalances across all GPUs, which obstructs the scalability of distributed systems within a GPU cluster. To this end, we introduce HierMoE to accelerate the training of MoE models by two topology-aware techniques: 1) token deduplication to reduce the communication traffic, and 2) expert swap to balance the workloads among all GPUs. To enable the above two proposed approaches to be more general, we build theoretical models aimed at achieving the best token duplication and expert swap strategy under different model configurations and hardware environments. We implement our prototype HierMoE system atop Megatron-LM and conduct experiments on a 32-GPU cluster with DeepSeek-V3 and Qwen3-30B-A3B models. Experimental results show that our HierMoE achieves $1.55\times$ to $3.32\times$ faster communication and delivers $1.18\times$ to $1.27\times$ faster end-to-end training compared to state-of-the-art MoE training systems, Tutel-2DH, SmartMoE, and Megatron-LM.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。