Foundation Lab

Instruction Tuning

Unlocks instruction-following—base models don't understand "summarize"

Concept 84 of 100Scaling & AlignmentPhase 7
#84InstructScaling & Alignment
key equation
L=−∑tlog⁡p(yt∣instr,y<t)\mathcal{L} = -\sum_t \log p(y_t | \text{instr}, y_{<t})
Reading map and next steps

Selected Foundation Object

Keep the equation fixed; move through the evidence.

Concept 84 of 100InstructScaling & Alignment / Phase 7: Alignment & RLHF
Current question

Base models predict text; instruct models follow commands

L=−∑tlog⁡p(yt∣instr,y<t)\mathcal{L} = -\sum_t \log p(y_t | \text{instr}, y_{<t})
PredictionCommit before tracing the equation.

Ask what should change under a concrete input, then trace that expectation through the equation.

EvidenceCompare the equation and source.

Use the key equation and canonical papers as the available witnesses, without implying that a runnable panel exists.

InvariantName what survives notation changes.

The useful learning product is the reusable mechanism you can carry into another model, paper, or engineering tradeoff.

Next moveContinue through the atlas.

Use prerequisites, dependents, and semantic links to repair the next gap without leaving the object behind.

Why It Matters for Modern Models

  • Unlocks instruction-following—base models don't understand "summarize"
  • FLAN showed dramatic zero-shot improvements
  • First step before RLHF: instruct → RM → PPO

What Tutorials Skip

What is still poorly explained in textbooks and papers:

  • Base models predict text; instruct models follow commands
  • Diversity matters: more task types = better generalization
  • CoT in the mix teaches reasoning as an instruction

Visualization Status

Core Math (Optional Deep Dive)

If you want intuition first, start with the key equation and cited sources. Come back here for the full walkthrough.

Key Equation
L=−∑tlog⁡p(yt∣instr,y<t)\mathcal{L} = -\sum_t \log p(y_t | \text{instr}, y_{<t})

Fine-tune on (instruction, response) pairs:

L=−∑tlog⁡p(yt∣instruction,y<t)\mathcal{L} = -\sum_{t} \log p(y_t | \text{instruction}, y_{<t})

Multi-task format:

Task: ⟨desc⟩Input: xOutput: y\text{Task: } \langle\text{desc}\rangle \quad \text{Input: } x \quad \text{Output: } y

Instruction-tuned models generalize to new tasks (zero-shot).

Canonical Papers

Finetuned Language Models Are Zero-Shot Learners

Wei et al.2022ICLR
Read paper →

Connections

Prerequisites

Next Moves

Choose the next question to carry this object forward.