Muon Optimizer: A New Paradigm for Training Trillion-Parameter LLMs

    This article examines why the Adam optimizer becomes a memory bottleneck at the trillion-parameter scale and how the Muon optimizer—born from a training speedrun challenge—addresses it through matrix-level orthogonalized updates. It covers the technical principles behind Muon, its memory savings (roughly halving optimizer state memory on a 1.6T-parameter model), and the engineering practices required for industrial deployment, including hybrid optimization strategies and stability safeguards.

    Muon Optimizer: A New Paradigm for Training Trillion-Parameter LLMs

    1. Introduction: The Optimizer Dilemma

    Throughout the evolution of large model training, Adam and its variants (such as AdamW) have dominated the optimizer landscape. With its adaptive learning rate mechanism, Adam independently maintains a first moment (momentum mean) and a second moment (gradient variance) for every parameter, delivering stable performance across the vast majority of tasks and becoming the de facto industry standard.

    However, as model sizes push toward the trillion-parameter scale, Adam’s hidden costs become fully exposed and gradually turn into a critical bottleneck for training efficiency. A new optimizer called Muon has emerged and been successfully validated in industrial-grade training of ultra-large models, marking an important paradigm shift in LLM training optimization.

    2. Adam’s Memory Dilemma

    2.1 The Memory Overhead of State Variables

    Adam’s adaptivity is not a free lunch. To maintain per-parameter adaptive learning rates, the optimizer must allocate two additional state spaces for every model parameter: the first moment estimate m and the second moment estimate v. In other words, beyond the weight itself and its gradient, each parameter carries two extra pieces of state.

    Consider a typical mixed-precision training setup: weights are stored in BF16 (2 bytes), while optimizer states are usually kept in FP32 (4 bytes). That means each parameter requires 4 + 4 = 8 bytes just for Adam states. For a 1.6-trillion-parameter model:

    1. Adam state memory ≈ 1.6 × 10^12 × 8 bytes ≈ 12.8 TB

    This does not include master weights, gradients, or activations. The optimizer states alone consume well over ten terabytes of GPU memory.

    2.2 The Chain Reaction: Costs Climbing Non-Linearly

    Once optimizer states occupy a large share of memory, they directly squeeze out two critical training resources:

    • Constrained batch size: Insufficient memory forces smaller batches, reducing GPU utilization and throughput.
    • Constrained context length: Activations for long-sequence training consume enormous memory, and the squeeze from optimizer states makes long-context training even more expensive.

    The end result is a non-linear surge in training cost, forcing engineers to adopt more aggressive distributed sharding strategies that further increase system complexity. It is precisely this memory pressure that has pushed the industry to seriously explore more “frugal” optimizer designs.

    3. The Origin of Muon: Born from a Speedrun Challenge

    3.1 A Training Efficiency Race

    Muon’s origin story is quite remarkable. In late 2024, a community model-training speedrun challenge attracted wide attention: how could one train a small GPT-like model to a target loss using the least compute and time? Participants squeezed every last drop out of the Adam optimizer, trying all kinds of hyperparameter tuning tricks.

    Researcher Keller Jordan took a different path, first implementing and submitting an optimizer named Muon in the competition’s code repository. His core finding: by orthogonalizing the gradients of hidden-layer parameters, the number of training steps needed to reach the target loss dropped dramatically, directly breaking the existing speedrun record.

    3.2 From Small-Scale Validation to Industrial Skepticism

    It should be noted objectively that Muon was initially validated only on models around 124M parameters. This raised a legitimate question: can a method that works in small-scale experiments withstand the industrial-grade training of models with hundreds of billions or even trillions of parameters? Ultra-large model training involves engineering challenges—loss spikes, gradient anomalies, numerical instability—that small models never encounter. Pushing Muon into industrial application was the critical leap accomplished by subsequent large-scale training practice.

    4. Technical Principles: A Paradigm Shift to Matrix-Level Optimization

    4.1 Element-Wise vs. Holistic Geometric Optimization

    The key to understanding Muon lies in recognizing its fundamental philosophical difference from Adam.

    Adam’s view is element-wise: it treats a weight matrix as a collection of unrelated scalar parameters, independently computing an adaptive learning rate for each element and updating it separately. This approach is fine-grained, but it ignores the geometric structure of the weight matrix as a whole.

    Muon’s view is matrix-wise: it treats a 1000×1000 weight matrix as an indivisible high-dimensional geometric object. During an update, Muon first fuses the gradient with momentum into an update matrix, then orthogonalizes that matrix (typically via Newton-Schulz iteration), so that the update direction satisfies approximate orthogonality, and finally applies the processed matrix to the weights as a whole.

    4.2 An Intuitive Analogy

    A marching-formation analogy captures the difference: Adam faces a crowd of individuals “fighting on their own,” issuing a separate marching command to each person and adjusting them one by one. Muon, by contrast, first arranges everyone into a neat square formation and then moves them forward with unified steps. From a command-efficiency standpoint, the latter is clearly superior—one instruction drives the entire matrix to update in concert, with no need to maintain independent adaptive states per parameter.

    4.3 Why Orthogonalization Works

    After orthogonalization, the gradient matrix’s singular values are flattened toward a near-uniform distribution, meaning the update applies roughly equal “force” in all directions and avoids domination by a few leading directions (large singular values). The intuitive effect: “long-tail directions” in the weight matrix that would otherwise update slowly also receive sufficient training signal, accelerating convergence. This explains why Muon reached the target loss in significantly fewer steps during the speedrun.

    5. Memory Gains: Muon’s Industrial Value

    5.1 Substantial Reduction in State Memory

    Muon only needs to maintain a single momentum buffer—no second-moment state. Using the same 1.6T-parameter model:

    1. Muon momentum memory ≈ 1.6 × 10^12 × 4 bytes ≈ 6.4 TB

    Compared with Adam’s roughly 12.8 TB, optimizer state memory is cut in half, freeing up more than 6 TB of valuable GPU memory. This reclaimed memory can be returned to batch size and context length, translating directly into higher training throughput and longer-sequence training capability.

    5.2 The Compute Trade-Off

    It should be noted that orthogonalization introduces additional computation. In practice, however, Newton-Schulz iteration involves only matrix multiplications, which map extremely well to GPU parallelism; its overhead is well justified by the savings in communication and memory. This is a classic “trade compute for memory” bargain—and in today’s large model training, memory is often the scarcer resource.

    6. Key Practices for Production Deployment

    6.1 Hybrid Optimization Strategy

    An important lesson from industrial practice: Muon is not suitable for all parameters. It primarily applies to the two-dimensional weight matrices of hidden layers (i.e., linear layer weights). For embedding layers, LayerNorm parameters, biases, and output heads—non-matrix or special-position parameters—AdamW is still used. This hybrid strategy of “Muon for matrices, Adam for the rest” balances convergence efficiency with training stability.

    6.2 Stability Safeguards

    Training at ultra-large scale also requires a set of supporting engineering measures:

    1. Gradient clipping: Prevents occasional gradient spikes from breaking the numerical stability of orthogonalization iterations.
    2. Decoupled learning rates: Since orthogonalized updates have roughly uniform magnitudes, Muon needs its own learning-rate scaling rule (typically related to matrix dimensions).
    3. Momentum warmup: Gradually increase the momentum coefficient early in training to avoid update oscillation during cold start.
    4. Monitoring and alerting: Build a comprehensive monitoring and alerting system for the loss curve, gradient norms, and the singular-value distribution of weights, so training anomalies are caught immediately.

    6.3 Infrastructure Support

    Whether using Adam or Muon, training trillion-scale models depends on robust underlying infrastructure. In practice, teams typically need an elastic container platform to schedule large-scale heterogeneous compute, high-performance object storage to manage massive training data and checkpoints, and logging and monitoring services to ensure observability of training jobs. For example, general-purpose cloud capabilities from Baidu AI Cloud—such as its container platform, object storage, logging service, and monitoring and alerting—can provide end-to-end support for such large model training workloads, from compute scheduling to data management and from troubleshooting to stability assurance, allowing training teams to focus on algorithms and optimization itself.

    7. Takeaways and Outlook

    Muon’s industrial application offers several profound lessons for large model training:

    First, break path dependency. Adam has ruled the optimizer field for nearly a decade, but “industry standard” does not equal “optimal solution.” When constraints (memory, scale) undergo qualitative change, the hidden costs of the old paradigm are dramatically amplified—and that is exactly the window for a new paradigm to enter.

    Second, the value of a geometric perspective. Treating weight matrices as holistic geometric objects rather than collections of scalars represents the direction of “structured optimization” in deep learning. This thinking may extend in the future to tensor-level optimization, inter-layer coordinated optimization, and other macro-level granularities.

    Third, the gap from small experiments to large-scale production can be crossed. Muon’s journey—from a 124M-parameter speedrun experiment to industrial validation on trillion-parameter models—proves that the path of “rapid small-scale validation + large-scale engineering hardening” is viable.

    Looking ahead, as model sizes continue to grow, competition in optimizer technology will unfold along three dimensions: memory efficiency, convergence speed, and numerical stability. Muon’s success is only the beginning—more efficient and resource-frugal next-generation optimizers are worth the entire industry’s anticipation.