Optimizer Breakthroughs Behind LLM API Upgrades
This article explains how optimizer technology shapes the capability ceiling of large language models during training. It traces the evolution from vanilla gradient descent to momentum and adaptive learning rate methods, then introduces matrix-based optimizers that treat layer parameters as matrices and orthogonalize the update. It also outlines practical guidance for engineering teams on evaluating memory overhead, throughput, numerical stability, staged rollout, observability, and API-side selection criteria.
1. Introduction: Why API Upgrades Start on the Training Side
Whenever a new LLM capability is exposed through a new API, public discussion tends to focus on surface-level details such as parameter count, context length, and invocation patterns. What actually determines the capability ceiling of a model is the optimization process during training. One of the most discussed technical topics recently is the introduction of a new class of optimizers. This article does not target any specific product. Instead, it abstracts the topic into a general technical question: how have optimizers evolved in modern LLM training, what new ideas do matrix-based optimizers bring, and how should engineering teams evaluate and select them?
2. What an Optimizer Really Is: The Navigator of Deep Learning
Training can be compared to a blindfolded person placed in a rolling mountain range, with the goal of reaching the deepest point of a valley. The person has only two tools:
- Loss value: tells you the current altitude.
- Gradient: like probing the slope of the ground with your feet, telling you which side goes downhill.
The optimizer is the walking strategy in the person’s head. It decides two things: which direction to step, and how large the step should be. In engineering terms, it usually answers three questions.
2.1 Step Size Control (Learning Rate)
If the step is too large, you may leap across the valley floor and up the opposite slope, showing up as loss oscillation and difficulty converging. If the step is too small, the training cycle stretches indefinitely and compute costs spiral out of control. The ideal strategy is adaptive: move faster on gentle terrain and slow down near a steep valley floor.
2.2 Escaping Local Minima and Saddle Points
Real loss surfaces contain many small pits halfway up the mountain, known as local minima, as well as saddle points where the gradient is close to zero but the point is not a minimum. Walking only according to the instantaneous gradient direction makes it easy to get trapped and mistakenly believe you have reached the global valley floor.
2.3 Direction Correction for Parameter Updates
The raw gradient is given independently per coordinate, but parameters are strongly coupled. Making the update direction more “reasonable” is the core of much subsequent work.
3. Evolution: From Naive Descent to Momentum and Adaptation
3.1 Limitations of Naive Gradient Descent
The basic idea of stochastic gradient descent can be traced back to nineteenth-century research on solving for extrema, but its physical assumption is unreasonable: it simulates a massless particle that can instantly reach maximum speed and brake instantly. In a long, narrow canyon, this setup causes updates to bounce repeatedly between the two walls, resulting in extremely low convergence efficiency.
3.2 Momentum: Giving the Particle Mass
In the 1960s, Soviet mathematician Boris Polyak proposed the heavy ball method while studying optimization theory. The core intuition is to give the sliding particle mass and inertia. The update can be written as:
v_t = beta * v_{t-1} + grad_ttheta_t = theta_{t-1} - lr * v_t
Inertia brings two benefits: it suppresses lateral oscillation on both sides of the canyon, and it lets updates keep accelerating in a consistent direction. The exponential moving average form developed later further reduces storage of historical states and sensitivity to tuning, and has become the most common momentum implementation in deep learning.
3.3 Adaptive Learning Rate: Per-Parameter Adjustment Based on History
The second line of thinking is per-parameter adaptation. It maintains a moving average of the squared gradient for each parameter and uses it to normalize the update, effectively “moving faster in flat directions and slower in steep directions.” These methods significantly reduce the burden of tuning the learning rate and offer clear advantages in sparse feature scenarios, but they also bring two engineering problems: they require storing extra state equal in size to the parameters, increasing memory overhead; and on some tasks, generalization is less stable than momentum-based naive methods.
3.4 Combining Both and Engineering Trade-offs
A common practice today is to combine momentum with adaptive normalization, together with learning rate warmup, decoupled weight decay, and gradient clipping. These components together form the default configuration for LLM training today.
4. Matrix Optimizers: Treating Parameters as Matrices
The recent technical highlight is a shift in perspective: instead of treating parameters as a long list of scalars, restore the parameters of the same layer to a matrix structure and process the update at the matrix level, for example by orthogonalizing the momentum matrix and then multiplying it back by a suitable scaling factor.
The intuitive motivation is that orthogonalization weakens directions with vastly different magnitudes in the update, making contributions across directions more balanced and improving ill-conditioning caused by a poor condition number. Expressed as illustrative pseudocode:
# Illustrates the core idea only; not a runnable implementationm = beta * m + grad.reshape(shape) # accumulate momentum, keep matrix shapeu = orthogonalize(m) # orthogonalize the updateupdate = scale * u # apply scaling by layer and shapeparam -= lr * update
It is worth emphasizing that these methods usually still need to work with adaptive ideas to determine the scaling factor, and in engineering practice matrix processing is often enabled only for two-dimensional weight matrices, while biases, normalization parameters, and others still follow the regular path.
5. Evaluation and Deployment Recommendations
- Memory and throughput trade-off: matrix processing introduces extra computation and state, so measure throughput per unit and peak memory in practice rather than looking only at theoretical convergence speed.
- Numerical stability: orthogonalization involves iterative solving, so pay attention to numerical behavior under low-precision training and increase the precision of this step when necessary.
- Enable by module: start with small-traffic comparison experiments on some layers, confirm the gains, and then roll out fully.
- Observability support: use general logging services and monitoring and alerting capabilities to track metrics such as loss curves, gradient norms, and update norms, avoiding black-box tuning.
- API-side perspective: for consumers, improvements in training-side optimizers ultimately show up as more stable capability at the same compute budget. When selecting a service, focus on consistency, rate limiting policies, and observability data rather than a single metric.
6. Conclusion
The main thread of optimizer evolution moves from the naive assumption of a “massless particle” to introducing inertia, then per-parameter adaptation, and finally matrix structure priors. Understanding this thread is more valuable than memorizing the name of any single method: it helps us judge where the capabilities of new APIs and new models come from and make more robust engineering decisions.
