Muon Optimizer for Large Model Training: Advantages and Trade-offs

    This article explains why optimizer state has become a major memory bottleneck in large-scale model training and how matrix-based optimizers such as Muon address it. It compares element-wise adaptive updates with whole-matrix geometric updates, breaks down the advantages in memory usage, update quality, convergence speed, and engineering integration, and outlines the practical limits and deployment recommendations for large-scale training.

    1. The Starting Point: Optimizers Are Becoming a Memory Bottleneck

    In large-scale pre-training, most attention goes to parameter count, data volume, and parallelism strategies. One fact is easy to overlook: optimizer state is part of the model too. Take the adaptive optimizers that have long been the default. To give every parameter its own adaptive step size, they store two extra states per parameter: a first moment and a second moment. Under mixed-precision training, these states usually reside in higher precision, so the memory cost multiplies.

    A rough order-of-magnitude estimate: for a model with trillions of parameters, just these two optimizer states can occupy memory in the range of tens of terabytes. The problem is that this is a rigid cost. It does not participate in the forward pass and produces no activations, yet it must stay resident for the entire training lifecycle. As a result, the room left for larger batches, longer contexts, and more generous activation recomputation is squeezed, putting pressure on both training throughput and convergence stability while pushing up the cost per unit of effective compute.

    Optimizer-level innovation, then, is not an academic curiosity. It is an engineering variable that directly determines the feasible region of training. Matrix-based optimization has drawn attention precisely because it touches both memory usage and update quality.

    2. Two Optimization Philosophies: Element-wise Tuning vs. Whole-matrix Geometric Updates

    The worldview of a traditional adaptive optimizer is element-wise. It flattens a weight matrix into a pile of independent scalars and maintains its own gradient statistics and step size for each one. The strengths are generality, robustness, and insensitivity to sparsity and noise. The weaknesses are that state overhead scales linearly with parameter count, and the structure of the weight matrix is ignored entirely.

    A matrix-based optimizer takes a different view. A 1000x1000 weight matrix is not a million isolated numbers but a single, indivisible high-dimensional geometric object. Its update can be summarized in three steps:

    1. Accumulate momentum to obtain an “update matrix” with the same shape as the weights.
    2. Orthogonalize that matrix so the scale along different directions becomes roughly uniform.
    3. Add the orthogonalized matrix to the weights as a whole, with the step size controlled by a global scale.

    The pseudocode below is illustrative only and does not correspond to any specific implementation:

    1. # Pseudocode: core flow of a matrix-based update
    2. buf = momentum * buf + grad # 1. Momentum accumulation
    3. u = orthogonalize(buf) # 2. Orthogonalization (approximate, iterative)
    4. W = W - lr * scale(u) # 3. Whole-matrix update

    An intuitive analogy is a marching column versus scattered troops. The element-wise approach is like letting each soldier decide their own stride, which requires issuing instructions to every individual. The matrix-based approach first forms the troops into a square and then advances them at a unified pace. Command overhead is lower and directional consistency is stronger.

    3. Breaking Down the Advantages

    1. Significantly Lower Memory Usage

    Matrix-based methods typically maintain only one momentum state, and orthogonalization can be performed in low precision or in blocks, so there is no need to keep two higher-order statistics per parameter. For very large models, this brings optimizer state down from the tens-of-terabytes range to something manageable. The memory saved can be converted directly into larger batches, longer contexts, or less recomputation, which changes the structure of training cost.

    2. More Regular Update Directions

    Orthogonalization essentially flattens the condition number of the update matrix, preventing a few dominant directions from taking the entire step size. This yields two benefits. First, the effective learning rate becomes more comparable across layers and across matrices of different shapes, so hyperparameters transfer better. Second, updates are less easily pulled off course by an individual anomalous direction, and training curves are usually smoother.

    3. Fewer Steps to Convergence

    In small and medium-scale racing experiments, matrix-based methods have set new time records for the same target loss with fewer training steps. Fewer steps also mean fewer communication rounds, fewer checkpoint writes, and lower scheduling overhead, which is amplified into meaningful real gains on clusters of thousands of GPUs.

    4. Friendlier Engineering Implementation

    It requires no complex second-order approximation or large-scale pre-conditioner. The core is just two components, momentum and orthogonalization, which makes it easy to combine with existing mixed precision, gradient accumulation, tensor parallelism, and pipeline parallelism, and easy to fuse and block in custom operators.

    4. Questions and Boundaries That Must Be Taken Seriously

    Matrix-based methods are not free of cost. Four points deserve evaluation before engineering deployment:

    • Applicability: orthogonalization mainly targets the two-dimensional weight matrices of hidden layers. Embedding layers, output heads, normalization parameters, and biases usually still use element-wise adaptive methods, so a real system is a hybrid optimizer.
    • Extra compute: orthogonalization requires several iterations of matrix multiplication and adds computation. If cluster compute is tight, the trade-off between saving memory and running a few extra steps must be weighed.
    • Hyperparameter sensitivity: the global step-size scale, momentum coefficient, and number of orthogonalization iterations need retuning, and copying old experience directly tends to fail.
    • Stability support: large model training usually still needs gradient clipping, loss spike detection, and rollback mechanisms. Swapping the optimizer cannot replace stability engineering.

    5. Deployment Recommendations

    1. Start with small-scale controlled experiments that compare steps, peak memory, and end-to-end duration under the same data and the same target loss.
    2. Adopt a hybrid strategy and enable matrix-based updates only for the two-dimensional matrices in hidden layers.
    3. Block and use low precision for the orthogonalization operator to reduce extra overhead.
    4. Improve monitoring, alerting, and logging, and establish baselines for memory level, update norm, and loss spikes.
    5. Use an elastic container platform and object storage to organize data and checkpoints so experiments are reproducible and rollback is possible.

    Overall, the value of matrix-based optimizers is not to “replace” existing solutions but to turn the optimizer from a memory burden into a schedulable efficiency lever. For teams planning very large-scale training, running systematic controlled experiments in a cloud environment with general-purpose compute, container platforms, and monitoring capabilities, such as Baidu AI Cloud, is a low-risk path to validating the gains of this paradigm.