UltraEP: Unleash MoE Training and Inference on Rack-Scale Nodes with Near-Optimal Load Balancing

LLM MoE AI Systems and Hardware OLPP DPS
大规模专家并行(Expert Parallelism, EP)正日益成为训练与部署前沿稀疏混合专家(MoE)模型的关键技术,但与此同时,它也将设备层面的专家负载不均衡问题进一步放大,从而引发计算拖尾(compute stragglers)、令牌全对全通信瓶颈(token all-to-all bottlenecks)以及激活内存峰值(activation-memory spikes)。现有负载均衡器通常基于历史负载周期性地重分配专家,而这一策略在负载模式非平稳(non-stationary)的实际生产环境中往往不可靠。 我们提出 UltraEP——首个面向机架级节点(Rack-Scale Nodes, RSNs)的大规模 EP MoE 模型训练与预填充(prefill)阶段的精确负载、实时均衡器。UltraEP 充分利用 RSN 扩展后的片上高速互联能力,在关键执行路径上对每个微批次(microbatch)和每一网络层实施动态重均衡;该设计需在调度求解与专家状态复制通信之间进行深度协同优化,以最大限度降低暴露的运行时开销。为此,UltraEP 在门控(gating)操作完成后立即响应实际负载变化,采用高效、配额驱动(quota-driven)的规划机制进行快速决策,并借助 RSN 原生的持久化瓦片流式传输(persistent tile streaming)与基于中继的扇出缓解(relay-based fan-out mitigation)技术,高效执行由此产生的不规则专家状态迁移。在涵盖参数量从 106B 至 671B 的多类 MoE 模型训练与预填充任务中,UltraEP 平均达到理想强制均衡吞吐量的 94.3%,相较不启用均衡的基线方案提升达 1.49×;同时,最终的跨进程(inter-rank)负载不均衡度由原先的 1.30–4.01 显著压降至 1.01–1.04。此外,我们在真实生产环境的 MoE 训练中验证了 UltraEP 的可扩展性与鲁棒性,实验规模达 2560 块 GPU。
Large-scale expert parallelism (EP) is becoming pivotal for training and serving frontier MoE models, but it also amplifies device-level expert load imbalance into compute stragglers, token all-to-all bottlenecks, and activation-memory spikes. Existing balancers redistribute experts periodically based on historical load, which becomes unreliable for production deployments with non-stationary load patterns. We present UltraEP, the first exact-load, real-time balancer for large-EP MoE training and serving prefill on rack-scale nodes (RSNs). Built upon the extended scale-up connectivity of RSNs, UltraEP rebalances every microbatch and layer on critical paths, which requires nontrivial co-design of plan solving and expert replication communication to minimize exposed overhead. To this end, UltraEP eagerly reacts to post-gating load with efficient quota-driven planning, and executes the resulting irregular expert-state transfers with RSN-native persistent tile streaming and relay-based fan-out mitigation. Averaged across MoE models from 106B to 671B parameters in training and prefill, UltraEP achieves 94.3% of the force-balanced ideal throughput, delivering 1.49$\times$ improvement over non-balancing, while reducing the final inter-rank imbalance from 1.30$-$4.01 to 1.01$-$1.04. Additionally, we validate UltraEP's scalability and robustness in production MoE training with 2560 GPUs.
许愿