LLM + RoboticsModule 07 · How models learn to be useful

LLM post-training: demonstrations, comparisons and checkers (and the robot equivalents)

Pre-training teaches a model to continue text. Post-training turns it into something that helps. Robot foundation models go through the same two stages.

Source: Dongxi (东锡), “预训练之后,为什么还要后训练?” (“After pre-training, why post-train?”), X article in Chinese, 21 Oct 2026 · post · translated text in sources/07-dongxi-post-training.md. It's the first part of a series.

Start here (no maths needed)

A model that has read the whole internet knows a lot but doesn't know how to help. A second round of training, with three kinds of teacher, fixes that.

Think of it like this

Imagine someone who has read every book in a huge library but has never had a job. Start a sentence and they can finish it. But ask them for help and they might just keep chatting about the topic instead of doing what you asked. To become a good helper, they need training on the job, and there are three kinds of teacher:

How it works

  1. Pre-training: the model reads trillions of words and learns to guess the next word. That's the library-reading part (see Module 06, Day 1).
  2. Learning from examples: it practises on requests paired with good answers.
  3. Learning from comparisons: people pick the better of two answers, and the model leans toward what people prefer.
  4. Learning from a checker: for maths or code, a program marks each attempt right or wrong, and the model does more of what worked.
  5. Throughout, a "leash" keeps the model close to what it already knew, so it doesn't forget everything while chasing points.

Why robots care

Robot "brains" are now trained the same way. First they learn general knowledge from lots of pictures, videos and robot recordings. Then they're post-trained: people show the robot how to fold a towel (examples), compare two attempts (comparisons), or let a sensor check whether the towel ended up folded (checker).

Try it

Words to know

Pre-training
The first, huge training stage: learn to predict the next word (or next action).
Base model
A model that has only been pre-trained.
Post-training
Everything done afterwards to make the model helpful and safe.
Reward model
A "judge" model trained to score answers like people would.
Verifier
A program that checks whether an answer is right, such as tests for code.

Going deeper: everything below is the full version. On a first read, skim the headings, the robotics mapping table and the demo.

In this module
  1. Summary
  2. Why this matters for robotics
  3. Deep dive: what a base model is missing
  4. Deep dive: pre-training vs post-training
  5. Deep dive: instruction tuning (learn from demonstrations)
  6. Deep dive: preference alignment and the KL leash (interactive)
  7. Deep dive: RLVR (learn from a checker)
  8. Playbook
  9. Self-check
  10. Glossary & further reading

1. Summary

TL;DR

Pre-training only teaches next-token prediction on web text. The result, a base model, knows a lot, but it doesn't reliably follow instructions, it isn't steered away from harm, and it struggles with long chains of reasoning. Post-training keeps training the same model on small, curated data with a different signal. There are three main families, each with a different "teacher":

In the author's phrase: pre-training decides what a model knows, and post-training decides how it uses that knowledge.

2. Why this matters for robotics

This is the training recipe for current robot foundation models (VLAs). The three teachers map almost one-to-one:

LLM stageRobot equivalentTeacher
Pre-training on web textA vision-language backbone pre-trained on web images and text, then trained on large multi-robot datasets (many robots, many tasks)Next token / next action
Instruction tuning (SFT)Behaviour cloning: fine-tune on teleoperated demonstrations for your robot and task. Condition on camera + instruction, and score only the actions.Demonstration
Preference alignmentHumans compare two robot rollouts and a reward model learns from the choices: Module 06, Day 30, the original deep-RL-from-preferences paper, used simulated robots.Comparison
RLVRRL with a success detector: is the block in the bin? Is the door open? In simulation, the simulator itself is a perfect verifier.Checker
KL leashKeep the fine-tuned policy close to the demonstrated behaviour (a trust region, as in PPO, Day 29), because unfamiliar actions on real hardware can break things.Regulariser

The robotics twist: robot demonstrations are expensive (a person teleoperating for hours) while text is nearly free. So the "small, curated post-training data" point is even stronger for robots. A few hundred good demonstrations of one task is typical, which is why the pre-trained backbone matters so much.

3. Deep dive: what a base model is missing

The article names three gaps, with one root cause: the training objective (predict web text well) doesn't match the goal (be helpful and harmless).

  1. Instruction following: asked to translate, a base model may just keep writing in the source language, because that's a likely continuation.
  2. Harm: nothing in next-token prediction penalises dangerous advice, abuse or confidently wrong medical answers.
  3. Long-chain reasoning: knowing what a maths solution looks like is far from producing a correct one step by step.

This is the same "objective mismatch" theme as Module 01: optimise the wrong metric and you get exactly what you asked for, not what you wanted.

4. Deep dive: pre-training vs post-training

Pre-trainingPost-training
GoalPredict the next token in textBehave as people want: follow instructions, stay safe, get answers right
DataRaw text, trillions of tokens, mostly webSmall and curated: prompt+answer pairs, A-vs-B comparisons, checkable problems. Large instruction sets reach a few million examples.
SignalEvery next token in the textA demonstration, a "which is better" judgment, or a checker's right/wrong
ComputeThe vast majorityA small fraction
Change to the modelBuilds knowledge and language from scratchGently steers an already-capable model

Note "same model": post-training doesn't build a new network. It continues optimising the same weights with new data and a new loss. Module 05 shows a frontier example. Kimi K3's post-training combines SFT, RL across domains, and distilling nine specialist teachers back into one model.

