Why the Muon Optimizer Is Gaining Ground in Open-Source LLM Training

    This article explains why optimizer state memory becomes the first bottleneck in trillion-parameter LLM training, and how the Muon optimizer's matrix-level orthogonalization differs from element-wise adaptive methods. It covers the key engineering steps for scaling matrix-level updates to large models, the practical benefits in memory, update quality, parallelism, and cost, and recommendations for adopting a hybrid strategy with proper monitoring and controlled experiments.

    1. The Starting Problem: Optimizer State Consumes the GPU Memory Budget

    In training runs at the hundreds-of-billions to trillions of parameters scale, GPU memory is usually the first resource to hit its ceiling. Take adaptive optimization methods as an example: to apply independent adaptive scaling to every parameter, they must store two extra state tensors per parameter, the first moment and the second moment. Under mixed-precision training, once parameters, gradients, and these two state tensors are added together, the optimizer state alone can occupy memory in the ten-terabyte range. When memory is heavily consumed, the space available for other purposes shrinks, making it harder to increase batch size or context length. Training throughput drops, and the cost per unit of compute rises accordingly.

    This has led the industry to revisit a question: does the optimizer really need to maintain separate state for every parameter? Matrix-level optimization is the answer that has entered industrial practice, becoming an important engineering innovation in open-source LLM training.

    2. The Fundamental Difference Between Two Optimization Paradigms

    Element-wise adaptivity: precise but expensive

    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. The strength of this approach is strong adaptivity: it handles sparse gradients and parameters at different scales well. The drawbacks are equally clear: the state tensors are on the same order of magnitude as the parameter count, memory overhead is large, and element-wise updates cannot fully exploit the structure of the matrix as a whole.

    Matrix-level orthogonalization: optimizing the whole

    Matrix-level methods treat an entire weight matrix as a single, indivisible high-dimensional geometric object. They first orthogonalize the matrix obtained by combining the gradient with momentum, then add the result to the weights in one step. Because state is maintained at the granularity of “per matrix” rather than “per element,” memory usage drops significantly. The update direction is also more regular, and the loss often decreases in fewer steps.

    An intuitive analogy: the element-wise approach is like letting every small ball decide on its own how far to roll next, which requires issuing a separate instruction for each ball. The matrix-level approach first arranges the balls into a neat square formation, then moves them forward in unison. The former is flexible but has high coordination cost; the latter is efficient to direct and keeps a consistent direction.

    3. The Leap From “Workable on Small Models” to “Usable at Scale”

    The matrix-level optimization idea was initially validated only on small models in the hundred-million parameter range, and there was reasonable skepticism about whether it could work stably in large-scale training: could a neat square formation that works on a small scale still hold its efficiency on a complex battlefield?

    Industrial deployment has answered that question. The key engineering points typically include:

    • Parameter grouping: apply matrix-level updates only to the 2D weight matrices in hidden layers, while embedding layers, output heads, normalization parameters, and others continue to use the mature element-wise adaptive method, balancing stability and benefit.
    • Coordinating computation and communication: orthogonalization involves matrix-decomposition-style operations and must be designed together with the distributed parallelism strategy (tensor parallelism, pipeline parallelism) so it does not become a new communication bottleneck.
    • Precision and numerical stability: orthogonalization is sensitive to numerical error, so a sound precision strategy and necessary numerical corrections are required to prevent the update direction from degrading in later training stages.
    • Learning rate and momentum configuration: the scale of matrix-level updates differs from that of element-wise methods, so the learning rate, momentum coefficients, and warmup schedule need to be recalibrated.

    The pseudocode below is illustrative only. It conveys the grouping and update flow and does not correspond to any specific implementation:

    1. for name, param in model.named_parameters():
    2. if param.ndim == 2 and is_hidden_layer(name):
    3. # Matrix-level: orthogonalize the momentum matrix, then update as a whole
    4. m = momentum_buffer[name]
    5. update = orthogonalize(m)
    6. param -= lr * update
    7. else:
    8. # Element-wise adaptive: keep the existing stable path
    9. param = adaptive_step(param, grad, state[name], lr)

    4. The Engineering Value of the Distinct Advantages

    1. Lower memory usage: optimizer state drops from “on the same order as the parameter count” to “on the same order as the number of matrices.” The freed memory can be used for larger batches and longer contexts, directly improving training efficiency.
    2. More regular update direction: orthogonalization gives the update matrix better conditioning properties and reduces imbalance across different directions, which helps the loss drop quickly in early training.
    3. Better suited to ultra-large-scale parallelism: less state means parameter sharding, state sharding, and communication volume are all more manageable, lowering the scheduling complexity of distributed training.
    4. Improved cost structure: with the same compute budget, you can train a larger model or longer sequences, reducing the cost per unit of effective training.

    5. Adoption Recommendations and Risk Control

    • Use a hybrid approach rather than a full replacement: enabling matrix-level updates for 2D hidden-layer weights while keeping adaptive methods for the remaining parameters is the more sound engineering compromise today.
    • Set up controlled experiments: under the same data and compute, compare training curves, gradient norms, update norms, and final results rather than looking at a single metric in isolation.
    • Build out monitoring: use general-purpose logging and monitoring and alerting capabilities to track memory levels, communication time, and numerical anomalies so update degradation is caught early.
    • Rely on elastic compute: scale up and down on demand on container platforms and elastic compute resources, and use object storage for checkpoints and data management to reduce the operational burden of large-scale training.

    6. Conclusion

    Industrializing the matrix-level orthogonalization approach to optimization essentially moves the optimizer from “per-parameter calculation” to “per-matrix planning as a whole.” It is not superior to traditional adaptive methods in every scenario, but for ultra-large-scale, memory-constrained training tasks, its low state overhead and regular update direction deliver tangible advantages. For teams preparing to run large-model training, understanding its applicable boundaries, adopting a hybrid strategy, and putting a solid monitoring and experimentation system in place are what turn this advantage into real training efficiency.