Analyzing & Reducing the Need for Learning Rate Warmup in GPT Training

Atli Kosson, Bettina Messmer, Martin Jaggi

Abstract

Learning rate warmup is a ubiquitous heuristic used to stabilize the training of Large Language Models (LLMs). Despite its prevalence, the theoretical necessity of warmup has remained poorly understood. This paper identifies that warmup serves as a manual correction for three specific optimizer failures: momentum bias, excessive angular updates, and high gradient correlation during the initial phase of training. By introducing optimizer modifications—specifically the LionAR variant which controls rotational updates—we demonstrate that the requirement for manual warmup tuning can be significantly reduced or entirely eliminated across various Transformer architectures.

Introduction

In modern Transformer training, the standard procedure involves a "warmup" phase where the learning rate is gradually increased from zero to its peak value over thousands of steps. Skipping this phase typically leads to immediate model divergence or a permanent degradation in final performance. While effective, warmup is a frustrating hyperparameter that requires manual tuning and lacks a rigorous theoretical foundation. This research investigates the fundamental question: what makes early updates "too large," and can we design optimizers that are inherently stable from the first step?

Identifying the Mechanisms of Instability

The researchers decompose early training instability into three quantifiable metrics and identify a critical physical consequence of poor initialization: the "Dead ReLU" phenomenon.

The Dead ReLU Phenomenon

A key finding is that large early updates cause a spike in permanently inactive neurons (dead ReLUs). This explains the "permanent damage" observed when warmup is omitted; the model's architecture is effectively compromised in the first few hundred steps, preventing it from ever reaching the performance levels of a properly warmed-up counterpart.

Optimizer Failures

  1. Momentum Bias: Standard AdamW bias correction is designed for steady-state gradients. At initialization, where gradients are high-variance and highly correlated, this correction actually amplifies early updates—the opposite of what is required for stability.
  2. Angular vs. Magnitude Change: The study suggests that controlling the $\ell_2$-norm (magnitude) of updates is insufficient. The real culprit is the angle of the weight update. Violent shifts in direction cause internal representations to change too rapidly for subsequent layers to adapt.
  3. Gradient Correlation: Early in training, gradients tend to be highly correlated, leading to large, consistent steps that can easily push weights into unstable regions.

Proposed Methodology

To address these failures, the authors propose several modifications to existing optimization frameworks:

  • LionA & LionAR: Building on the Lion optimizer, LionA enforces a constant $\ell_2$-norm for updates. LionAR (Rotational) further constrains updates to be proportional to weight magnitude, effectively controlling the angular change of weight vectors.
  • Inverse Bias Correction: To counteract Adam's tendency to amplify early steps, the authors propose an "inverse" correction mechanism that keeps momentum-led updates small during the initial steps.
  • Relative Representation Change (RRC): A new metric derived to measure how much a weight update alters the internal activations (features) of the network. This provides a theoretical basis for "automatic warmup."
  • SNR-based Scaling: By utilizing the Signal-to-Noise Ratio (SNR) of gradients, the optimizer can automatically downscale the learning rate when the signal is too consistent, mimicking the effect of a data-driven warmup.

Experimental Results

The proposed methods were validated using GPT-2 (124M) on OpenWebText, Llama-style models on SlimPajama, and ResNet-20 on CIFAR-10.

Warmup-Free GPT-2

By combining LionAR with high momentum ($\beta=0.98$) and inverse bias correction, the researchers achieved performance on GPT-2 that matches or exceeds standard AdamW with a tuned warmup. Furthermore, LionAR demonstrated significantly higher stability across a wide range of learning rates, whereas AdamW frequently crashed without a warmup phase.

Architectural Robustness

The study highlights that Llama-style architectures (utilizing SwiGLU and RMSNorm) are inherently more robust than GPT-2. In these models, the LionAR optimizer was able to eliminate the warmup penalty entirely without additional modifications, suggesting that modern architectural choices complement more principled optimization strategies.

Discussion and Limitations

While these results offer a path toward eliminating warmup, several challenges remain. The current implementation of the Relative Representation Change (RRC) metric is computationally intensive, making it difficult to use as a simple drop-in replacement. Additionally, while the methods were successful at the 200M parameter scale, further testing is required at the 7B+ parameter scale, where training instabilities are known to be more severe.

Conclusion

This work moves the field closer to a principled, geometry-aware approach to optimization. By replacing the manual "hack" of learning rate warmup with specific controls over angular updates and momentum bias, we can achieve more stable and predictable training trajectories for large-scale language models.

Summary updated

BibTeX
@inproceedings{kosson2024analyzing,
  author = {Atli Kosson and Bettina Messmer and Martin Jaggi},
  title = {{Analyzing \& Reducing the Need for Learning Rate Warmup in GPT Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=ZgDNrpS46k},
}
Figure