DeepSpeed icon indicating copy to clipboard operation
DeepSpeed copied to clipboard

fix(zero): Ensure full gradient reduction for Muon optimizer with reduce_scatter

Open nathon-lee opened this issue 9 months ago • 0 comments

fix(zero): Ensure full gradient reduction for Muon optimizer with reduce_scatter

This commit addresses the issue where cross-partition parameters received incorrect updates when using ZeRO-1/ZeRO-2 with reduce_scatter=true and Muon optimizer. The Newton-Schulz orthogonalization in Muon requires complete gradient information, which wasn't available when reduce_scatter was enabled.

The fix introduces a check for Muon parameters and forces full all-reduce gradient reduction for these cases, ensuring consistent parameter updates across all ranks.

Closes https://github.com/deepspeedai/DeepSpeed/issues/7807

nathon-lee avatar Feb 27 '26 06:02 nathon-lee