HeterMoE: Efficient Training of Mixture-of-Experts Models on Heterogeneous GPUs

Yongji Wu, Xueshen Liu, Shuowei Jin, Ceyu Xu, Feng Qian, Z. Morley Mao, Matthew Lentz, Danyang Zhuo, Ion StoicaarXiv 2025 · DOI

Introduction

Training state-of-the-art Large Language Models (LLMs) has become an expensive arms race, with the "Mixture-of-Experts" (MoE) architecture emerging as the gold standard for efficiency. However, the scarcity of the latest hardware, such as NVIDIA’s H100 GPUs, often leaves researchers with clusters of "legacy" GPUs like V100s or T4s. HeterMoE, a system developed by researchers at UC Berkeley, Michigan, USC, and Duke, addresses this by enabling efficient MoE training on heterogeneous GPU clusters. By disaggregating transformer components, HeterMoE allows mixed-generation clusters to perform nearly as well as those composed entirely of newer hardware.

What Problem Does This Paper Address?

Existing heterogeneity-aware training solutions typically treat models as black boxes, using simple data or pipeline parallelism. However, different parts of a model have distinct hardware affinities. Attention mechanisms are memory-bandwidth intensive and benefit significantly from architecture-specific optimizations like FlashAttention, which require newer GPUs (Ampere+). In contrast, Experts (MLP blocks) rely on standard matrix multiplications (GEMMs), where older GPUs remain relatively efficient.

Standard MoE Transformer Layer vs. Expert Parallelism.

In standard Expert Parallelism (EP), shown above, fast GPUs often idle while waiting for slower ones to complete their expert computations, creating performance "bubbles." HeterMoE aims to eliminate these inefficiencies by matching model components to the hardware they run on most effectively.

Methodology

HeterMoE is built on three core pillars designed to maximize throughput across diverse hardware:

  1. Attention-Expert Disaggregation: HeterMoE splits the workload by assigning Attention mechanisms to newer GPUs ("Attention GPUs") and MoE expert modules to older GPUs ("Expert GPUs"). This ensures that the specialized hardware features of newer chips are utilized where they provide the most gain.
  2. Zebra Parallelism (ZP): To maintain high utilization, HeterMoE employs a "zigzag" execution pattern. It breaks input batches into micro-batches, allowing Attention GPUs to process one micro-batch while Expert GPUs handle the experts for the previous one. This overlapping of computation across hardware generations minimizes idle time.
  3. Asymmetric Expert Assignment (Asym-EA): To prevent slower GPUs from becoming bottlenecks, HeterMoE uses a "gather and squeeze" algorithm. This fine-grained load balancing moves a calculated number of experts back to the Attention GPUs, ensuring that the workload is perfectly balanced according to the specific compute capabilities of each GPU in the cluster.

Evaluation and Results

The system was evaluated using configurations based on the Mixtral 8x7B architecture, ranging from 1.2B to 4.3B parameters, across on-premise (A40 and V100) and AWS (L40S and T4) clusters.

Key Performance Metrics

  • Significant Speedups: HeterMoE achieved up to a 2.3x speedup over existing MoE systems and outperformed optimally balanced pipeline-parallel solutions by 1.4x.
  • Hardware Efficiency: In a cluster where half the A40s were replaced with older V100s, HeterMoE maintained 95% of the throughput of a pure A40 cluster, demonstrating its ability to effectively integrate legacy hardware.
  • Cloud Scalability: On AWS, mixing L40S and T4 GPUs resulted in a 2.89x performance improvement over standard Expert Parallelism, highlighting its utility for cost-effective cloud training.

Key Insights

  • Exploiting the FlashAttention Divide: The performance gap between GPU generations is much wider for Attention (up to 3.7x) than for Experts (~1.2x). HeterMoE strategically exploits this disparity by keeping Attention on the most capable hardware.
  • Zero-Cost Communication: Since MoE models already require "All-to-All" communication to shuffle tokens between experts, disaggregation reorganizes existing traffic without adding significant new overhead.
  • Intra-layer Control: Unlike Pipeline Parallelism, which splits by layers, Zebra Parallelism operates within a layer. This provides the fine-grained control necessary for balancing wildly varying hardware capabilities, which is crucial in heterogeneous environments.

Limitations and Future Work

HeterMoE's effectiveness is sensitive to network interconnect speeds; benefits diminish on standard 20 Gbps TCP networks compared to high-speed (100-200 Gbps) RoCE/InfiniBand. Additionally, the lower VRAM of older GPUs (e.g., 16GB on V100 vs. 48GB on A40) can limit the number of expert weights they can host. Future research may extend these disaggregation principles to inference tasks and explore interactions with other forms of parallelism like Tensor Parallelism.

Summary updated

BibTeX
@misc{wu2025hetermoe,
  author = {Yongji Wu and Xueshen Liu and Shuowei Jin and Ceyu Xu and Feng Qian and Z. Morley Mao and Matthew Lentz and Danyang Zhuo and Ion Stoica},
  title = {{HeterMoE: Efficient Training of Mixture-of-Experts Models on Heterogeneous GPUs}},
  year = {2025},
  eprint = {2504.03871},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.03871},
}
Figure