Muon Optimizer in LLM API Docs: The Training Signals Behind the Interface Update
This article examines the technical signal behind a preview LLM API documentation update: the use of a new optimizer called Muon. It reviews optimizer fundamentals, the evolution from SGD and momentum to Adam, and the design ideas behind Muon, including orthogonal updates, polar decomposition, spectral normalization, and lower memory overhead. It also discusses what these choices mean for ultra-long-context training and how engineering teams can evaluate optimizers beyond API-level features.
From API Docs to the Training Core: Signals in a Technical Release
When an LLM API document goes live as a preview and is released alongside open source, external attention often goes first to surface-level metrics: how to call the API, context length, inference latency, and similar details. But the more important signals are often hidden in corners of the release notes that are easy to overlook—for example, the “new optimizer” specifically mentioned in this documentation.
An optimizer is the navigation system in the deep learning training pipeline. It determines the direction and step size in which model parameters move across the loss function surface. If the loss function tells you the elevation of your current position, and the gradient is like the downhill direction you feel with your foot, then the optimizer is the strategy center in the brain: Where should the next step go? How large should this step be? Should momentum be used to carry through a small pit? These decisions directly affect whether the model converges, how fast it converges, and how high the final accuracy can be.
This article does not restate every parameter in the API documentation. Instead, it focuses on one core technical signal revealed by the document: the training process uses a new optimizer called Muon. To ordinary users, this detail may seem insignificant. But for engineers who have trained large-scale models, it may be the most revolutionary part of the entire document.
The Three Basic Responsibilities of an Optimizer
Before going deeper into Muon, it is useful to establish a general framework for analyzing optimizers. Every optimizer, no matter how fancy its name, essentially has to solve three problems:
Step-size control: This is learning-rate adjustment. If the step is too large, parameters may oscillate around the optimum or even diverge. If the step is too small, training takes a long time and wastes resources. The ideal state is to accelerate appropriately in regions where the gradient is smooth and reduce the step size in steep regions near the bottom of the valley.
Escaping local optima: Real loss surfaces are far more complex than the two-dimensional curves in textbooks. They contain many local minima, saddle points, and flat regions. Relying only on gradient descent makes it easy for the model to get stuck in a small pit halfway up the mountain, mistakenly believing it has reached the global minimum.
Adapting to the update rhythms of different parameters: Parameters in different layers and positions may have gradients that differ by several orders of magnitude. A fixed learning rate cannot accommodate all parameters, so dynamic adjustment is needed.
The early idea of stochastic gradient descent (SGD) can be traced back to the research of French mathematician Cauchy in 1847, but in essence it simulates a “particle without mass” sliding across a surface—it can start and stop instantly and completely ignores physical inertia. In narrow “canyon” terrain, this characteristic causes severe oscillation: the gradient direction bounces back and forth between the canyon walls, making convergence highly inefficient.
From the Heavy Ball Method to the Momentum Revolution
The breakthrough came from Soviet mathematician Boris Polyak. In 1964, while studying optimization theory, he noticed that if this “massless particle” were given mass and inertia, then when it entered canyon terrain, momentum would make it continue accelerating along the valley floor while weakening the back-and-forth oscillation perpendicular to the valley floor. This is the classic Heavy Ball Method, and it became the theoretical foundation for later momentum optimizers, including Adam.
The core equations of the Heavy Ball Method can be simplified as:
v_{t} = μ·v_{t-1} - η·g_{t}θ_{t+1} = θ_{t} + v_{t}
Here μ is the momentum coefficient (usually around 0.9), η is the learning rate, and g_t is the current gradient. The momentum term v accumulates a weighted average of historical gradients, making the parameter update direction smoother and giving it the ability to cross small local pits.
However, the Heavy Ball Method uses a uniform learning rate for all parameters, and it performs poorly in scenarios with sparse features or parameters of different magnitudes. Around 2015, adaptive learning-rate methods such as AdaGrad and RMSProp accumulated the historical squared gradients of each parameter as a normalization denominator, so that the update step size became inversely related to the parameter’s own gradient history. Then came Adam, the most popular optimizer, which combined momentum with adaptive learning rates and became almost the de facto standard for deep learning training.
Adam’s Success and Limits
Adam’s update rule is roughly as follows:
- Maintain a first-moment estimate
m(the exponential moving average of gradients). - Maintain a second-moment estimate
v(the exponential moving average of squared gradients). - After bias correction for
mandv, update usingm / (√v + ε)multiplied by the learning rate.
The clever part of this design is that it computes a normalized update direction for each parameter, so the absolute magnitude of the gradient no longer affects the step size and only affects the direction. This has made Adam perform well in many natural language processing and computer vision tasks. Especially in Transformer training, Adam and its variants such as AdamW have become an almost undisputed default choice.
But Adam is not without shortcomings:
- Large memory overhead: It needs to store two additional state tables for the first and second moments. For models with hundreds of billions or even trillions of parameters, this memory occupation cannot be ignored.
- Debate over generalization performance: In some tasks, models trained with Adam achieve slightly lower final accuracy than carefully tuned SGD or SGD with momentum, especially in small-batch settings.
- Sensitivity to long-tail gradients: The exponential average of the second moment may be polluted by extreme gradient values, causing some parameters to enter a “stagnation zone” too early in later updates.
Therefore, when training extremely large models, the industry often has to weigh stable convergence from Adam against better generalization from SGD. This tension has persisted for a long time, until new optimizers such as Muon emerged.
Muon: From Direction-First Updates to Spectral Normalization
The Muon optimizer disclosed in this API documentation takes its name from a fusion of “Momentum” and “Orthogonal Update.” Its core idea is to move away from excessive dependence on the second moment and instead use the spectral geometry of the gradient matrix for more efficient parameter updates.
The key to understanding Muon is that, for a large model, the gradient itself is a high-dimensional tensor. Traditional Adam treats each scalar element as an independent individual, computes the second moment separately, and scales accordingly. Muon, by contrast, tends to treat the gradient as an overall structure and uses polar decomposition to project the update direction onto the “rotation” part of the gradient matrix.
Specifically, at each update step, Muon:
- Maintains a momentum buffer similar to the Heavy Ball Method, but this momentum acts on the “singular directions” of the entire matrix.
- Performs polar decomposition on the momentum matrix and extracts its orthogonal component as the main update direction.
- Multiplies this orthogonal direction by a scalar learning rate to complete the parameter update.
The direct benefit of this approach is that the update trajectory is almost unaffected by local fluctuations in gradient magnitude, allowing it to cross rugged loss landscapes more stably. At the same time, it no longer needs to store second-moment estimates, significantly reducing the optimizer’s memory footprint. When training ultra-long-context models, memory itself is a scarce resource, so this advantage of Muon can be amplified.
In addition, Muon can be interpreted mathematically as imposing a “spectral normalization constraint” on parameter updates—to a certain extent, it flattens the anisotropy of the loss surface and makes the convergence path closer to a geodesic. Intuitively, Adam is like an experienced hiker who constantly adjusts the direction and strength of each step according to the terrain. Muon is more like a skier who first observes the slope structure of the entire mountain, chooses an overall optimal route, and then glides down smoothly with momentum.
Engineering Implications for Ultra-Long Context
The model released this time focuses on “million-character ultra-long context.” This capability is a challenge for inference, and an even greater challenge for training. Long context means extremely large sequence lengths—for example, more than 100k tokens—and during backpropagation, gradients must cross a longer computation graph, making gradient explosion or vanishing highly likely.
Traditional Adam can barely work in this scenario, but second-moment estimates accumulate a large amount of noise. Especially in the early stages of training, when gradient variance is high, Adam’s second moment is often overly optimistic, leading to an effective learning rate that is too high and causing unstable “spikes.” Because Muon does not rely on the second moment and instead maintains update uniformity through orthogonal projection, it shows a smoother loss curve in long-sequence training.
At the same time, long-context training significantly increases activation memory usage, leaving less space for optimizer states. Muon’s low memory footprint allows teams to allocate more memory to model parameters and activations, or to support larger batch sizes, thereby improving hardware utilization.
Lessons Beyond the API Docs: Optimizer Selection as Engineering Thinking
The release of this API documentation reminds developers of a fact that is often overlooked: the final capability of a model depends not only on architecture and parameter count. Training infrastructure—especially the optimizer—also determines the ceiling of model quality.
For enterprise AI platforms, when choosing a foundation model or developing an in-house training framework, it is advisable to evaluate optimizers from the following dimensions:
- Memory overhead: For each trillion-parameter model, Adam requires about 16 extra bytes per parameter (fp32 momentum plus variance), while Muon-like methods can reduce this to below 8 bytes.
- Convergence speed and stability: Compare and validate on small-scale experiments, and check whether the loss curve oscillates repeatedly.
- Suitability for ultra-long sequences: Check whether the gradient norm distribution is uniform and whether additional gradient clipping is needed.
- Compatibility with distributed parallelism strategies: Understand how optimizer states are partitioned under model parallelism and pipeline parallelism.
Muon is not a universal silver bullet. On some tasks, it may underperform tuned Adam, but it represents a valuable direction of exploration: optimizers should make deeper use of the geometric structure of gradient tensors rather than treating them merely as collections of independent scalars. This idea may become one of the mainstream paradigms for next-generation large-model training.
Conclusion: Technical Highlights Ultimately Serve Application Value
Returning to the API documentation itself—million-character context, open weights, and a new optimizer—these technical highlights ultimately need to answer one question: can developers build intelligent applications that truly understand long documents, complex conversations, or even entire books at lower cost and with greater stability? Optimizer progress may seem remote, but it directly affects model training cost and final quality, and therefore determines whether the capabilities promised by the API documentation can be delivered.
For technical decision-makers focused on LLM deployment, it is worth looking beyond API call formats and understanding the changes in training methods behind them. After all, what truly determines the upper limit of a model is precisely those invisible “navigation system” parameters.
