Every warmup question is really "which piece of the piecewise schedule am I in, and what are the corner cases of that piece?" Here is the full grid.
| Cell |
Regime |
What makes it tricky |
Example |
| A |
0<t<Tw, zero start |
plain proportional rise |
Ex 1 |
| B |
t=0 and t=Tw exactly |
the two endpoints (boundary) |
Ex 2 |
| C |
0<t<Tw, non-zero start |
scale the gap, not the peak |
Ex 3 |
| D |
t>Tw, cosine, midpoint |
cos(π/2)=0 sanity value |
Ex 4 |
| E |
t>Tw, cosine, general x |
full substitution, any progress |
Ex 5 |
| F |
t=Tw handoff & t=T end |
both cosine ends, slope check |
Ex 6 |
| G |
Degenerate: Tw=0, or t>T |
division by zero, clamping |
Ex 7 |
| H |
Real word problem (large batch) |
pick ηpeak, count steps |
Ex 8 |
| I |
Exam twist: solve for t |
invert the schedule |
Ex 9 |
We reuse these symbols throughout (all from the parent):
The one picture that holds the whole matrix: the warmup-ramp rising, peaking, then the cosine falling.
Recall One-line reflex for each cell
- t≤Tw, zero start ::: η=ηpeakt/Tw
- t≤Tw, non-zero start ::: η=ηstart+(ηpeak−ηstart)t/Tw
- t=Tw handoff ::: value equals ηpeak from BOTH branches (continuous)
- cosine midpoint x=0.5 ::: η=ηpeak/2
- t≥T ::: clamp to 0 (never trust raw cosine)
- Tw=0 ::: skip warmup, start at ηpeak
- large batch ::: ηpeak=η0B/B0; convert epochs→steps
Related: Adam optimizer · Gradient clipping · Weight initialization · Transformer training recipe · 3.2.07 Learning rate warmup (Hinglish)
Non-zero-start warmup value at t=500, start 1e-5, peak 4e-4, Tw 2000?
1.075×10−4.
Cosine value at progress x=0.25 with peak 1e-3?
8.5355×10−4.
Step where cosine LR hits 2.5e-4 (peak 1e-3, Tw 1000, T 11000)?
step 7667 (progress x=2/3).
Scaled peak LR for batch 2048 from 0.1 at batch 256?
0.8 (linear scaling, factor 8).
What is η for any t≥T?
0 — clamp; never use the raw cosine past x=1.