What is a learning rate?
The learning rate is the hyperparameter that sets how much model weights change in the direction opposite the gradient at each update during training, with the largest effect on training speed and stability.
It is also called the step size. A learning rate schedule sets how this value changes over training. Adaptive optimisers such as Adam also start from a base learning rate.
- Topic
- Machine learning, models and training
- Also known as
- Step size
How a learning rate works
- In plain gradient descent the computed gradient is multiplied by the learning rate and subtracted from the weights; adaptive optimisers such as AdamW apply it to moment-scaled updates.
- Too high a rate makes loss oscillate or diverge; too low a rate slows training and wastes GPU time.
- Training usually starts with a warm-up of a few hundred steps, raising the rate gradually from zero to the target, then lowers it on a schedule.
- When batch size grows the learning rate is usually raised in proportion to it or to its square root.
In more detail
Typical magnitudes by training stage
In practice, learning rates span orders of magnitude by training stage: relatively high in LLM pre-training, much lower in full supervised fine-tuning to curb catastrophic forgetting and usually higher for LoRA adapters than for full fine-tuning because fewer parameters are updated; preference alignment such as DPO uses the lowest.
Effective global batch size and gradient clipping
Learning rate choices depend on the effective global batch size (the product of micro-batch size, accumulation steps and data-parallel GPUs) and interact tightly with gradient clipping. While linear scaling fits SGD up to a critical batch size, adaptive optimisers like AdamW typically follow square-root scaling; gradient norm clipping prevents sudden bad batches from destabilising weights even when the base rate is high.
Commonly confused terms
| Term | How it differs |
|---|---|
| Weight decay | Weight decay shrinks parameter magnitudes independently (in AdamW) to regularise the model, whereas learning rate scales the gradient update step itself. |
Why a learning rate matters for on-premises AI
The most common mistake in in-house fine-tuning is the wrong learning rate. Fine-tuning uses a much lower rate than pre-training; too high a rate can damage the model's general abilities and cause catastrophic forgetting. Methods such as LoRA work with higher rates than full fine-tuning. The best value depends on data and model, so it is picked in short trials and logged.
Before fine-tuning a clinical text classifier, a pharmaceutical company runs short trials with three learning rates, picks the highest one that lowers loss steadily and finishes training on an in-house GPU.
Common questions
How is the learning rate chosen for fine-tuning?
Start well below the pre-training value and compare a few values in short trials. A value fits if loss falls steadily and validation performance improves.
What is learning rate warm-up?
Raising the rate gradually from zero to the target in the first training steps. It keeps large, unstable early gradients from damaging the model.
Related terms
- Learning rate schedule
- Hyperparameter
- Stochastic gradient descent
- Fine-tuning
- Gradient descent
- Batch size
- Adam optimiser
Sources
- Smith, Cyclical Learning Rates for Training Neural Networks, 2017
- Loshchilov and Hutter, SGDR: Stochastic Gradient Descent with Warm Restarts, 2016
- Goyal et al., Accurate, Large Minibatch SGD: Training ImageNet in 1 Hour, 2017
In the glossary: Glossary, D to L