MoEBlaze: Breaking the Memory Wall for Efficient MoE Training on Modern GPUs
Jiyuan Zhang, Yining Liu, Siqi Yan, Lisen Deng, Jennifer Cao, Shuqi Yang, Min Ni, Bi Xue, Shen Li
TL;DR
MoEBlaze tackles the memory wall in Mixture-of-Experts training by eliminating large intermediate activation buffers during token routing and by co-designing end-to-end training kernels with activation-aware strategies. It introduces lightweight data structures (e.g., per-expert and per-token index lists) and a three-step dispatch method that obviates global sorts, enabling on-the-fly token gathering and reduction. The approach is augmented with activation checkpointing and fused SwiGLU/MoE kernels, reducing activation traffic and improving GPU utilization. Empirically, MoEBlaze delivers over 4x end-to-end speedups and more than 50% memory savings versus state-of-the-art MoE frameworks on multiple configurations and activation functions, with especially large gains for SwiGLU architectures on modern GPUs.
Abstract
The pervasive "memory wall" bottleneck is significantly amplified in modern large-scale Mixture-of-Experts (MoE) architectures. MoE's inherent architectural sparsity leads to sparse arithmetic compute and also introduces substantial activation memory overheads -- driven by large token routing buffers and the need to materialize and buffer intermediate tensors. This memory pressure limits the maximum batch size and sequence length that can fit on GPUs, and also results in excessive data movements that hinders performance and efficient model scaling. We present MoEBlaze, a memory-efficient MoE training framework that addresses these issues through a co-designed system approach: (i) an end-to-end token dispatch and MoE training method with optimized data structures to eliminate intermediate buffers and activation materializing, and (ii) co-designed kernels with smart activation checkpoint to mitigate memory footprint while simultaneously achieving better performance. We demonstrate that MoEBlaze can achieve over 4x speedups and over 50% memory savings compared to existing MoE frameworks.
