Optimizers for Large Model Training: Evolution, Principles, and Engineering Practice
A newly released open-source large model preview has drawn attention for supporting ultra-long context windows of up to a million tokens. Behind this capability lies a key but often overlooked breakthrough: a new type of optimizer used during training. This article explains how optimizers guide deep learning training, traces their evolution from SGD and momentum-based methods to adaptive and modern orthogonalization-based optimizers, and outlines practical engineering considerations for large-scale training in the cloud, such as mixed precision, optimizer state sharding, and learning rate scheduling.
The Optimizer: The Navigator of Deep Learning Training
A recent preview release of a new-generation open-source large model has attracted widespread attention for its ability to handle context windows of up to a million tokens. While the model’s capabilities are impressive, developers are even more interested in the training breakthroughs behind it. Among these details, one stands out: a novel optimizer adopted during training. As the “navigator” of deep learning training, the optimizer directly determines whether a model can converge efficiently and stably. This article takes this as an opportunity to examine the core principles of optimizers and how they have evolved.
The Optimizer’s Core Mission
To understand optimizers intuitively, the classic “descending a mountain blindfolded” analogy still works. Imagine being blindfolded and placed somewhere in a rolling mountain range, with the goal of reaching the deepest valley. In this scenario, the loss function represents your current altitude, and the gradient (computed via backpropagation) is the slope you feel with your feet, indicating the downhill direction.
The optimizer is the decision-making strategy in your brain: it determines where to step next and how big the stride should be. A good optimizer must solve two core problems:
Controlling step size (learning rate adjustment): While descending, strides that are too large may overshoot the valley bottom and land on the opposite slope, causing the loss to oscillate and preventing convergence. Strides that are too small make training painfully slow. Modern optimizers need adaptive adjustment: accelerating on flat terrain and slowing down on steep slopes near the valley bottom.
Escaping local optima: Real terrain is full of small pits on the hillside (local optima). Relying on instinct alone makes it easy to get stuck. The optimizer needs mechanisms to help the model escape these “dead ends.”
From a Massless Particle to Physical Momentum
In the early days of deep learning, stochastic gradient descent (SGD) was the most fundamental method, with roots tracing back to French mathematician Augustin-Louis Cauchy in 1847. Standard gradient descent mathematically simulates a “massless particle” sliding along a surface—one that can instantly accelerate to full speed and brake instantly. This is computationally simple but defies physical intuition, and it performs poorly on complex terrain.
In 1964, Soviet mathematician Boris Polyak broke this assumption. While studying optimization theory, he observed that on long, narrow “canyon” terrain, standard gradient descent oscillates violently as its step directions keep hitting the canyon walls, converging extremely slowly.
Polyak proposed an idea with strong physical intuition: what if we give this sliding particle “mass” and “inertia”? This is the famous heavy ball method. Its core logic can be expressed in pseudocode:
v = gamma * v + learning_rate * gradienttheta = theta - v
Here, v represents velocity (accumulated historical gradients), and gamma is a friction coefficient. With the heavy ball method, the model’s descent considers not only the current slope but also previous momentum. When the “ball” encounters a small pit, its accumulated inertia helps it roll out of the local optimum. In canyon terrain, momentum dampens oscillations in the transverse direction while reinforcing movement in the downhill direction, greatly improving convergence speed.
Adaptive Optimization and the Rise of Modern Large Models
As neural networks grew deeper, the heavy ball method solved part of the momentum problem, but using a single learning rate for all parameters became a bottleneck. The community then introduced the Adam optimizer (Adaptive Moment Estimation), which combines momentum with adaptive learning rate adjustment, computing an independent adaptive learning rate for each parameter. This technique dominated deep learning training for a long time.
In the training of the latest generation of large models, however—with hundreds of billions of parameters and million-token context windows—traditional adaptive optimizers began showing limitations in memory usage and computational efficiency. The community has therefore explored new optimizer architectures. For example, recently prominent optimizers introduce more complex mathematical transformations such as matrix orthogonalization, aiming to preserve the orthogonality of gradients during large-scale parameter updates. This improves training stability while significantly reducing memory consumption. Adopting such optimizers has been one of the key technologies enabling successful pretraining over ultra-long contexts.
Engineering Practice for Large-Scale Cloud Training
In real-world enterprise-scale model training, optimizer selection and tuning depend on underlying compute and cloud platform support. On general-purpose cloud platforms such as Baidu AI Cloud, developers can leverage container services and distributed training frameworks to implement complex optimizer logic efficiently.
When training large models in the cloud, several practices are typically worth considering:
Mixed-precision training and optimizer state compression: When using cloud GPU compute, combining the memory optimization features of new optimizers with mixed-precision techniques can further compress the memory occupied by optimizer states, supporting larger batch sizes.
Distributed optimizer state sharding: For models with tens of billions of parameters or more, optimizer states can consume enormous memory. With cloud-native distributed training frameworks, optimizer states can be sharded across nodes with computation and communication overlapped, ensuring the advantages of new optimizers are fully realized at cluster scale.
Learning rate warmup and decay scheduling: No matter how advanced the optimizer, a sound scheduling strategy remains essential. Warmup in the early training phase, combined with decay strategies such as cosine annealing, helps new optimizers navigate the initial gradient oscillation period more smoothly.
Conclusion
From Cauchy’s gradient descent to Polyak’s heavy ball method, and now to novel optimizers designed for extremely large parameter counts, optimization theory in deep learning has evolved through a blend of physical intuition and rigorous mathematics. The latest generation of large models has achieved breakthroughs in long-context capability not only through model architecture, but also directly through innovations in underlying training algorithms such as optimizers. For developers, understanding the principles behind these optimizers will help make better technology choices in future model training and fine-tuning work.
