HierMoE: Accelerating MoE Training with Hierarchical Token Deduplication and Expert Swap

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Lin, Wenxiang, Pan, Xinglin, Zhang, Lin, Shi, Shaohuai, Wang, Xuan, Chu, Xiaowen
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866918124378390528
author Lin, Wenxiang
Pan, Xinglin
Zhang, Lin
Shi, Shaohuai
Wang, Xuan
Chu, Xiaowen
author_facet Lin, Wenxiang
Pan, Xinglin
Zhang, Lin
Shi, Shaohuai
Wang, Xuan
Chu, Xiaowen
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2508_09591
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle HierMoE: Accelerating MoE Training with Hierarchical Token Deduplication and Expert Swap
Lin, Wenxiang
Pan, Xinglin
Zhang, Lin
Shi, Shaohuai
Wang, Xuan
Chu, Xiaowen
Distributed, Parallel, and Cluster Computing
Machine Learning
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.
title HierMoE: Accelerating MoE Training with Hierarchical Token Deduplication and Expert Swap
topic Distributed, Parallel, and Cluster Computing
Machine Learning
url https://arxiv.org/abs/2508.09591