Instruction Tuning

Instruction tuning adapts a pretrained model to follow natural-language or structured task instructions. It is usually supervised fine-tuning on examples of instructions and desired responses.

Given examples , where is an instruction or conversation context and is the target response, the objective is:

For token sequences:

Why It Matters

  • Converts a pretrained next-token model into a more usable assistant or task solver.
  • Teaches formatting, refusal style, tool-use patterns, and task conventions.
  • Often precedes preference optimization or reinforcement learning from feedback.
  • Can overfit to prompt style instead of learning robust task behavior.

Data Contract

FieldQuestion
Instruction sourcehuman-written, synthetic, benchmark-derived, conversation logs, or tool traces?
Response sourceexpert answer, model answer, verified output, execution result, or preference winner?
Task mixturecoding, QA, math, tool use, domain science, safety, formatting?
Target formatfree text, JSON, function call, citation, proof, code, or command?
Filteringprivate, unsafe, unverifiable, duplicate, or benchmark-leaking examples removed?
Loss maskare prompt tokens, tool outputs, and response tokens masked correctly?

For supervised instruction tuning:

where is the set of response tokens that contribute to the loss. Loss masking is part of the training contract.

Capability Boundary

Instruction tuning can teach response format without proving domain correctness:

ClaimNeeds
follows instructionsheld-out instruction-following eval
uses tools correctlyexecutable tool-call or environment evaluation
improves reasoningreasoning benchmark with contamination check
improves domain sciencedomain task metric and expert/error analysis
improves safetyadversarial and policy-specific safety eval

Formatting compliance and factual correctness should be evaluated separately.

Failure Modes

FailureSymptom
benchmark contaminationtraining examples overlap with eval prompts
style overfittingmodel mimics answer style but not task skill
catastrophic forgettingbase capabilities degrade after tuning
tool schema mismatchgenerated calls are syntactically plausible but invalid
synthetic-data biasmodel inherits generator artifacts
unsafe memorizationprivate or sensitive data appears in outputs

Data Questions

  • Are instructions diverse or template-heavy?
  • Are answers verified, preference-ranked, synthetic, or human-written?
  • Are tool calls, citations, and structured outputs represented consistently?
  • Are unsafe, private, or unverifiable examples filtered?

Checks

  • Does evaluation distinguish instruction following from factual correctness?
  • Are examples leaking benchmark prompts or answers?
  • Does tuning degrade base capabilities such as coding, reasoning, or domain knowledge?
  • Are responses judged by exact match, execution, human preference, or verifier checks?
  • Is the loss mask reported for chat templates and tool traces?
  • Is evaluation separated by task slice rather than only one aggregate score?