Skip to content
← All mechanisms

Supervised fine-tuning

An example becomes a learning signal.

Choose the demonstrated response. Watch cross-entropy move probability toward it, one gradient update at a time.

Edit this visualization ↗

Show the target

One of six outcomes is the demonstration. Its target probability is one; the other five targets are zero. This is one categorical prediction, not a complete language-model sequence.

Follow the gradient

The update subtracts learning rate times p minus the target from the logits. The colored motion shows that transfer; the bars and objective are computed from the updated logits.

Read the limits

SFT imitates a target. It does not collect environment reward or establish that the target is correct. Edit the target and initial logits to inspect a different example.

The equation behind the motion

L = −log p(y*)
∂L/∂zᵢ = pᵢ − 1[i = y*]

An exact six-outcome illustration. It omits neural-network and sequence-level training complexity.

Read the primary source ↗