A New Paradigm for Optimizers in Large-Scale Model Training

    Optimizer state memory, not compute, often becomes the first bottleneck in trillion-parameter pre-training. This article explains why adaptive optimizers are expensive at scale, how matrix-level updates reduce that cost by treating each weight layer as a single geometric object, and what it takes to move from small-model validation to production: scale extrapolation, numerical precision, parallel sharding, and system stability. It also provides a reusable method for estimating memory savings and translating them into larger batches, longer contexts, or lower parallelism, along with practical guidance on layered enablement, observability, elastic resources, and cost control.

    1. Where the Problem Starts: Optimizer State Is Eating the Training Budget

    In trillion-parameter pre-training, GPU memory often becomes a bottleneck before compute does. The adaptive optimization methods that have long dominated the field maintain a first moment and a second moment for every parameter. Beyond mixed-precision training, this requires two additional storage allocations on the same order of magnitude as the parameter count itself. At a scale of hundreds of trillions of bytes of parameters, these two states alone can consume over ten terabytes of GPU memory, and that is before accounting for gradients, parameter copies, activations, and communication buffers.

    The consequences are cascading: less room is left for larger batches and longer contexts, parallel partitioning strategies are forced to change, pipeline bubbles and communication overhead increase, and the cost per unit of effective compute is pushed up. Reducing optimizer state overhead is therefore not a micro-optimization. It is a structural problem that directly determines training feasibility and iteration speed.

    2. Two Optimization Philosophies: Element-wise Adaptation vs. Matrix-level Updates

    Mainstream adaptive methods treat a weight matrix as a large collection of independent scalars. They estimate first- and second-order gradient statistics element by element, then scale each element separately. The advantage is generality and robustness, with low sensitivity to sparse and noisy gradients. The cost is that state overhead scales linearly with the parameter count.

    The matrix-level approach treats a layer’s weights as a single, indivisible high-dimensional geometric object. It first fuses the gradient with momentum, then orthogonalizes the fused result to produce an update matrix whose scale is roughly consistent across directions, and applies that update to the weights in one step. Intuitively, this flattens the components of the update that have excessive magnitude differences or cancel each other out in direction, so that parameters move along more balanced directions in parameter space.

    A simple analogy: the element-wise method lets each small ball decide how far to roll on its own, which requires separate bookkeeping for every ball. The matrix-level method first arranges the balls into a neat formation and then advances them together at a uniform pace. Coordination and bookkeeping costs drop significantly, but whether the formation remains optimal at all times needs to be verified empirically.

    A schematic implementation skeleton (expressing the computation flow only, not a specific framework API):

    1. # g: gradient for this layer; buf: momentum buffer
    2. buf = beta * buf + (1 - beta) * g # momentum fusion
    3. u, _, v = svd(buf) # orthogonalization; can be approximated iteratively
    4. update = u @ v # orthogonal update with normalized scale
    5. w = w - lr * update # single-step application to weights

    In practice, a full decomposition is usually not performed directly. Instead, a few iterations of an orthogonalization approximation (for example, an iterative scheme based on matrix multiplications) are used to bring the cost down to the level of a few matrix multiplications. At the same time, this path is enabled only for two-dimensional hidden-layer weights. Embedding layers, normalization parameters, biases, and the output head are still handled by adaptive methods to preserve stability.

    3. Four Gates from “Runs on Small Models” to “Production-ready”

    The new optimizer was initially validated only on models at the hundred-million-parameter scale, and the skepticism was direct: if convergence is faster at small scale, does that still hold after scaling up? Crossing this gap requires solving four problems in sequence.

    1. Scale extrapolation. The statistical properties of the update distribution change with width and depth. The learning rate and momentum coefficients need to be scaled by width, and staged validation should be performed from hundreds of millions to billions of parameters, checking whether the loss curve and gradient norm stay within the same order of magnitude.
    2. Numerical precision. Orthogonalization involves repeated matrix multiplications, and errors accumulate at low precision. This step usually needs to be completed at higher precision, while the rest remains in mixed precision to control overhead.
    3. Parallel partitioning. Tensor parallelism splits a logical matrix into multiple shards, but orthogonalization is a global operation that requires additional communication or parameter aggregation. How it coexists with pipeline parallelism and expert parallelism partitioning is the key factor determining throughput.
    4. System stability. Once the update magnitude is normalized, the method becomes more sensitive to the learning rate and warmup strategy. Gradient clipping, anomaly detection, and fast rollback mechanisms are needed to support it.

    4. How to Do the Memory Math: A Reusable Estimation Method

    Before deciding whether a new approach is worth adopting, do a quantitative comparison rather than relying on intuition:

    1. State memory ≈ parameter count × bytes per parameter
    2. Element-wise adaptive: parameter copy + gradient + 2 states → largest coefficient
    3. Matrix-level approach: parameter copy + gradient + 1 momentum → roughly half the coefficient
    4. Memory saved can be converted into: larger batch / longer context / lower parallelism

    Only after converting the savings into “additional batch size and sequence length that can be supported” and estimating the resulting throughput gain can you judge whether the benefit covers the implementation and tuning costs. Empirically, the benefit is most pronounced in ultra-large-scale, long-context scenarios. On small models the difference is limited and not worth the added complexity.

    5. Adoption Recommendations and Cloud Practices

    • Layered enablement: use matrix-level updates only for two-dimensional hidden-layer weights, and keep adaptive methods for the remaining parameters to balance convergence and stability.
    • Small-scale extrapolation validation: first run controlled experiments at the hundred-million and billion parameter scales, comparing the number of steps and wall-clock time needed to reach the same loss, rather than looking only at single-step loss.
    • Observability first: bring gradient norm, update norm, number of orthogonalization iterations, and state memory into monitoring, alerting, and logging services, and automatically pause while preserving a checkpoint when anomalies occur.
    • Elastic resources: place training and checkpoints on storage and container platform capabilities suited to each, use object storage for long-cycle checkpoints, and use monitoring and alerting to cover hardware and job health.
    • Cost control: convert optimizer state savings into resource billing, and decide cluster size together with elastic scaling to avoid paying for peak capacity over the long term.

    If you are using relevant Baidu AI Cloud capabilities, the workflow above can be mapped to a general combination of a container platform hosting training jobs, object storage holding checkpoints, and logging plus monitoring and alerting providing observability, giving a clearer resource picture without changing the algorithm logic.

    6. Conclusion

    The value of the matrix-level optimization idea is not to replace adaptive methods, but to turn optimizer state from a burden linearly bound to the parameter count into an adjustable engineering variable. For trillion-parameter training, this may be the key element that determines whether iteration can be completed within a fixed budget. Whether to adopt it should still be decided jointly by the memory calculation, scale extrapolation experiments, and the cost of system changes.