liveBook · Manning

Learning rate

As explained in Transformers in Action

Learning rate is an optimization hyperparameter that controls the magnitude of parameter updates during training.

The learning rate is a hyperparameter that sets the step size for updating model parameters during gradient descent. It is chosen before training, unlike learned weights and biases. section 8.1 section 8.1.1

Each update moves parameters opposite the loss gradient and scales that movement by the learning rate. A value that is too high can overshoot the minimum; a value that is too low can slow training or become stuck in a local minimum. section 8.1.1

Figure 8.1 Gradient descent with lr = 0.1, demonstrating faster convergence
figure

Compare gradient descent with a learning rate of 0.1, which emphasizes faster convergence, against 0.01, which emphasizes stability. section 8.1.1

Configuring learning rate for translation fine-tuning

A supervised fine-tuning configuration assigns learning_rate=lr alongside a linear scheduler and a 0.03 warmup ratio. The setup combines a modest rate with gradient accumulation and a limited batch size for constrained VRAM, then evaluates translation behavior after two epochs. section 7.5

How Transformers in Action covers it

How deep it goes
Explains gradient-scaled updates and high-versus-low trade-offs, then demonstrates configuration with scheduling but stops short of tuning procedures.
Examples
Uses convergence figures at 0.1 and 0.01 plus Gemma 3 270M English–Spanish fine-tuning configuration.
What it assumes
Assumes gradient descent and loss gradients, while distinguishing learned parameters from pretraining hyperparameters.
What you can do after
Operate/configure training with a selected learning rate, scheduler, warmup ratio, and resource-aware fine-tuning setup.
How it connects
Connects gradient descent, model parameters, loss function, learning-rate schedules, batch size, epochs, and overfitting.

Also explained in

Compare how 16 books explain learning rate →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Transformers in Action. The section links point to the parts of the book it draws on.