What happens if the learning rate is too large or too small?medium
Answer
Too large: overshoots the minimum, loss oscillates or diverges. Too small: convergence is painfully slow and may get stuck in poor local minima.
Explanation
The learning rate α controls step size in weight space. Large α -> large steps -> potentially jump over the minimum or diverge (loss goes to NaN). Small α -> tiny steps -> slow convergence, high compute cost. Best practice: use a learning rate scheduler (warm-up + cosine decay, reduce on plateau) or adaptive optimizers (Adam adjusts per-parameter learning rates automatically). Learning rate finders (fast.ai approach) plot loss vs lr to identify the optimal range.
Follow-upWhat is learning rate warm-up and why is it used in transformer training?