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

    This article explains why optimizer state has become a dominant memory cost in large-scale model training and how matrix-based updates such as the Muon optimizer reduce that cost. It covers the shift from element-wise adaptive methods to matrix-level orthogonalized updates, the geometric intuition behind faster convergence, the main engineering challenges at industrial scale, and a practical framework for evaluating adoption.

    1. The Starting Point: Optimizers Are Becoming the Main Memory Consumer

    In large-scale model training, memory remains the hardest constraint. Model parameters are only part of the footprint; what usually blows the budget is optimizer state. Take mainstream element-wise adaptive methods as an example: to maintain an adaptive step size for every parameter, you must keep two extra states in memory, the first moment and the second moment. Under mixed-precision training, a parameter copy and a gradient copy are added on top, so a single parameter often costs on the order of ten-plus bytes.

    Scale that accounting to the trillion-parameter level and optimizer state alone can consume on the order of ten TB of memory. The consequences cascade: less room is left for activations, batch size cannot grow, context length is capped, parallelism schemes are forced to be more aggressive, communication takes a larger share, and both overall training cost and tuning difficulty rise together. Reducing optimizer state overhead is therefore not a micro-optimization but a key variable that directly determines whether training is feasible.

    2. The Divide: From Element-Wise Adaptation to Matrix-Level Updates

    Traditional adaptive methods carry an implicit assumption of “element-wise independence”: the weight matrix is flattened into a pile of unrelated scalars, first- and second-order gradient statistics are estimated separately for each scalar, and each one decides its own step size. This is robust and general, but it ignores the structure of the weight matrix itself. The rows and columns of a matrix encode connections between neurons, not mutually unrelated noise.

    Matrix-based optimization instead treats the entire weight matrix as a single, indivisible high-dimensional geometric object. It still maintains momentum, but it no longer stores per-element second-order statistics. Instead, it takes the update matrix fused from the gradient and the momentum, orthogonalizes it, and adds it to the weights as a whole. The difference in one sentence: the former lets every element find its own path, while the latter makes all elements form ranks and advance at a unified pace.

    This shift brings two direct benefits:

    • Substantially lower state memory. Dropping the element-wise second moment reduces optimizer state from “two copies of the parameters” to “one momentum copy of the parameters,” which at trillion-parameter scale means several TB of memory freed up.
    • Cleaner update directions. Orthogonalization makes the scales of the update matrix’s directions more balanced, preventing a few directions from dominating the update. The effective learning rate becomes more stable, and the number of training steps drops noticeably for the same target loss.

    3. Geometric Intuition: Why Orthogonalization Speeds Up Convergence

    Picture the loss surface as a slope and parameter updates as iron balls rolling downhill. Element-wise adaptive methods issue separate instructions to each ball. This looks precise, but the step sizes across directions differ enormously, which easily produces back-and-forth oscillation and direction cancellation. The matrix-based method first arranges all the balls into a formation, then advances them with a single coordinated step: directions are aligned, step sizes are comparable, and fewer iterations are needed to reach the target.

    From a linear algebra perspective, orthogonalization constrains the singular value distribution of the update matrix and pushes its condition number toward an ideal state. This is equivalent to a “direction whitening” of the update: instead of letting components with wildly different scales act on their own, they are brought to the same magnitude and advance together. This is also the fundamental reason matrix-based methods can set new records for training steps in small- and mid-scale speedrun experiments.

    4. From Toy Scale to Industrial Scale: Where the Real Difficulty Lies

    Matrix-based methods were initially validated only on small models around the hundred-million-parameter level, and skepticism followed: does working on small models just reflect a coincidence in low-dimensional space? Once scaled to billions or hundreds of billions of parameters, does it degrade into a “battlefield formation” that needs finely tuned skirmish lines to advance? The core industrial work is answering that question, and the difficulty concentrates in four places.

    1. Choosing the scope of application. Several weights in attention modules are usually more sensitive to element-wise adaptation, and applying matrix-based updates directly may hurt convergence stability. The common engineering practice is to route by module type: large hidden-layer matrices use matrix-based updates, while sensitive modules keep the existing adaptive method, forming a hybrid strategy.
    2. Orthogonalization under distributed sharding. Once a matrix is split by tensor parallelism and pipeline parallelism, each device holds only a shard, and orthogonalization requires cross-device coordination. Viable paths include performing local orthogonalization on shards and then aggregating corrections, hiding synchronization overhead through asynchronous communication, or overlapping the orthogonalization computation with backpropagation.
    3. Numerical stability. Orthogonalization typically relies on iterative approximate solvers. Too few iterations distort the directions; too many cancel out the compute savings. In practice, mixed computation between lower and higher precision is needed, along with normalization of the momentum to avoid numerical overflow.
    4. Coupling with the learning rate schedule. The scale distribution of matrix-based updates differs from element-wise methods, so existing learning rates and warmup strategies cannot be copied over directly; a fresh small-scale sweep and extrapolation are required.

    Illustrative pseudocode can summarize the update flow:

    1. # Pseudocode: illustrates the structure of a matrix-style update only, not a concrete API
    2. def matrix_style_step(W, G, M, beta, lr):
    3. M = beta * M + (1 - beta) * G # momentum accumulation, only one state needed
    4. U = orthogonalize(M) # approximate orthogonalization of the update matrix
    5. W = W - lr * U # added as a whole, not scaled element-wise
    6. return W, M

    5. Memory Accounting and a Selection Framework

    Before deciding whether to adopt a matrix-based optimizer, run a quantitative assessment in the following order.

    • Step 1: Account for state memory. Estimate the optimizer overhead of the element-wise method and the matrix-based method separately using “parameter count x bytes per parameter,” then apply the per-device share after parallel sharding to judge whether the freed memory is enough to support the target batch size and context length.
    • Step 2: Estimate the extra compute. Orthogonalization iterations add matrix operations, which must be converted into end-to-end time together with the saved training steps, rather than judged by single-step latency alone.
    • Step 3: Validate in small steps. First compare convergence curves at within ten billion parameters, observing the steps needed to reach the target loss, gradient norm fluctuation, and the frequency of loss spikes.
    • Step 4: Ramp up gradually. Once stability is confirmed, scale up level by level while keeping a switch to fall back to the original optimizer, which helps with fault localization.

    Engineering support is equally important: training metrics should be wired into a unified logging service with monitoring and alerting, with thresholds set for loss spikes, abnormal gradient norms, and per-device memory watermarks; checkpoints should save both optimizer state and random number state to support exact resumption; and for large-scale jobs, images, data, and configurations can be version-managed through container platforms and object storage to keep experiments reproducible.

    6. Conclusion

    The value of the matrix-based optimization approach is not to replace mature adaptive methods, but to compress optimizer state, the main memory item, into a tolerable range while trading cleaner update directions for fewer training steps. Its distinctive advantages come down to three points: low state overhead, high update direction quality, and ample room to adapt to large-scale parallel training. The real barrier in practice is engineering detail: module routing strategy, distributed orthogonalization, numerical stability, and learning rate retuning. Get those pieces solid and a matrix-based optimizer can move from a speedrun highlight to a routine option in large-scale training; on platforms such as Baidu AI Cloud, combined with general capabilities like containerized scheduling, object storage, and monitoring alerts, the engineering complexity of such training jobs can be reduced further.