Muon Optimizer for LLM Training: Advantages, Memory Savings, and Industrial Adoption
This article explains why optimizer state has become a major memory bottleneck in large-scale LLM training and how matrix-level orthogonalized updates, such as those used by the Muon optimizer, address it. It compares element-wise adaptive methods with matrix-level updates, outlines four engineering hurdles for production use—parameter grouping, numerical stability, distributed adaptation, and hyperparameter retuning—and provides a reusable memory estimation framework. It also covers stability monitoring, fallback design, and a staged rollout approach for teams evaluating lower-memory optimizers.
1. The Starting Point: Optimizers Are Becoming the Main Memory Consumer in LLM Training
Once parameter counts reach the trillion scale, the training bottleneck is often no longer compute but GPU memory. Take element-wise adaptive optimization methods as an example: they maintain two additional states per parameter, a first moment and a second moment. Under mixed-precision training, these two states are usually stored at higher precision, and their total size scales linearly with the number of parameters. A rough estimate for a trillion-parameter dense model suggests that optimizer states alone can occupy tens of TB of memory, not counting parameter copies, gradients, activations, and communication buffers.
The consequences are cascading. The headroom left for activations shrinks, forcing teams to reduce per-device batch size, shorten context length, or rely more heavily on sharding and recomputation. As communication and recomputation increase, end-to-end throughput drops and the cost per token rises. Reducing optimizer state overhead is therefore fundamentally about freeing up space for batch size and context length.
2. Two Optimization Philosophies: Element-Wise Adaptation vs. Matrix-Level Updates
Element-wise adaptive methods treat a weight matrix as a large collection of independent scalars. They estimate first- and second-order gradient statistics for each scalar separately and then decide the step size one by one. The advantage is direction-wise adaptivity and robustness to sparsity and noise; the cost is that the number of states is on the same order as the parameter count, and the update direction lacks a global geometric constraint.
Matrix-level orthogonalization methods treat each layer’s weights as a high-dimensional geometric object that should not be arbitrarily broken apart. They also maintain momentum, but do not store second-order statistics for every element. Instead, they orthogonalize the momentum matrix to obtain an update matrix with balanced scale across directions, and apply it to the weights in a single step. An intuitive analogy: the former is like individuals acting independently who each need to be assigned a step, while the latter is like forming a square formation and advancing under one command, with lower coordination and overhead.
It is worth emphasizing that orthogonalization does not mean “neater is better.” Its benefits come from two points: first, the update scale is balanced across directions, reducing excessive stretching in individual directions; second, the second-moment state is eliminated, significantly reducing memory usage.
3. Four Hurdles to Move from Experimental Technique to Industrial Solution
These methods were initially validated only on small models at the hundred-million parameter scale. Scaling up introduces new problems, and engineering typically needs to address four things:
- Parameter grouping. Apply orthogonalization only to the 2D weight matrices in hidden layers. Embedding layers, output heads, normalization, and biases continue to use element-wise adaptive methods to avoid breaking semantic and numerical behavior.
- Numerical stability. Orthogonalization involves iterative approximation and matrix norm scaling, requiring a reasonable number of iterations, precision strategy, and scaling bounds to prevent numerical degradation at extreme scales.
- Distributed adaptation. Matrix-level updates are naturally coupled with the sharding strategy. Update computation and communication under tensor parallelism, pipeline parallelism, and optimizer state sharding need to be re-orchestrated; otherwise, the memory saved will be consumed by additional communication.
- Hyperparameter transfer. Momentum coefficients, orthogonalization strength, learning rate, and warmup strategy need to be recalibrated as scale changes. The optimal configuration on small models cannot be directly extrapolated.
Illustrative pseudocode (expressing the flow only, not any specific implementation):
# g: gradient of this layer's weights; buf: momentum bufferbuf = momentum * buf + gu = orthogonalize(buf) # iterative approximation to obtain a near-orthogonal matrixscale = max(1.0, norm(u)) # scale normalization to prevent uncontrolled update magnitudew = w - lr * (u / scale) # apply once to the entire layer's weights
4. How to Calculate the Memory Budget: A Reusable Estimation Framework
When evaluating options, it is recommended to break memory into six items and estimate them separately: parameter copies, gradients, optimizer states, activations, communication buffers, and fragmentation plus reserved space. Optimizer state can be approximated as “number of state copies × parameter count × bytes per element.” Element-wise adaptive methods typically use two copies, while matrix-level orthogonalization keeps only one momentum buffer, roughly halving the state overhead. The saved space should be explicitly converted into gains in batch size or context length, and controlled experiments should be run on a small-scale cluster, recording throughput, convergence curves, and peak memory to avoid the situation where memory is saved on paper but not in practice.
5. Stability and Observability Practices
- Monitoring metrics: the approximate orthogonality error of the update matrix, the distribution of gradient and momentum norms, the effective learning rate per layer, and the frequency of loss spikes.
- Fault tolerance design: set upper and lower bounds for norm scaling and iteration counts; fall back to the element-wise adaptive path to continue training when anomalies occur.
- Training workflow: run short controlled experiments first, then scale up gradually; include optimizer state sharding, recomputation granularity, and batch strategy in the experiment matrix.
- Platform-side support: use a container platform to orchestrate training jobs, object storage to save checkpoints, logging and monitoring services to track metrics, and a message queue to decouple the data pipeline.
6. Conclusion
The distinctive advantages of matrix-level orthogonalized optimization are concentrated in three points: lower memory usage, more balanced update scale across directions, and freed-up space for batch size and context length. It is not an unconditional replacement for element-wise adaptive methods; it requires parameter grouping, numerical stability, distributed adaptation, and hyperparameter recalibration to enter industrial training. The practical recommendation for engineering teams is: start with a memory budget table, run small-scale controlled experiments first, then scale up in stages, and incorporate stability metrics into routine observation.
