The learning rate controls step size in gradient descent. Too large → divergence; too small → slow convergence. Schedules vary during training.
Common schedules:
Step decay: reduce by a factor every epochs. Simple but requires manual tuning.
Exponential decay: . Smooth version of step decay.
Cosine annealing:
- Smooth decay from to following a cosine curve
- Standard for transformer training
Warmup: start with very small and linearly increase for the first steps.
- Prevents early instability when model weights are random and gradients are large
- Critical for transformers — common recipe: linear warmup → cosine decay
1cycle policy: warmup to peak, then anneal below initial LR. Good for fast convergence.
Why schedules help:
- Large early → explore broadly, escape bad local minima
- Small later → fine-tune, settle into a good minimum
- Warmup stabilizes early training when loss landscape is poorly conditioned
See also: Stochastic Gradient Descent, Adam Optimizer