DeepSpeed
6d5c56f3 - Partition AutoEP expert parameters per layer under ZeRO-3 (#8424)

Commit
70 days ago
Partition AutoEP expert parameters per layer under ZeRO-3 (#8424) ### Problem When a model created under `zero.Init` is passed to `deepspeed.initialize`, AutoEP creates new local-expert tensors while replacing MoE layers. ZeRO-3 previously converted those tensors only after every layer had been replaced, so full replacement-expert storage accumulated across layers and increased the initialization peak. This addresses the initialization-memory behavior described as problem 1 in #8353. It does not change the independent debug-map retention behavior covered by #8356. ### Approach After each AutoEP layer is repacked, copied, tagged, and installed, resolve its expert-data-parallel group and immediately pass only its newly created expert parameters through the existing ZeRO conversion helper. Optimizer classification and grouping use the experts' ZeRO logical shape and size after partitioning. Existing source gathers, router/shared/dense placement, and batched output-recorder retargeting remain unchanged. The later ZeRO setup already skips parameters converted by this step. --------- Signed-off-by: Masahiro Tanaka <tanaka.masahiro@gmail.com>
Author
Parents
Loading