Log inStart free
LESSON 12.10 · 5 STAGES · 3 CONTROLS · 2 CHECKSPRO · PREVIEW

Rejection sampling fine-tuning

Watch a model train only on its own answers that pass a check.


Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 2 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 12.10 · POST-TRAINING BAYROUND 1 · 16 SAMPLES
01
Stage 1 of 5 · Sample answers
The model answers each prompt 4 times. Each chip is one sampled answer.
Explain it simply

Each row is one prompt, a question for the model. The bars show how likely the model is to give each answer, and the first bar is the right one. Each chip on the right is one answer. The model wrote 4 answers per prompt.

Four prompts. Each has four answer bars and 4 sampled answers. 2 + 3 gives the right answer with chance 70%, 13 × 17 with chance 6%.

policy and correct markssampled answerswrong marks and empty roundsrejected sample
policy: chance of each answer4 samples per prompt2 + 370%512%610%238%4523556 × 740%4225%4820%3615%134848423617 + 2820%4535%3525%5520%445545445513 × 176%22140%21134%23120%30211211211231round 1 of 5y ~ π(· | x): 4 samples for each of 4 prompts, 16 in allpolicy: chance of each answer4 samples per prompt2 + 370%512%610%238%4523556 × 740%4225%4820%3615%134848423617 + 2820%4535%3525%5520%445545445513 × 176%22140%21134%23120%30211211211231round 1 of 5y ~ π(· | x): 4 samples for each of 4 prompts, 16 in all
Toy: 4 prompts with 4 answers each, 5 rounds; samples are seeded
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
yj∼πθ(⋅∣x),  j=1…k\sy{y}{data}{y_j} \sim \sy{pi}{out}{\pi_\theta}(\cdot \mid x),\; j = 1 \ldots \sy{k}{param}{k}
k=4,  π(5∣2+3)=0.70k = 4,\; \pi(5 \mid 2 + 3) = 0.70

Each sample is drawn from the model's chance of each answer.

Common mix-ups

MYTHTraining on every sample also makes the model better.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
2 CHECKS · PRO
Q01With 8 samples instead of 4, is 13 × 17 more or less likely to get no correct sample?

Make your guess, then test it in the diagram. All 2 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 3 live controls
  • 2 mix-up cards and 2 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.