A New Paradigm for Optimizers in Large-Scale Model Training

    As large-scale pretraining pushes parameter counts into the hundreds of billions and trillions, optimizer state memory often becomes a bottleneck before compute does. This article explains why element-wise adaptive optimizers consume so much memory, how matrix-based optimizers reduce state overhead by treating weight matrices as geometric objects, and what engineering work is required to scale them from toy models to industrial training. It also covers the trade-offs, boundaries, and a gradual adoption path for choosing between the two approaches.

    1. The Starting Point: Optimizers Are Eating the Training Budget

    In large-scale pretraining, GPU memory often becomes a bottleneck earlier than compute. Take element-wise adaptive optimization methods as an example. To estimate first- and second-order statistics separately for each parameter, they need to store two extra states per parameter in memory. In mixed-precision training, once these states are stacked together with gradients and parameter copies, the optimizer states alone for models with hundreds of billions to trillions of parameters can occupy memory on the order of ten TB. The consequences are severe: batch size and context length are heavily compressed, communication and parallelism strategies are forced to split more finely, and end-to-end costs are amplified.

    Roughly speaking, memory usage can be broken down into four parts:

    1. Total memory ≈ parameter copies + gradients + optimizer states + activations
    2. where optimizer states ≈ number of parameters × state bytes per parameter

    Reducing the “state bytes per parameter” or decoupling state from parameter shape are the two main lines of attack on this problem.

    2. The Essential Difference Between the Two Technical Routes

    The element-wise route treats a weight matrix as a large collection of independent scalars and maintains an adaptive step size for each element individually. The update is fine-grained, but the state overhead is linearly bound to the parameter count.

    The matrix-based route treats an entire weight block as a single high-dimensional geometric object. It performs orthogonalization on the matrix formed by combining the gradient and momentum, then adds the result to the weights in one shot. An intuitive analogy: the former is like individuals each fighting on their own, requiring step sizes to be specified one by one; the latter is like a formation marching in unison at a unified pace. The benefit is that the state only needs a small amount of data related to the matrix shape, so memory usage drops substantially. The cost is the introduction of matrix-decomposition-style computation, which requires extra compute and numerical stability handling.

    3. The Key Leap from Toy Scale to Industrial Scale

    Matrix-based optimization was initially validated only on small models at the hundred-million-parameter scale. Industry skepticism focused on three points: whether it still converges at scale, whether the extra computation from orthogonalization cancels out the memory savings, and whether the matrix remains “complete” after distributed splitting. Industrial-grade deployment usually requires filling in the following engineering pieces:

    1. Parameter grouping: apply matrix-based updates only to hidden-layer 2D weights, while embedding layers, normalization layers, and the output head still use element-wise adaptive methods.
    2. Parallelism adaptation: under tensor parallelism and pipeline parallelism splitting, orthogonalization is either done as a local approximation along the split dimension or reconstructs the complete matrix through a small amount of communication.
    3. Numerical stability: decomposition is prone to jitter under low precision, requiring higher-precision accumulation, an upper limit on iteration counts, and a fallback for degenerate matrices.
    4. Observability: bring update norms, orthogonalization residuals, and gradient clipping ratios into monitoring, alerting, and logging services, so that checkpoints can be quickly rolled back and inspected when anomalies occur.

    Pseudocode illustration:

    1. # Pseudocode: illustrates the flow only, not a specific implementation
    2. for step in batches:
    3. g = backward(loss)
    4. for name, w in model.named_parameters():
    5. if w.ndim == 2 and is_hidden(name):
    6. m = momentum_buffer(w, g) # small amount of state
    7. u = orthogonalize(m) # iterative approximation
    8. w -= lr * u
    9. else:
    10. w = adam_like_update(w, g) # element-wise fallback

    4. Benefits, Boundaries, and Selection Advice

    The benefits show up mainly in three places: after optimizer state memory drops, batch size and context length can be increased; communication volume decreases because there is less state; and the tuning dimension is reduced, making learning rate and warmup strategies more stable.

    The boundaries are equally clear: the benefit is not obvious on small models; orthogonalization has limited meaning when the matrix dimensions are extremely small; the compute overhead from decomposition must be evaluated empirically; and low precision and parallel splitting introduce approximation errors, so small-scale controlled experiments must confirm that the convergence curve does not degrade.

    For engineering selection, a gradual path is recommended: first run an equal-compute comparison against the element-wise approach on hundred-million-parameter models, comparing the number of steps to reach a target loss and peak memory; then scale to ten-billion-parameter models to validate parallelism adaptation; and only then enable it at the hundred-billion-parameter scale and above, while keeping a one-click switch to fall back to the element-wise approach. If training relies on a container platform with elastic scheduling, checkpoints can be stored in object storage and monitoring and alerting can track resource water levels, so that memory optimization truly translates into cost savings.