5. Deep dive: instruction tuning (learn from demonstrations)

The data is (instruction, good response) pairs. The training rule barely changes. It's still next-token prediction, with one twist: the loss is only computed on the response tokens. The instruction is context, not something to imitate.

loss = − Σ_{t ∈ response} log p(token_t | instruction, response_<t)

Robotics: behaviour cloning is SFT with actions as the "response tokens". Condition on images and the instruction, and maximise the likelihood of the demonstrated actions. The classic failure is compounding error: a small mistake leads to a state no demonstration covered, which leads to a bigger mistake. That's why corrective data (e.g. DAgger) and the next two stages matter.

6. Deep dive: preference alignment and the KL leash

Writing a perfect answer is hard, but judging which of two answers is better is easy. Preference data is (prompt, answer A, answer B, which one people prefer). There are two routes:

Both include a KL penalty to the original (reference) model. The objective being maximised is:

E[ reward(x, y) ]  −  β · KL( π(·|x) ‖ π_ref(·|x) )

This has a neat closed-form optimum, the basis of DPO's derivation:

π*(y|x) ∝ π_ref(y|x) · exp( reward(x, y) / β )

β is the leash. Large β keeps you near the reference model. Small β lets the policy chase reward, including any flaw in the reward model. That flaw-chasing is called reward hacking: the reward model is a learned classifier with errors (see Module 01), and an optimiser will find them.

Interactive: the KL leash

Five candidate answers to one prompt. Grey bars: the reference (SFT) model's probabilities. Coloured bars: the post-trained optimum π* ∝ π_ref · exp(r/β). Answer E is a reward hack: long and flattering, so the reward model over-scores it, but people actually rate it low.

P(hack answer E)
–
Reward-model score
–
True human score
–
KL from reference
–

Drag left (weak leash): the reward-model score keeps rising, but the true human score peaks and then falls as probability floods onto E. That's reward hacking, also called over-optimisation. A moderate β gets most of the real gain.

7. Deep dive: RLVR (learn from a checker)

Some answers can be checked by a program: a maths problem has a final number, and code has tests that pass or fail. Reinforcement Learning with Verifiable Rewards uses such a verifier as the teacher:

  1. Sample several attempts at the same problem.
  2. The verifier marks each one right or wrong.
  3. Raise the probability of the correct attempts and lower the others. Group-relative methods (e.g. GRPO) score each attempt against the group's average, so no separate value model is needed.

Robotics: a success detector is a verifier. In simulation it's exact: the simulator knows if the cube is in the bin. In the real world it's often a learned classifier or a sensor, and the same caveat applies with physical consequences. A detector that only checks "cube near bin" can reward a robot that knocks the bin over onto the cube. Tune its threshold with the methods in Module 01 before trusting it as a reward.

8. Playbook

  1. Start from the strongest pre-trained model you can afford. Post-training steers capability, it doesn't create it.
  2. SFT first on high-quality demonstrations of the behaviour you want. For robots, collect clean teleoperation data for your exact setup.
  3. Where good answers are hard to write but easy to compare, collect preferences. Use DPO for simplicity, or a reward model plus PPO if you need an explicit judge.
  4. Where success is checkable, use a verifier (RLVR / success detectors). Audit what it actually checks.
  5. Always keep a leash (a KL penalty or trust region) and watch the true metric, not just the optimised one, for over-optimisation.
  6. Iterate: each stage can expose gaps that need more data for an earlier one.

9. Self-check

Why did GPT-3 answer "explain the Moon landing to a 6-year-old" with more questions?

It was trained only to continue web text, where lists of similar prompts are common. Continuing the list was a high-probability next step. Following the instruction wasn't part of its objective.

In instruction tuning, which tokens carry the loss?

Only the response tokens. The instruction is context to condition on, not something to imitate.

Why compare two answers instead of writing the ideal one?

Judging is much easier than producing, like a food critic who can't cook. Comparisons are cheaper and more consistent to collect than perfect demonstrations.

What happens with the KL leash removed (β → 0)?

The policy collapses onto whatever the reward model scores highest, including its mistakes (reward hacking), and drifts from what pre-training taught it.

Why is RLVR resistant to "sounds good but wrong"?

The verifier checks correctness (the final number, the tests), not style or length. A polished wrong answer gets zero.

What's the robotics version of each teacher?

Demonstration = behaviour cloning from teleoperation. Comparison = humans ranking robot rollouts (Module 06, Day 30). Checker = a success detector or the simulator's ground truth.

10. Glossary & further reading

TermMeaning
Base modelA model after pre-training only
SFT / instruction tuningFine-tuning on (instruction, good response), with loss on the response only
Preference alignmentLearning from human A-vs-B judgments
Reward modelA model trained on preferences to score responses
RLHFRL against a reward model learned from human feedback
PPOProximal Policy Optimization, a clipped policy-gradient RL algorithm
DPODirect Preference Optimization: learns from pairs without a separate reward model
KL penaltyCost for drifting from the reference model's distribution: the leash
Reward hackingExploiting errors in the reward signal instead of doing the task
RLVRRL with verifiable rewards: a program checks correctness
Behaviour cloningRobotics SFT: imitate demonstrated actions
Success detectorA robotics verifier: did the task succeed?