Skip to content

Preserving Optimizer Updates When Experts Move in MoE Training

Yanming Lai, Yi Qin, Yongxin Hu, Zeyue Wang, Kejin Lu, Fei Yang

cs.DC

Abstract

Moving an expert between GPUs in mixture-of-experts training can change an optimizer update even with identical gradients. In one Qwen3 update, regrouping the squared gradients for clipping shifted the FP32 norm by one unit in the last place and changed the stored BF16 weights. We preserve token order and the timing of gradient writes relative to scaling. The new owners compute FP32 partial sums and the original ranks accumulate them in native order. With AdamW on the new owners, all four pretrained models matched native Megatron bit for bit at every full-gradient probe and optimizer checkpoint through migration and return. On 16 A100s, a prefitted Qwen3-30B-A3B-Base layout cut complete-update time by 3.84% versus native NCCL at the original placement. At that same layout, partial sums shortened updates by 1.30% relative to returning full gradients in reusable buffers.

Create a lesson

Metadata

Comments
14 pages including 3 pages of supplementary material, 3 figures in total. Ancillary files contain Qwen3 timing and clipping data and a verification script