From Adam to Orthogonalized Optimizers: Reducing Memory Costs in LLM Training
This article examines optimizer memory as an underappreciated cost center in large-model training and introduces orthogonalized matrix optimizers as an alternative to Adam-style element-wise updates. It explains the core mechanism, memory savings, trade-offs, hybrid strategies, and engineering considerations for scaling from small-model experiments to industrial training.
1. Optimizers: The Underestimated Cost Center in LLM Training
Discussions of large-model training costs usually focus on compute—GPU count and FLOPs—and data scale, while the optimizer itself is often overlooked. In large-scale training, the memory occupied by optimizer state variables can be enough to determine whether a training run is feasible and economical.
Consider the mainstream Adam-family optimizers. Their core mechanism maintains two additional state variables for every trainable parameter: the first-moment estimate (momentum term m) and the second-moment estimate (the denominator v for adaptive learning rates). Under mixed-precision training frameworks, these two states are typically stored in FP32, meaning that for every trained parameter, optimizer state alone requires roughly 8 bytes of additional GPU memory. Add the master weight copy and gradients, and Adam’s actual memory overhead far exceeds the footprint of the model parameters themselves.
For models with trillions of parameters, optimizer states alone can consume more than ten terabytes of GPU memory. This directly crowds out two critical training resources: batch size and context length. An insufficient batch size affects training stability and throughput efficiency; a limited context length constrains the model’s long-text capability. Therefore, slimming down the optimizer is fundamentally a system-level cost optimization problem.
2. Core Idea of Orthogonalized Optimizers: From Element-wise to Whole-Matrix Updates
In recent years, a class of matrix optimization methods based on gradient orthogonalization has attracted broad attention. A representative implementation emerged from the open-source NanoGPT speed challenge, where researchers first proposed and validated it in extreme small-scale model training experiments. Its starting point is very different from Adam’s:
2.1 Adam’s Element-wise Worldview
Adam treats a weight matrix as a collection of independent scalars, each with its own momentum and adaptive step size. This fine-grained adaptivity brings training robustness, but the cost is that state variables scale linearly with the number of parameters—the root cause of the memory bottleneck.
2.2 The Orthogonalization Method’s Geometric Worldview
An orthogonalized optimizer treats the weight matrix as an indivisible high-dimensional geometric object. Its update flow can be summarized as follows:
- Accumulate momentum on the gradients.
- Project the accumulated update matrix into an (approximately) orthogonal matrix using an approximation algorithm similar to Newton-Schulz iteration.
- Add the orthogonalized update direction to the weight matrix with a uniform scaling coefficient.
Expressed as illustrative pseudocode:
def muon_update(grad, momentum, beta, ns_iters):buf = beta * momentum + grad # momentum accumulationu = orthogonalize(buf, ns_iters) # approximate orthogonalization (matrix power iteration)return scale_factor * u # uniform step scaling
The mathematical intuition is that an orthogonal matrix has all singular values equal, which effectively spreads the update evenly across all singular directions of the parameter matrix. This avoids the problem where a few directions dominate the update while most directions are drowned out. At the experimental level, such methods have significantly reduced the number of training steps required to reach a target loss in small- to medium-scale language model training.
3. Why Does the Memory Advantage Hold?
Another key benefit of orthogonalized methods is memory efficiency:
- No second moment is required. They retain only the momentum buffer, eliminating Adam’s largest state component. Optimizer-state memory overhead is directly halved or even lower.
- The update matrix can be stored in the same low precision as the training weights, further compressing state size.
- Orthogonalization itself requires only several matrix multiplications during the gradient update (Newton-Schulz iteration does not involve SVD decomposition). The extra computation is controllable and suitable for parallel execution on GPUs.
This means that memory originally consumed by optimizer states can be released for larger batch sizes and longer context windows, indirectly raising training throughput and the model’s capability ceiling.
4. The “Iron Balls Rolling Downhill” Analogy: Skirmishers vs. a Macedonian Phalanx
A vivid analogy can help explain the difference between the two approaches: imagine parameter updates as a group of iron balls rolling downhill toward a valley.
Adam is like commanding loose skirmishers—each ball has its own step size and direction instructions. It is fine-grained but expensive to command, requiring separate bookkeeping for every ball. An orthogonalized optimizer is like commanding a phalanx marching in formation—first align all the iron balls (orthogonalization), then advance at a uniform rhythm. Command efficiency is higher, and discipline is stronger.
This “orderliness” naturally raises a question: would a real battlefield really march in a phalanx? In other words, could a uniform update step harm certain parameter directions that need fine-grained adjustment? This is indeed a focus of current research discussion:
- A common practice is to apply orthogonalized updates only to hidden-layer 2D weight matrices, while retaining element-wise optimizers such as AdamW for embeddings, output heads, and similar structures, forming a hybrid strategy.
- Orthogonalized update directions combined with independently scaled learning rates can preserve some flexibility at the matrix level.
- Learning-rate scheduling, weight decay, and other hyperparameters in large-scale training need to be retuned for this method; Adam’s empirical values cannot simply be copied over.
5. From Small-Model Experiments to Industrial Deployment
Such methods were initially validated only on small models with millions to hundreds of millions of parameters. Whether they can scale to hundreds of billions or even trillions of parameters is a question they must answer before industrial deployment. Recent practice indicates that orthogonalized optimizers are highly compatible with existing distributed training infrastructure—data parallelism, tensor parallelism, pipeline parallelism, and ZeRO-style state sharding—because their states are lighter and therefore easier to shard and recompute.
For engineering teams, directions worth attention include:
- Hybrid optimization strategies: choosing different optimizers for different parameter groups.
- Communication overhead evaluation: whether the extra computation introduced by orthogonalization is offset by the larger batch size enabled by memory savings.
- Stability validation: Loss-curve smoothness under long training cycles, learning-rate warmup, and decay curves.
6. Conclusion
Optimizer innovation is moving from “fine-tuning Adam hyperparameters” toward “redesigning the geometric structure of updates.” Orthogonalized matrix optimization methods demonstrate the feasibility of challenging Adam’s dominance with fewer optimizer states and fewer convergence steps. Although large-scale scenarios still have open issues in hyperparameter tuning and stability, the idea of reducing optimizer memory overhead and returning resources to batch size and context already offers a promising technical direction for cost optimization in large-model training. For teams planning large-scale training, reserving a pluggable optimizer abstraction layer in the training pipeline is an engineering decision worth investing in.
