Learning rate schedule planner
The learning rate sets how far each optimiser update moves the weights, and it rarely stays fixed. Most transformer recipes start near zero, climb to a peak over a warmup period, then bring the rate back down so the final weights settle instead of bouncing.
Warmup, stable, decay (WSD) runs highest here, at 100% of the peak.
Schedules and run
Falls along half a cosine wave from the peak to the minimum (SGDR).
Holds the peak for most of the run, then decays over the final stretch (MiniCPM).
Typed values accept 3e-4.
2% of the run.
3.0 × 10⁻⁵ at the end of decay.
The final share of the run spent decaying.
Rate by step
| Step | Line 1 | Line 2 |
|---|---|---|
| 0 | 0 | |
| 3.00 × 10⁻⁴ | 3.00 × 10⁻⁴ | |
| 2.96 × 10⁻⁴ | 3.00 × 10⁻⁴ | |
| 2.65 × 10⁻⁴ | 3.00 × 10⁻⁴ | |
| 1.69 × 10⁻⁴ | 3.00 × 10⁻⁴ | |
| 7.11 × 10⁻⁵ | 3.00 × 10⁻⁴ | |
| 3.69 × 10⁻⁵ | 3.00 × 10⁻⁴ | |
| 3.00 × 10⁻⁵ | 3.00 × 10⁻⁵ |
Pick a step to move the marker there.
| Line and schedule | At step 50,000 | Share of peak | Final |
|---|---|---|---|
| 1. Warmup and cosine decay | 1.69 × 10⁻⁴ | 56.4% | 3.00 × 10⁻⁵ |
| 2. Warmup, stable, decay (WSD) (dashed) | 3.00 × 10⁻⁴ | 100% | 3.00 × 10⁻⁵ |
What it shows
This planner draws the common shapes from one set of inputs: a peak rate, a warmup length, a total step count and a floor. Choose up to three schedules to overlay, then type a step to read the exact rate each one gives there.
The schedules come from published work: the inverse square root rule of the original Transformer, cosine annealing from SGDR, warmup-stable-decay (WSD) from MiniCPM and the one-cycle policy of Smith and Topin. Where the papers leave a choice open, such as the decay curve inside WSD, the questions below say what this tool picked.
How to read it
- The vertical axis runs from zero to just above your peak rate. A schedule that ends well below the peak has decayed; a flat one has not.
- The marker sits on line 1 at the step you typed. The table gives each line’s rate there, its share of the peak and its final value.
- In “Rate by step”, pick a step to move the marker there.
- Minimum learning rate is a percentage of the peak. Constant and inverse square root ignore it, and one-cycle ignores warmup. The hint under each field says when.
- Line 2 is dashed. Line 3 differs by colour only, so use the table to tell the lines apart.
Questions
Why does training start with a warmup?
A large rate applied to freshly initialised weights can make early updates unstable, so recipes ramp the rate up over the first few hundred to few thousand steps. The Transformer paper used 4,000 warmup steps. The right length depends on your model and batch size, so treat the default as a starting point.
What is the warmup-stable-decay schedule?
WSD holds the peak rate for most of the run and decays only at the end. Because the rate stays at the peak until the decay starts, a checkpoint from the stable stage can be continued with more data, or finished by running only the decay stage. MiniCPM describes the schedule; this tool decays linearly, one of the shapes it allows.
How does inverse square root differ from cosine?
Inverse square root falls as one over the square root of the step after warmup, so it drops fast early and slowly later, and it never reaches a floor. Cosine follows half a cosine wave from the peak down to a minimum you choose, and it needs the total step count in advance.
Which schedule should I use?
There is no single winner across models and datasets. Cosine with warmup is a common default for fixed-length runs, and WSD suits runs whose length you may extend. Compare shapes here, then test them on your own training runs.
Sources
- Vaswani et al. (2017). Attention is all you need, section 5.3 (optimizer).
- Loshchilov and Hutter (2017). SGDR: stochastic gradient descent with warm restarts.
- Hu et al. (2024). MiniCPM: unveiling the potential of small language models with scalable training strategies.
- Smith and Topin (2018). Super-convergence: very fast training of neural networks using large learning rates.
Explore further
- Deep Learning Tuning PlaybookGoogle researchers’ guide to tuning models, including how to choose a learning rate schedule.
Last updated
More tools
All tools- estimatorTraining compute budgetSplit a training budget between model size and tokens using fitted scaling laws, or check an existing run.Open tool
- estimatorTraining cost estimatorTurn parameters and tokens into FLOPs, GPU-hours, days and a cost at a price you enter.Open tool
- estimatorTraining memory plannerEstimate per-GPU memory for training: weights, gradients, optimiser states and activations, by ZeRO stage.Open tool