Resources/Model training/What happens during training

Setting

Learning rate

The learning rate sets how far the weights move on each update. It is the most sensitive training setting: too high overshoots and can erase skills, too low barely changes the model. A schedule usually warms it up and then decays it over the run.

Chapter 64 min read5 references

What it is

Every training step works out, for each weight, which direction would lower the loss. The learning rate decides how far to go in that direction. It is a single number, usually written in scientific notation: 1e-5 means 0.00001. It looks tiny because a model has billions of weights and every step moves all of them at once; small individual changes add up to a large change in behaviour.

The update, and how to read the notation
new weight = old weight − learning rate × (gradient, as scaled by the optimizer)

1e-4 = 0.0001      2e-5 = 0.00002      1e-5 = 0.00001

With Adam and AdamW, the gradient is first normalised per weight, so the learning rate is close to the actual size of each weight's change per step, whatever the raw size of the gradient. That is why typical rates carry over reasonably between models of similar size, and why a rate ten times too high is a serious problem rather than a small one.

Too low, about right, too high

training losstraining steps →too lowabout righttoo highhighlow
The same data trained with three learning rates. Too low: the loss creeps down and the run ends before the model has learned much. About right: a fast drop, then a steady flattening. Too high: a fast start, then a jagged curve that climbs back up as updates overshoot.
What you seeLikely causeTry
Loss falls very slowly; answers barely differ from the base modelToo lowRaise it, e.g. a multiplier of 1.5–2
A fast drop, then a smooth flattening that validation loss followsAbout rightKeep it
Loss is jagged, spikes, or climbs back up; answers turn repetitive or oddToo highHalve it; add or lengthen warm-up
Training loss falls fast but validation loss rises earlyToo high for this data size, or too many epochsLower the rate or the number of epochs
Loss becomes NaN (not a number)Far too high, or a numerical problemLower it substantially

A rate that is too high also makes forgetting worse: large updates overwrite general skills the base model had, even when the loss on your data looks fine.

Schedules: warm-up and decay

  • Warm-up. For the first few percent of steps, the rate climbs linearly from near zero to its peak. At the start Adam's running averages rest on very few gradients, so full-size steps risk a bad first move. Gradual warm-up was popularised for large-batch training and is now standard practice.
  • Decay. After the peak, the rate decreases toward zero, so late updates make fine adjustments instead of jumping around a good solution. Linear decay lowers it in a straight line, and is the default in Hugging Face's Trainer. Cosine decay follows half a cosine wave: it stays high for longer, then eases off.
  • Constant. Some short runs keep the rate flat after warm-up. It is simple, and fine when there are only a few steps.
WARM-UPpeak learning ratecosine decaylinear decaylearning ratetraining steps →010%100%
A typical learning-rate schedule. Warm-up ramps the rate from near zero to its peak over the first few percent of steps, so the first, noisiest updates are small. The rate then decays toward zero, by a cosine curve or a straight line, so the last updates make fine adjustments instead of big jumps.
Warm-up, then linear or cosine decay
warm-up (step < W):  lr = peak × step / W
linear decay:        lr = peak × (T − step) / (T − W)
cosine decay:        lr = peak × ½ × (1 + cos(π × (step − W) / (T − W)))

W = warm-up steps,  T = total steps

Typical values

Kind of trainingTypical learning rate
Full fine-tuning of a language model (AdamW)Around 1e-5
LoRA adapterAround 1e-4 to 2e-4, roughly 10× the full fine-tuning rate
Preference tuning (DPO)Lower than the matching supervised run
Reinforcement fine-tuningMuch smaller steps; about 1e-5 with LoRA
Hosted models with a multiplierProvider default × 0.5–2

These are starting points, not rules. The best rate depends on the model, the data and the batch size, and the only reliable way to find it is a few runs compared on validation loss and evaluation.

Why preference and RL methods use smaller steps

Supervised training learns from fixed, correct replies. Preference tuning and reinforcement learning learn from comparisons and scores of the model's own outputs, a noisier signal, and their purpose is usually to polish a model that already works. Large steps would pull it far from that starting point, where answers can drift, grow longer or start gaming what the signal rewards. Smaller rates keep each update modest.

What a multiplier means in practice
  1. Suppose the provider's default rate for this model and dataset is 2e-5. Hosted providers usually don't show it.
  2. Multiplier 1: the run uses 2e-5.
  3. Multiplier 2: 4e-5. Worth trying when a full run barely changed the model.
  4. Multiplier 0.5: 1e-5. Worth trying when validation loss rose early, or answers on general questions got worse than the base model's.
  5. Move in factors of about 2. Smaller adjustments are usually lost in run-to-run noise.

Common mistakes

  • Raising the learning rate to make a small dataset teach more. It mostly adds instability; more or better data helps more.
  • Using a full fine-tuning rate for LoRA, or a LoRA rate for full fine-tuning: one barely learns, the other can damage the model.
  • Skipping warm-up at a high rate, which makes the first updates the largest and the least informed.
  • Judging the rate by training loss alone. A rate that is too high can still show falling training loss while validation loss and answers get worse.

References and further reading

External sources open in a new tab.

  1. 01OptimizationHugging Face Transformers docs · huggingface.coAdamW and the standard schedules (linear, cosine, constant with warm-up) as implemented.
  2. 02SGDR: Stochastic Gradient Descent with Warm RestartsLoshchilov & Hutter, 2016 · arXiv · arxiv.orgIntroduced the cosine learning-rate schedule now used across language-model training.
  3. 03Accurate, Large Minibatch SGD: Training ImageNet in 1 HourGoyal et al., 2017 · arXiv · arxiv.orgWhy a gradual warm-up stabilises the start of training.
  4. 04LoRA Without RegretThinking Machines Lab, 2025 · thinkingmachines.aiMeasures the best LoRA learning rate at about ten times the full fine-tuning rate.
  5. 05Learning rateWikipedia · en.wikipedia.org

Turn weeks of expert work into minutes

See how Scalata fits your team, your data, and your controls.