Instruction Tuningwhy the transformation works

Topic 14 of 90Module 2: Datasets & Training3 min read

Instruction tuning is the specific, most important flavor of SFT: training on (instruction → response) pairs so a base model stops continuing text and starts obeying it. It's what turns Qwen2.5-7B into Qwen2.5-7B-Instruct — the difference you saw with your own eyes in the Lesson 2 exercise.

Why does a few thousand examples flip such a fundamental behavior? Think about what the base model learned from the internet: among trillions of tokens, it saw forums where questions get answers, tutorials, Q&A sites, documentation. So the skill of answering is already inside — but it's one persona among thousands (it equally learned to continue rants, spam, and lists of exam questions). Instruction tuning doesn't teach answering; it collapses the persona distribution — massively raising the probability that "question-shaped input → helpful-answer-shaped output" wins over all the other learned continuations. That's why LIMA's 1,000 examples were enough: they were selecting a behavior, not installing one.

This gives you a sharp lens for what instruction tuning can and cannot do:

  • ✅ Can: unlock and standardize behaviors the base model already latently has — formats, task-following, tone, refusing gracefully, using domain vocabulary it saw in pretraining.
  • ❌ Can't: create capabilities absent from pretraining. If the base model never saw meaningful amounts of Kotlin, no amount of instruction tuning produces a good Kotlin assistant.
  • ⚠️ Dangerous: training it to answer questions whose answers it doesn't actually know. Read that twice, because it's a genuinely advanced insight most practitioners miss: if your SFT data contains answers built from facts outside the model's knowledge, the gradient can't install those facts — what it can install is the behavior pattern "when asked obscure things, produce confident-sounding specific answers." You are literally training hallucination. Research on this (e.g., work following Gekhman et al., 2024) shows fine-tuning on unknown-to-the-model facts measurably increases hallucination. This is a core reason "fine-tune facts in" fails, and it previews our hallucination topic next lesson. The fix: SFT answers should either draw on knowledge the model plausibly has, or demonstrate saying "I don't know" / consulting provided context.

Practical training-process notes (full mechanics in Module 3, but these belong to the data story):

  • Epochs = full passes over your dataset. Instruction tuning typically uses 1–3. More passes on a small dataset → the model starts memorizing your examples verbatim instead of learning the pattern — overfitting. Symptom: it parrots training answers word-for-word even for slightly different questions.
  • Always fine-tune from the instruct version of a model when your data is small and chat-shaped — you inherit all the alignment work. Start from the base model only when you have lots of data and want full control of the persona.

Summary

Instruction tuning selects and amplifies the "helpful assistant" persona already latent in the base model. It shapes behavior powerfully, installs knowledge poorly, and — done carelessly with unknown facts — actively teaches confident lying.

Mental model

A method actor who has studied every role in existence. Instruction tuning is the director saying "you're playing the helpful expert now" — a thousand line-readings is plenty, because the acting skill was already there.

Mistakes to avoid

  • Running 10 epochs "so it learns better." You'll get a parrot. Watch for memorized verbatim outputs.
  • Filling SFT data with facts the model can't know (your 2026 pricing, internal names). You're not teaching facts; you're teaching fabrication-with-confidence.

Exercise

Write 5 SFT examples for a hypothetical support bot. Deliberately make 2 of them require private knowledge the base model can't possess (e.g., your refund policy details), and rewrite those 2 so the assistant instead demonstrates asking for / using provided context. Feeling that rewrite is internalizing the deepest lesson of this topic.