✳ BETWEEN QUESTIONS ML STUDY ATLAS

A QUESTION-LED LESSON

Supervised Fine-Tuning: How Can Examples Shape an LLM?

After pretraining, how can examples demonstrate the kind of response we want?

Prompt and example answer

Supervised fine-tuning (SFT) trains a model on example input-output pairs. A common objective increases the probability of desired output tokens conditioned on the prompt and earlier tokens.

Use a loss

A token assigned low probability incurs high negative log probability. Training aggregates such terms, but practical masking and loss conventions vary. A higher probability for the desired token reduces its negative log loss. The diagram shows one token rather than a whole sequence.

INTERACTIVE EXPLORATION

Score a desired token

Change the probability assigned to a desired token.

Examples are not guarantees

Fine-tuning can improve behavior on a distribution without ensuring correct behavior everywhere. Data quality, evaluation and the relation to pretraining matter.

Check your understanding

For a desired token assigned probability 0.5, is negative log probability positive or negative?

Positive: −ln(0.5) is about 0.693.

Keep exploring

What is pretraining? ↗Why use log probabilities? ↗

Further reading

Source and further reading ↗