Level 2 · Understanding LLMsStage 07

Lesson 23 of 38 · Written learning

Instruction tuning with examples

Understand how supervised fine-tuning teaches a pretrained model to imitate desired responses.

7 min read Free course lessonWeeks 17–19

A pretrained model learns broad token patterns. Instruction tuning gives it examples of requests paired with responses, teaching a response style or task pattern. The training objective usually increases the probability of the target response tokens. It can improve behavior that is represented well in the examples, but it cannot guarantee factuality or robust instruction following.

Curate before you train

A small, consistent dataset can be more useful than a larger noisy one. Check that examples are authorized, non-duplicative, and aligned with the behavior you want. Keep training and held-out examples separate. Compare the base and adapted model on the same prompts, including edge cases and cases where the model should say it lacks information.

  • Define the intended behavior in examples before selecting a training method.
  • Check formatting, role boundaries, and target masks.
  • Record the base model, dataset version, training settings, and compute.
  • Do not use held-out evaluation prompts to tune repeatedly without tracking that reuse.

Return to the Using, adapting, and fine-tuning pretrained LLMs stage · Suggested timing is flexible; move at your own pace.