Skip to main content

Review — Gradients and parameter updates

Back to the lesson · Learning path plan

What to remember

  • Each gradient component is the local derivative of the loss with respect to one parameter while holding the others fixed.
  • Backpropagation applies the chain rule through the forward-pass operations. It computes the derivatives that the optimizer will use.
  • Basic gradient descent subtracts the gradient times the learning rate from the parameter. Too large a step can leave the region where the local approximation is reliable.
  • In a GPT, derivatives flow from the loss to the logits and then to the parameters that contributed to those logits. An optimizer can combine this gradient with information from earlier steps.

Recall from memory

A parameter is 1, its gradient is +2, and the learning rate is 0.1. What value does basic gradient descent give next?

Show the answer

It is 1 − 0.1 × 2 = 0.8. The positive gradient leads to a decrease in this parameter on this step.

Compare two updates and their next predictions at equal initial loss.

Language · Français · English