A New Paradigm for Optimizers in Large-Scale Model Training

    This article examines why optimizer states, rather than model weights, dominate memory budgets in trillion-parameter training, and how matrix-based optimization reduces that overhead. It compares element-wise adaptive methods with matrix-level updates, outlines the engineering challenges of scaling matrix optimizers, provides a reusable memory accounting table, and offers a practical deployment checklist.

    1. The Starting Problem: Optimizer States Are Consuming the Training Budget

    During pre-training of trillion-parameter models, GPU memory is often exhausted not by the weights themselves but by the optimizer states. Take the mainstream element-wise adaptive optimization methods as an example: to maintain an adaptive step size for each parameter, they must store two additional states per parameter—the first moment and the second moment. In mixed-precision training, a master copy of the weights and gradient buffers are added on top of that. Using a common industry estimation approach, a model with roughly 1.6T parameters could consume memory in the tens of terabytes range for optimizer states alone.

    This leads to two direct consequences:

    • Batch size is compressed, gradient noise increases, and convergence stability degrades;
    • Context length is forced to shrink, making it difficult to fully train long-text capabilities.

    A natural question follows: can optimizer states be made more memory-efficient? Matrix-based optimization enters precisely from this angle.

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

    2.1 The Element-wise Perspective

    Traditional adaptive methods treat a weight matrix as a large collection of independent scalars, maintaining separate running statistics for each scalar and computing updates element by element. Its strength is strong adaptivity, making it relatively friendly to sparse gradients and parameters of varying scales. Its weaknesses are equally clear: state overhead scales linearly with the parameter count, and the update process cannot leverage the overall structure of the matrix.

    2.2 The Matrix-level Perspective

    Matrix-based methods treat the entire weight matrix as a single, indivisible high-dimensional geometric object. They first fuse the gradient with momentum, then orthogonalize the fused result to obtain an orthogonal (or approximately orthogonal) update matrix, and finally apply it to the weights in one step. The benefits are:

    • States only need to maintain momentum-level information, significantly reducing memory usage;
    • The update direction is “regularized” to the same scale, reducing step-size imbalance across different directions;
    • The update step aligns better with the hardware characteristics of matrix multiplication, facilitating operator fusion and parallelism.

    An intuitive analogy: the element-wise approach is like letting each soldier decide their own stride—flexible but with a loose formation; the matrix-based approach is like forming up first and then advancing at a unified pace—lower command overhead and a more orderly advance.

    Illustrative pseudocode (expressing the flow only, not a specific implementation):

    1. # g: current gradient; m: momentum state
    2. m = beta * m + (1 - beta) * g
    3. u = orthogonalize(m) # orthogonalize the update matrix
    4. w = w - lr * u # apply the update in one step

    3. The Key Leap from “Feasible on Small Models” to “Usable on Large Models”

    Matrix-based optimization was initially validated only on small models at the hundred-million-parameter scale, which often led to skepticism that it would “fail at a different scale.” To cross over to the trillion-parameter regime, engineering must address at least four things:

    1. The extra cost of orthogonalization: Orthogonalization itself requires iterative computation, so the number of iterations and precision must be controlled to avoid trading the saved memory back for compute.
    2. Parameter grouping strategy: Not all layers are suitable for matrix-based updates. The common practice is to apply matrix-based updates to hidden-layer weight matrices while keeping element-wise adaptive methods for embedding layers, output heads, normalization, and biases, balancing stability.
    3. Mixed-precision consistency: It must be clearly specified what precision is used for momentum, master weights, and the update matrix respectively, to prevent numerical drift from causing loss spikes.
    4. Coupling with parallelism strategies: When tensor parallelism, pipeline parallelism, and data parallelism are combined, weight matrices are partitioned, and orthogonalization must be correctly aggregated across the partitioned dimensions; otherwise, the update direction will be corrupted.

    4. How to Calculate the Memory Budget: A Reusable Accounting Table

    Taking mixed-precision training as an example, a rough estimate can be made as follows (unit: bytes per parameter):

    • Weights (half precision): about 2
    • Gradients (half precision): about 2
    • Master weights (single precision): about 4
    • Element-wise adaptive states (first + second moment, single precision): about 8
    • Matrix-based momentum state (single precision): about 4

    As shown, for optimizer states alone, this drops from about 8 to about 4, a reduction of roughly half. On ultra-large models, this difference is often the dividing line between “whether the context can be doubled.” It should be emphasized that specific values vary with implementation and precision strategy; this is only to illustrate the order-of-magnitude relationship.

    5. Deployment Checklist

    • First run small-scale controlled experiments: compare loss curves and peak memory usage under the same data and number of steps;
    • Monitor the norm of the update matrix and the orthogonalization residual; an abnormal increase usually signals numerical issues;
    • Learning rate and momentum coefficients need to be re-tuned; do not copy the empirical values from element-wise methods;
    • Set up monitoring alerts and log retention for long-term observation of loss spikes and gradient clipping frequency;
    • In container platforms and elastic compute environments, persist checkpoints to object storage to ensure experiment reproducibility.

    6. Conclusion

    The evolution of optimizers is essentially about finding a better trade-off between “adaptive precision” and “resource overhead.” The value of matrix-based optimization lies not in completely replacing existing methods, but in providing a more memory-efficient and more orderly option for ultra-large-scale training. For engineering teams, the real benefit comes from reallocating the memory budget to larger batches and longer contexts—precisely the scarcest resources in current large-model training.