Skip to content

SFT (Supervised Fine-Tuning)

Supervised fine-tuning of a model on pairs of «query → correct response». The model learns to respond as you need.

What is it

SFT is a specific type of fine-tuning where training is done on labeled examples:

Query: "Write a polite refusal"
Response: "Thank you for your inquiry, but we are unable to assist at this time."

The model sees many such pairs and learns to reproduce the desired behavior.

Dataset Structure

Query Expected Response
Explain the term «token» A token is the smallest unit of text…
Rewrite in a business style Dear client…
Write code to read CSV import csv …

What SFT Changes

  • style and tone;
  • output format;
  • ability to follow instructions;
  • behavior in dialogue.

What SFT Does Not Do

  • does not add precise facts — for this use RAG;
  • does not make the model «all-knowing»;
  • does not replace Instruction Tuning, although these are related concepts.

Relation to LoRA and PEFT

Full SFT is expensive. In practice, efficient methods are used:

See Also

← All terms