Breaking the Memory Barrier in Large-Scale Training: The Advantages of the Muon Optimizer
This article examines how optimizer state memory becomes a hard constraint in large-scale model pretraining and how matrix-level orthogonalization, as used by the Muon optimizer, addresses it. It contrasts element-wise adaptive scaling with matrix-level updates, explains two key advantages—lower state memory and implementation complexity, and more balanced update directions that reduce training steps—and outlines the engineering work required for trillion-parameter use, including parameter grouping, distributed adaptation, numerical stability, and observability. Practical deployment guidance is also included.
1. Where the Problem Starts: Optimizer State Is Eating the Training Budget
In the pretraining of models with massive parameter counts, GPU memory often becomes a hard constraint before compute does. Take adaptive optimization methods as an example: to maintain a first moment and a second moment for every parameter, they must store two additional state tensors on the order of the parameter count, on top of mixed-precision training. When the parameter count reaches the trillions, the state variables alone can consume memory in the tens of terabytes, severely compressing the room left for larger batches, longer contexts, and more aggressive parallelism strategies.
It is worth stressing that this overhead is not “wasted.” It is the inevitable cost of element-wise adaptivity, which buys the ability to scale step sizes coordinate by coordinate. The real question is whether, as model size grows, the benefit of that fine granularity still justifies its memory and bandwidth cost. That tradeoff deserves a fresh look.
2. Two Optimization Philosophies: Element-Wise Scaling vs. Matrix-Level Updates
Traditional adaptive methods treat a weight matrix as a large collection of independent scalars. They estimate first- and second-order gradient statistics for each element separately, then decide the update magnitude element by element. Matrix-level orthogonalization methods instead treat the entire weight matrix as a single, indivisible high-dimensional geometric object: they first orthogonalize the update matrix produced by fusing the gradient with momentum, then apply it to the weights in one shot.
An intuitive analogy is a group of balls rolling downhill. The element-wise approach is like scattered skirmishers, each needing its own footwork planned individually. The matrix-level approach first arranges the balls into a formation and advances them at a unified pace. The former offers flexibility; the latter offers consistent direction, stronger coordination, and lower coordination overhead.
3. Unique Advantage 1: Lower State Memory and Lower Optimizer Implementation Complexity
Matrix-level methods typically only need to maintain momentum-level state, without storing second-order statistics for every parameter, so state memory can drop significantly. More importantly, they replace “element-wise statistics” with “matrix decomposition and iteration,” making memory usage less sensitive to parameter count and making larger batches and longer contexts feasible.
Illustrative pseudocode (conveying the idea only, not a specific implementation):
# g: current gradient; m: momentum statem = beta * m + (1 - beta) * gu = orthogonalize(m) # orthogonalize the update matrixw = w - lr * u # apply to the weights in one shot
Orthogonalization itself requires several matrix iterations, which add extra computation and communication. Its net benefit therefore depends on whether the memory and steps saved can cover the extra matrix operations.
4. Unique Advantage 2: More Balanced Update Directions and Faster Reduction in Training Steps
Element-wise adaptivity is easily dominated by a few coordinates with large gradients, causing update magnitudes to become imbalanced across directions. Orthogonalization flattens the singular values of the update matrix, giving each direction a more balanced step size. In small- and medium-scale racing experiments, this often shows up as a clear reduction in the number of steps needed to reach a target loss. Fewer steps lower computation, communication, and scheduling overhead at the same time, which is a major source of this approach’s appeal.
5. From Skepticism to Industrialization: The Engineering Pieces That Must Be Filled In
Early on, these methods were validated only on small models in the hundreds of millions of parameters, and a common doubt was whether they would still work at scale. Moving to trillion-parameter industrialization requires four things:
- Parameter grouping: embedding layers, output layers, normalization, and biases usually stay on adaptive methods, with only hidden-layer matrices using matrix-level updates;
- Distributed adaptation: orthogonalization introduces extra collective communication, which must be designed in coordination with how tensor parallelism, pipeline parallelism, and data parallelism are partitioned;
- Numerical stability: matrix iterations under low precision need stable normalization and scaling strategies;
- Observability: monitoring, alerting, and logging services should track loss curves, gradient norms, and memory levels to catch anomalies early.
6. Engineering Deployment Recommendations
For running this kind of training on Baidu AI Cloud, you can rely on the container platform for elastic resource orchestration, use object storage to hold checkpoints and datasets, and use monitoring, alerting, and logging services to close the loop on training observability. A practical path is to first reproduce a baseline at small and medium scale, then scale up gradually while comparing memory, throughput, and convergence steps, and finally lock in the parameter grouping and parallelism configuration. Overall, the value of matrix-level orthogonalization optimization lies not in the single point of “saving memory,” but in freeing the optimizer from the memory bottleneck so that scaling is once again governed by compute and data quality.
