Skip to content

Instruction Tuning (SFT)

Fine-tuning a pretrained language model on examples of instructions paired with good responses, turning a text-continuer into an assistant that follows requests.

Also supervised fine-tuning · SFT · instruction following · chat tuning · post-training

Fig. / How it works
Base modelBase modelInstruction + good answerInstruction + good answerFine-tuneFine-tuneAssistantAssistant
Role · kind
TrainingTechnique
Level
Intermediate

FLAN (Wei et al., 2021); InstructGPT (Ouyang et al., 2022)

A well-read person who has never had a job learns from a stack of example requests and model answers how to actually help customers.

Where it fits

+All relationships as a list

See it on the full map

How it works

After pretraining, a model is good at continuing text but not at doing what it is asked. Instruction tuning, also called supervised fine-tuning (SFT), bridges that gap.

The data is pairs of instructions and ideal responses:

  • “Summarize this email in two sentences.” → a good two-sentence summary
  • “Write a Python function that reverses a string.” → clean code with a short explanation
  • “What’s the capital of Australia?” → “Canberra.”

The model is fine-tuned on these, learning to predict the response given the instruction. Tens of thousands of high-quality examples can change behavior dramatically, because the knowledge is already there; SFT teaches the format and the role.

In the typical pipeline:

  1. Pretraining: learn language and knowledge.
  2. Instruction tuning: learn to follow requests.
  3. Preference tuning with RLHF, DPO or Constitutional AI: learn which of several acceptable answers people prefer, and what to decline.

Instruction tuning for a narrow task is often done cheaply with LoRA.

Everyday use cases

  • Case 01

    Turning a base model into a chatbot

    Every chat assistant goes through this stage before preference tuning.

  • Case 02

    Company-specific assistants

    Fine-tuning on internal question-answer pairs so a model answers in the company's format.

Strengths, weaknesses and when to use it

Strengths

  • Simple supervised training with a big effect on usability.

Weaknesses

  • Limited by the quality and diversity of the examples; can teach confident-sounding wrong answers.

When to use itWhen a pretrained model knows enough but does not respond in the way you need.

Compare with

Check yourself

  1. Q01

    What does instruction tuning mainly change?

    Show answer

    A: How the model responds to requests

Go deeper

Learn first