Optimization / Schedules
verifiedWarmup
At the very start of training the parameters are random and the gradients are large and meaningless. Taking full-size steps then can wreck the run in the first few hundred iterations. Warmup ramps the learning rate up from near zero over the first stretch, so the model gets its bearings before it starts sprinting.
Linear ramp over a few thousand steps, then hand off to the decay schedule. Post-norm transformers need it to train at all; pre-norm ones are stable without it and use it anyway because it still helps. Adam's second-moment estimate is also badly conditioned in the first steps, which is an independent reason for the ramp.
η sub t = η sub max ·t/T sub w for t < T sub w , then the decay schedule. The need is sharpest for post-norm, where the residual branch is not yet scaled and early updates can move the network far enough to be unrecoverable.
Loss over 1000 training steps, starting near 6.5. It falls to about 1.77, with 95% of the total improvement arriving in the first half. A second line shows no warmup, ending at about 1.77.
Loss through the opening of a run, with and without a ramp. Drag the warmup length to watch the ramp stretch — the spike is gone the moment there is any warmup at all, and what the extra length buys is a longer gentle opening rather than a calmer one.
Reviewed by opendroid · 2026-08-04
- arXiv:1706.02677 — Accurate, Large Minibatch SGD: Training ImageNet in 1 Hour
- arXiv:1706.03762 — Attention Is All You Need
- arXiv:2002.04745 — On Layer Normalization in the Transformer Architecture
- arXiv:1908.03265 — On the Variance of the Adaptive Learning Rate and Beyond