TL;DR
For years, Stochastic Gradient Descent (SGD) has been written off as completely unsuitable for pre-training Large Language Models (LLMs), lagging far behind adaptive optimizers like Adam. This paper reveals that SGD’s failure isn't due to a fundamental inability to navigate LLM loss landscapes, but rather a "speed limit" problem: LLM gradients are tiny, requiring massive step sizes that cause standard SGD to blow up on occasional gradient spikes. By applying two simple, targeted clipping rules, the authors safely crank SGD's learning rate up to 300, shrinking the performance gap with Adam on a 7B LLaMA model from over 57% down to just 2.3%.
What Problem Does This Paper Address?
If you train a convolutional network on ImageNet, classic SGD (with momentum) goes toe-to-toe with Adam. Try that when pre-training an LLM, however, and SGD plateaus miserably in a high-loss region—so reliably that modern optimizer benchmarks don't even bother including it as a baseline.
Why does this massive gap exist? Previous research blamed complex geometric traps (like ill-conditioned sharpness) or the heavy-tailed nature of language data. While those factors play a role, the authors of this paper step back to look at a much broader symptom: even with a tuned learning rate, SGD barely moves from its initialization—exploring a parameter space roughly $50\times$ smaller than Adam’s.
This seems paradoxical at first, because we usually set Adam’s base learning rate much lower than SGD’s (e.g., $0.003$ vs. $0.5$). The catch lies in the effective learning rate—the actual multiplier applied to the gradient momentum. Because Adam divides by the root-mean-square of past gradients ($\sqrt{v_t}$), and LLM gradients turn out to be minuscule, Adam’s effective learning rate silently scales up to $10^2$–$10^4$. SGD, stuck at $0.5$, is taking baby steps in a marathon—and if you try to turn its learning rate up, training immediately diverges.
Methods
Instead of inventing a complex new adaptive optimizer, the authors diagnose why SGD diverges at high learning rates and apply a surgical fix called SGD-LL (SGD with Large Learning rate).
They identify two gradient irregularities that sabotage high-learning-rate SGD:
- Type-I (Layer-wise Spikes): Sudden, massive surges in gradient norms across layers, especially early in training.
- Type-II (Output Layer Disparity): In the final classification head, frequent tokens generate vastly larger gradients than rare tokens. At high learning rates, updates to frequent token weights explode.
To stabilize SGD without altering the vast majority of its natural updates, SGD-LL wraps standard momentum SGD in two targeted clipping operations before updating the weights:
- Layer-wise RMS Norm Clipping: Caps the root-mean-square norm of the momentum update for each layer (threshold $\tau$), neutralizing Type-I spikes.
- Output-Layer Per-Token Clipping: Applied specifically to the final classification head, this caps the $\ell_2$ norm of each individual token class's momentum vector (threshold $\delta$) before the layer-wise clip, taming Type-II disparity.
Datasets
The authors rely on established, large-scale pre-training corpora (no new benchmarks are introduced):
- C4 (Colossal Clean Crawled Corpus): Used for all main experiments pre-training LLaMA models (ranging from 130M to 7B parameters).
- FineWeb: Used in appendix experiments to verify results on GPT-2 architectures.
Key Insights and Ideas
- Massive Weight-to-Gradient Ratios Demand Giant Steps: In ImageNet CNNs, the ratio of weight norms to stochastic gradient norms sits around $10^0$ to $10^3$. In LLM pre-training, gradients are so small that this ratio balloons to $10^3$–$10^5$. To make meaningful updates to the weights, the optimizer must use a huge effective learning rate.
- Large Batches Shrink Gradients Further: Through a theoretical bias-variance and "background-hit" decomposition, the authors prove that larger token batch sizes (typical in LLM pre-training, often $10^5$–$10^7$ tokens) actively suppress gradient covariance while rare tokens remain under-trained, driving overall gradient norms down and making standard SGD perform even worse at scale.
- Adam’s Secret Superpower is Normalization, Not Just Geometry: In the output layer, gradient norms scale roughly proportionally with token frequency. Adam naturally normalizes these wildly uneven token updates via its denominator; standard SGD gets blown up by high-frequency tokens unless explicitly clipped.
Key Results
By setting clipping thresholds high enough to only catch anomalies, SGD-LL safely sustains base learning rates of 100 to 300 (compared to standard SGD's ceiling of 0.25 to 0.5).
- 7B LLaMA (100B C4 tokens, 1M batch size): Standard SGD finishes with a validation loss of 3.48 (perplexity 32.32), a 57.5% loss gap behind Adam's 2.21 (perplexity 9.15). SGD-LL (at LR = 300) achieves a validation loss of 2.26 (perplexity 9.63)—shrinking the relative validation loss gap to just 2.26%.
- Consistent Scaling: Across 130M, 350M, and 1B LLaMA models, SGD-LL consistently tracks Adam's loss trajectory closely, turning triple-digit perplexity blowups (e.g., 158.90 vs. 22.46 at 130M) into near-ties (25.70 vs. 22.46).
Limitations and Future Work
The authors are candid that SGD-LL is a diagnostic tool to illuminate training dynamics, not a dethroning of Adam. Even with learning rates of 300, a small residual performance gap (~2.3%) remains in Adam's favor, and SGD-LL introduces two extra clipping hyperparameters ($\tau$ and $\delta$). The authors suggest that while enabling large learning rates solves most of the puzzle, finer-grained geometric phenomena—like Hessian block heterogeneity and directional sharpness explored in prior literature—likely hold the key to explaining the final few percent of the gap.
Summary updated