A New Paradigm for Optimizers in Large-Scale Model Training

    This article examines why optimizer state has become a primary memory bottleneck in trillion-parameter training and how matrix-level optimizers address it. It explains the shift from element-wise adaptive updates to whole-matrix updates via orthogonalization, outlines the engineering challenges of scaling these methods, and offers a practical checklist for deciding whether and how to adopt a hybrid optimizer.

    1. The Starting Point: Optimizers Are Becoming the Main Memory Consumers in Large Model Training

    In pretraining at the trillion-parameter scale, compute budget is often not the only ceiling. Memory and communication are usually the first constraints to break. For a long time, adaptive moment estimation optimizers (commonly named in industry for their first and second moments) have been the default choice, for a straightforward reason: their per-parameter adaptation to the learning rate significantly reduces sensitivity to tuning and keeps training stable across a very wide range of hyperparameters.

    The cost, however, is equally clear. Maintaining two state buffers per parameter—the first moment and the second moment—means that in mixed-precision training, the optimizer state itself can take up more space than the model weights. A rough estimate for trillion-scale parameters, mixed precision, and conventional data-parallel sharding puts just the two moment buffers in the range of tens of TB. Add gradients, a master copy of the weights, activations, and temporary buffers, and memory is quickly exhausted. As a result, three things get squeezed at the same time:

    • The per-device batch size cannot grow, so throughput drops and gradient noise increases;
    • Context length is constrained, and long-text capability can only be bought with more aggressive sharding and recomputation;
    • Communication volume and memory movement become bottlenecks, and training cost rises superlinearly with scale.

    For this reason, innovation at the optimizer level is not an “academic curiosity.” It is a key variable that directly determines training feasibility and unit cost. Matrix-level optimization has been pushed to the forefront against this backdrop.

    2. How It Works: From “Element-Wise” to “Whole-Matrix”

    1. The Geometric Meaning of Element-Wise Adaptation

    Flattening a weight matrix into a collection of unrelated scalars, estimating first- and second-order gradient statistics for each scalar separately, and then deciding the step size accordingly—this is the essence of the element-wise paradigm. Its advantage is anisotropic adaptation; its drawback is that state overhead scales linearly with the number of parameters, and the update direction lacks any overall geometric constraint.

    2. The Core Action of Matrix-Level Updates

    Matrix-level optimization treats the entire weight matrix as a single, indivisible high-dimensional geometric object. Its update process can be summarized in three steps:

    1. Accumulate momentum to obtain a “candidate update matrix” with the same shape as the weights;
    2. Orthogonalize that matrix (in practice, a Newton–Schulz iteration is commonly used as an approximation to avoid an expensive full decomposition);
    3. Add the orthogonalized matrix to the weights with a uniform step size.

    The intuitive effect of orthogonalization is to flatten all singular values of the candidate update matrix to the same magnitude, so that the update moves “in step” across all directions and avoids a few directions dominating while the rest nearly stall. Because a second moment no longer needs to be stored per parameter, the optimizer state drops from two buffers to one (momentum), memory usage is nearly halved, and the space saved can be given directly back to batch size and context length.

    3. An Easy-to-Remember Analogy

    Element-wise optimization is like having each soldier judge the terrain and decide their own stride—flexible, but hard to coordinate. Matrix-level optimization first forms ranks, then advances in lockstep. The former excels on uneven terrain; the latter is clearly more efficient at moving through open ground. Real training is neither purely open nor purely rugged, which is exactly the motivation for the “mixed use” discussed later.

    3. From Toy Scale to Industrial Scale: Questions and Answers

    Matrix-level optimization was first validated only in small models around the hundred-million-parameter scale on fixed-compute race tasks: under a fixed compute budget, it reached the target loss in fewer training steps and set a new efficiency record at the time. The skepticism that followed was typical—“it works at small scale, but does it still hold when scaled up?”

    To answer this, “can it run” needs to be broken down into four engineering questions:

    • Numerical stability: Orthogonalization iterations may suffer singular-value collapse or overflow under fp16/bf16, requiring an appropriate choice of precision, scaling factor, and iteration count;
    • Parameter partitioning: Not all parameters are suited to matrix-form updates. Embedding layers, output heads, normalization, and biases are usually safer left to element-wise adaptive methods;
    • Coupling with parallelism strategies: Tensor parallelism splits one logical matrix into blocks, and orthogonalization needs cross-block information, so the sharding scheme must reserve a global view or rely on an approximation;
    • Learning rate and scheduling: The scale of matrix-level updates differs from that of element-wise updates, so warmup, peak learning rate, and the decay curve need to be recalibrated and old experience cannot be copied directly.

    A common practical form is a “hybrid optimizer”: the main hidden layers use matrix-level updates, while sensitive small parameters and the output layer keep element-wise adaptation, balancing stability against memory savings. The illustrative code below (structure only, not a specific framework API) shows the skeleton:

    1. # Pseudocode: parameter grouping and update skeleton for a hybrid optimizer
    2. for name, p in model.named_parameters():
    3. if p.ndim >= 2 and is_hidden_weight(name):
    4. m = momentum_buffer(p) # only one state buffer
    5. u = newton_schulz_orthogonalize(m) # iterative approximate orthogonalization
    6. p -= lr * u
    7. else:
    8. m, v = adam_state(p) # keep element-wise adaptation
    9. p -= lr * m / (sqrt(v) + eps)

    4. A Quantitative View of Engineering Gains and Costs

    The gains can be summarized in three points: optimizer state is halved; step efficiency improves thanks to more balanced update directions; and the memory freed up raises throughput and context length. The costs are equally clear: orthogonalization iterations add extra operators and a small amount of compute overhead; implementation complexity increases and must be coordinated with distributed sharding, recomputation, and checkpointing; and the cost of migrating hyperparameters is not zero.

    A practical rule for deciding “whether it is worth switching” is this: when model scale makes optimizer state the primary memory conflict and the team has the ability to build custom operators and debug distributed setups, the gains are usually significant; otherwise, sticking with mature solutions is more economical for small and medium tasks.

    5. Deployment Checklist

    1. First run small-scale controlled experiments, comparing the number of steps needed to reach the target loss under a fixed compute budget;
    2. Define the parameter grouping strategy clearly, and record which layers are excluded from matrix-level updates;
    3. Verify the numerical behavior of the orthogonalization iterations at the target precision, raising the precision of that operator if necessary;
    4. Recalibrate the learning rate and warmup, keeping the ability to roll back to the old configuration;
    5. Jointly debug with the parallelism scheme and confirm that update semantics remain consistent after sharding;
    6. Improve monitoring: memory curves, gradient norms, the singular-value distribution of update matrices, throughput, and communication share.

    6. Conclusion

    The move of optimizers from “element-wise adaptation” to “whole-matrix updates” is essentially trading geometric constraints for lower state overhead and better step efficiency. It is not a master key, but in the trillion-parameter regime it is an important lever for pushing training from “barely feasible” to “cost-controlled.” For engineering teams, the real competitive edge lies not in chasing a new buzzword, but in whether they can systematically get these four things right—memory, communication, numerical stability, and hyperparameter migration. This is also the direction most worth prioritizing when building a training foundation on general cloud capabilities such as a container platform, distributed storage, and monitoring and alerting.