FoundationsChecking saved investigationReading browser-local route memory before showing a continuation.

Foundation Lab

Instruction Tuning

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

Concept 84 of 100Scaling & AlignmentPhase 7
#84InstructScaling & Alignment
key equation\mathcal{L} = -\sum_t \log p(y_t | \text{instr}, y_{<t})

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

\mathcal{L} = -\sum_t \log p(y_t | \text{instr}, y_{<t})
PredictionCommit before the demo.

Ask what should change when the equation is manipulated, then let the visualization test that expectation.

EvidenceCompare local witness and source.

Use the runnable panel, the key equation, and canonical papers as separate forms of evidence for the same object.

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

Interactive Visualization

Core Math (Optional Deep Dive)

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

Key Equation
L=tlogp(ytinstr,y<t)\mathcal{L} = -\sum_t \log p(y_t | \text{instr}, y_{<t})

Fine-tune on (instruction, response) pairs:

L=tlogp(ytinstruction,y<t)\mathcal{L} = -\sum_{t} \log p(y_t | \text{instruction}, y_{<t})

Multi-task format:

Task: descInput: 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.