arXiv:2512.14080cs.LGcs.AI2025-12被引 15

通过输入输出与分块优化,显著提升细粒度MoE模型的训练效率。

SonicMoE: Accelerating MoE with IO and Tile-aware Optimizations

  • 设计新型IO重叠计算的GPU核函数,减少内存瓶颈。
  • 提出分块令牌归约算法,降低组GEMM中的冗余计算。
  • 在Hopper/Blackwell GPU上实现1.86倍加速,适合大规模MoE训练者。

混合专家(MoE)模型已成为在不显著增加计算成本的前提下扩展语言模型的主流架构。近期的MoE模型呈现细粒度专家(更小的中间维度)和更高稀疏性(总专家数更多但激活专家数恒定)的趋势,提升了每FLOP的模型质量。然而,细粒度MoE因更高的激活内存开销和频繁的IO操作导致硬件效率下降,而稀疏MoE则因组GEMM内核中的填充导致计算浪费。为此,本文提出一种内存高效的前向与反向传播算法,极大减少反向传播中的激活缓存。同时设计可重叠内存访问与计算的GPU核函数,适用于所有MoE架构。此外,提出新颖的“令牌归约”方法,最小化组GEMM中的冗余计算。结果表明,SonicMoE在Hopper GPU上相比ScatterMoE的BF16 MoE核函数,激活内存降低45%,计算吞吐提升1.86倍。使用64张H100时,每日训练吞吐达2130亿词元,接近ScatterMoE在96张H100上的2250亿词元表现。在Blackwell GPU上,前向与反向分别获得25%和15%相对加速。高稀疏性下,分块令牌归约算法相较原始top-K路由带来1.16倍的内核执行时间提速,且下游性能相当。

原文摘要 · Abstract (English)

Mixture of Experts (MoE) models have emerged as the de facto architecture for scaling up language models without significantly increasing the computational cost. Recent MoE models demonstrate a clear trend towards high expert granularity (smaller expert intermediate dimension) and higher sparsity (constant number of activated experts with a higher number of total experts), which improve model quality per FLOP. However, fine-grained MoEs suffer from increased activation memory footprint and reduced hardware efficiency due to higher IO costs, while sparser MoEs suffer from wasted computations due to padding in Grouped GEMM kernels. In response, we propose a memory-efficient algorithm to compute the forward and backward passes of MoEs with minimal activation caching for the backward pass. We also design GPU kernels that overlap memory IO with computation, benefiting all MoE architectures. Finally, we propose a novel "token rounding" method that minimizes the wasted compute due to padding in Grouped GEMM kernels. As a result, our method SonicMoE reduces activation memory by 45% and achieves a 1.86x compute throughput improvement on Hopper GPUs compared to ScatterMoE's BF16 MoE kernel for a fine-grained 7B MoE. Concretely, SonicMoE on 64 H100s achieves a training throughput of 213 billion tokens per day, comparable to ScatterMoE's 225 billion tokens per day on 96 H100s for a 7B MoE model training with FSDP-2 using the lm-engine codebase. On Blackwell GPUs, SonicMoE also achieves a 25% and 15% relative speedup on the forward and backward pass respectively compared to a highly optimized DeepGEMM baseline on OLMoE-sized 7B MoE models. Under high MoE sparsity settings, our tile-aware token rounding algorithm yields an additional 1.16x speedup on kernel execution time compared to vanilla top-K routing while maintaining similar downstream performance on Hopper GPUs. We open-source all our kernels.

MoEGPU优化训练加速分块计算

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。