AI Research Scientist · Optimization Algorithms & Schedules
Learning rate schedules (warmup and decay)
Learning rate schedules (warmup and decay)
Decay shape
After warmup ends, the learning rate follows a decay shape that lowers it for the rest of training: cosine glides smoothly toward near-zero, linear falls at a constant rate, and step cuts it by a fixed factor at set points.How the Warmup Ramp Works
- 1Start near zeroThe learning rate begins at a small fraction of its eventual peak, so the very first weight updates are gentle.
- 2Ramp up over N stepsOver the first few hundred to few thousand steps, the rate climbs steadily toward the target peak value.
- 3Peak reached, decay takes overBy the time the ramp finishes, gradients have already nudged weights away from their unstable random start, so full-size steps are now safe and the decay shape begins.
- 1Run A applies 3e-4 immediately from step 1.WhyRandomly initialized weights meet a large step size right away, causing loss spikes early on.
- 2Run B ramps from 0 to 3e-4 across 500 steps.WhySmall early updates let the model settle before taking full-size steps, avoiding the spike Run A suffers.
- 3Both runs sit near 3e-4 around step 500; Run B then cosine-decays toward 3e-6.WhyShrinking the rate late lets the model settle into a sharper minimum instead of oscillating around it.
- 4Compare final loss at step 10,000.WhyRun B lands at a lower, steadier loss; Run A either spiked early or plateaued higher since its rate never dropped.
Recall check from the same lesson
Because a run used a small constant learning rate of 1e-5 for its entire 20,000 steps instead of warmup+cosine-decay, it would reach just as strong a final result, since the rate never got large enough to cause early instability.
Review the explanation
Answer: False. A tiny constant rate does avoid the early blowup, but it wastes the rest of the run: at 1e-5 every step is tiny, so in 20,000 steps the model covers far less ground than a schedule spending mid-training near a much higher peak. Warmup+decay isn't only about dodging instability — warmup makes a high peak rate safe, and decay shrinks steps only after that fast progress is banked, a phase a flat low rate never gets.
Sources
One sitting · 20–30 minutes
A focused session on your AI Research Scientist interview
LearnBench starts from what you already know — skip what you have, master what you’re missing.
Start now