Learning Rate Scheduler
A strategy for how the learning rate changes during training. Typically, it starts with a large step and decreases towards the end to more precisely converge to the minimum.
Why
A constant learning rate is a compromise that is poor both at the beginning and at the end. A large step at the beginning moves faster, while a small step at the end prevents overshooting the optimum.
Popular Schemes
- step decay — reduction through fixed intervals;
- cosine decay — smooth reduction following a cosine curve;
- warmup — gradual increase from zero to the target value at the start (required for transformers);
- linear decay — uniform reduction.
Warmup Combination
For LLMs, the standard is warmup + cosine decay: the model is initially carefully ramped up, then smoothly slowed down. This significantly impacts training stability.