Xinglin Pan, Wenxiang Lin, Lin Zhang, Shaohuai Shi, Zhenheng Tang, Rui Wang, Bo Li, Xiaowen Chu
HKUST(GZ), Harbin Institute of Technology Shenzhen, HKUST
ASPLOS 2025
Presenter: wzw
Date: 2026-04-03
AlltoAll + expert compute, 但在 DP+MP+EP+ESP 下, 真正的瓶颈是 inter-node / intra-node 通信与 backward gradient sync 的联合调度。1458 个配置化 MoE layers 上相对 Tutel 达到 1.18x-1.22x;在真实 GPT2/Mixtral 模型上相对 DS-MoE 达到 1.28x-3.01x。
Gate, Order/I-Order, Experts 三部分。top-k experts,所以 active FLOPs 不高,但 数据重排与跨设备通信很多。DeepSpeed-MoE, Tutel, PipeMoE 大多针对特定 routing 或固定 schedule 做优化。AlltoAll, AllGather, ReduceScatter, Gradient-AllReduce, expert compute。30%-60%,不少场景总占比超过一半。
MP 与 ESP 往往对齐到单节点 GPU 数。ESP-AllGather / ESP-ReduceScatter 通常是 intra-node,而 AlltoAll / Gradient-AllReduce 通常是 inter-node。AlltoAll + expert,但没有系统性利用 节点内外通信的带宽分层。r 同时用于 forward 与 backward。weight gradient 计算与 Gradient-AllReduce,代价结构已经变了。1458 个配置上发现:
有 912 个 case 的 forward / backward 最优 r 不同。Gate: token routingOrder / I-Order: (B, L, M) <-> (E, T, M) 数据布局变换Dispatch / Combine: token-to-expert 通信算法Expert: FFN 计算本体FSMoE 的核心不是重新写一个固定 MoE kernel,而是让 前端 API 与后端 scheduler 解耦:
开发者替换 gate/order/dispatch/expert 实现后,调度器仍可基于 profiling 自动找 schedule。
4 类 routing:
GShard, Sigmoid, X-MoE, SoftMoE。2 类 ordering:
GShard ordering 与 Tutel ordering。NCCL-A2A, 1DH-A2A, 2DH-A2A。
AlltoAll, AG/RS, expert, Gradient-AllReduce。Gradient-AllReduce,尽量吃掉原本裸露的同步时间。$t_{*,r} = \alpha_* + \frac{n_*}{r}\beta_*$AlltoAll, AG, RS, expert 都按这类模型估时。r 就是在 overlap 收益 与 startup cost 之间折中。4 种 case:
inter-node 主导、expert 主导、AlltoAll 主导、intra-node 主导。t^{moe}(r),再用 SLSQP 求局部最优。4 个候选中最小时延对应的 r。$n_{first}^{i} = g_{grad}^{inv}(\min(t_{grad}(n_{grad}^{i-1}), t_{olp}^{i}))$Gate + Order,被映射到 (E, T, M) 布局。Dispatch 把 token 沿 EP 送往对应 experts;若 expert 被 shard,再做 ESP-AllGather。Expert 计算完成后,做 ESP-ReduceScatter + Combine 返回原布局。Gradient-AllReduce,并按 phase-specific r 运行。GEMM + NCCL collectives,再拟合 \alpha/\beta。N_MP = N_ESP = GPUs per node 这类部署。Testbed-A = 48 GPU, Testbed-B = 32 GPUUbuntu 20.04, CUDA 11.3, PyTorch 1.12, NCCL 2.121458 个 attention/MoE layer 组合GPT2-XL-based MoE, Mixtral-7B, Mixtral-22BDeepSpeed-MoE, Tutel/PipeMoE, PipeMoE+Lina| Schedule | Testbed-A | Testbed-B |
|---|---|---|
| Tutel | 1.00x | 1.00x |
| Tutel-Improved | 1.09x | 1.08x |
| FSMoE-No-IIO | 1.12x | 1.16x |
| FSMoE | 1.18x | 1.22x |
Tutel -> Tutel-Improved 只多出约 8%-9%,说明只 overlap non-MoE 部分不够。FSMoE-No-IIO -> FSMoE 还能再涨,说明 inter/intra-node overlap 是真实贡献。
DS-MoE 达到 1.28x-3.01x。Tutel 平均还能有 1.19x,优于 Tutel-Improved 与 PipeMoE+Lina。Gradient-AllReduce 与多层通信。PP (N_PP = 2) 后,FSMoE 相对 DS-MoE 仍有 2.46x 平均提速。Testbed-A 上随 L 和 P 扩展,FSMoE 相对 Tutel 大致维持 1.16x-1.20x。GShard 1.37x, X-MoE 1.42x, Sigmoid 1.37x, EC 1.33x。
GEMM 与四类 collective 都能被线性模型高精度拟合。r^2 很高:
GEMM 0.9987, AllReduce 0.9999896, AlltoAll 0.9999。AlltoAll, AG/RS, expert compute, Gradient-AllReduce,把多层通信 overlap 做得更彻底。r 与 adaptive gradient partitioning,在真实 MoE 训练中拿到 稳定的系统级提速。forward/backward 分开找 r,再把 Gradient-AllReduce 纳入同一优化框架。MP/ESP 与节点拓扑对齐,以及线性性能模型足够稳定。