liveBook · Manning

Gradient

As explained in Building Specialized AI Systems

A gradient is a vector of partial derivatives indicating how a model objective changes with respect to model parameters.

A gradient is a vector of partial derivatives indicating how a model objective changes with respect to its parameters. Gradient descent uses it to identify a direction that reduces loss, repeatedly adjusting weights and biases during training or fine-tuning. section 3.1.2

A training step uses the gradient within this sequence:

  • Run inputs through the model to produce outputs. section 3.1.2
  • Compare outputs with targets through a loss function that returns a single error value. section 3.1.2
  • Backpropagate the loss, then let the optimizer update parameters in the direction that reduces error. section 3.1.2

Sentiment fine-tuning

When the correct sentiment is positive but the model assigns it only 30% probability, cross-entropy loss signals that the model should become more confident; gradients guide parameter updates toward that improvement. section 3.1.2

Figure 3.5 Gradient descent principle illustrated with a single weight variable. For LLMs, the same principle applies to billions of parameters.

Visualizes gradient descent with one weight variable while relating the same principle to models with billions of parameters. section 3.1.2

How Building Specialized AI Systems covers it

How deep it goes
Explains parameters, loss, descent intuition, and the training-loop backward step, but stops short of derivative calculations.
Examples
Uses foggy-hill navigation, sentiment probabilities, a single-weight figure, and a basic training-loop listing.
What it assumes
Assumes model parameters and outputs, while introducing loss measurement and gradient-based adjustment progressively.
What you can do after
Understand how loss, backpropagation, and optimizer steps adjust model parameters during training.
How it connects
Connects parameters, weights, biases, loss functions, cross-entropy, backpropagation, optimizers, and fine-tuning.

Also explained in

Compare how 27 books explain gradient →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Specialized AI Systems. The section links point to the parts of the book it draws on.