Skip to content

Post-training 101, lesson 7

Preference tuning without the scorer

The pairs that train a scorer can also tune a model directly, with no scorer at all. This lesson puts the two roads side by side, RLHF and DPO, and shows when each one is worth taking.

What do you run?

Every example below changes to fit what you pick. The businesses are made up for teaching.

The picture, one step at a time

Each box is one stage. The picture lights up as you scroll.

Step 1 of 6

One set of pairs, two roads

Lesson 6 ended with a pile of preference pairs: questions, each with a winning and a losing answer. There are two ways to tune a model with them. The long road is RLHF, short for reinforcement learning from human feedback: train a scorer, then let the model practise against it. The short road is DPO, short for direct preference optimisation: skip the scorer and tune on the pairs themselves.

Step 2 of 6

The long road has many moving parts

On the long road, the scorer from lesson 6 marks the model's practice answers, and the model is nudged towards higher marks, as in lesson 3. While that runs, several models are working at once: the one being trained, the scorer, a frozen copy of where the model started, and usually a helper that estimates how well each answer is going. That is a lot of machines and a lot of settings to get right.

In OpenAI's 2022 InstructGPT work, the model in training ran alongside a 6-billion-parameter scorer, a 6-billion-parameter helper and a frozen copy of the starting model.

Step 3 of 6

The short road: tune on the pairs directly

In 2023 researchers showed the scorer can be skipped. DPO takes each pair and nudges the model so the winning answer becomes a bit more likely, and the losing one a bit less, measured against the starting model. Picture a cook who never meets the judge, but reads the judge's notes, "this dish, not that one", and adjusts the recipes. Where the picture breaks: the cook never tries a new dish and gets it marked. DPO only learns from the answers already in the pairs.

The DPO paper (Rafailov and others, May 2023) reported results as good as or better than the long road on summarising and single-turn chat, with a method it called much simpler to build and train.

Step 4 of 6

Both roads keep a leash

Both roads measure the model against where it started, and both stop it moving too far. Without that pull back, a model can drift into strange answers that happen to win: very long ones, or the same safe phrase every time. The strength of the leash is one setting, and it is worth testing more than one value.

Step 5 of 6

Whose answers are in the pairs?

Because the short road only learns from the pairs, it matters who wrote the answers. Pairs built from your own model's answers show it its own mistakes. Pairs written by a different or older model teach it to avoid mistakes it may never make. So when you build pairs, have the model you are tuning write the answers, then pick between them.

The open Tülu 3 recipe (the Allen Institute for AI, November 2024) built about 354,000 pairs from its own model's answers mixed with other models', with another AI model doing the picking. Its team chose a form of DPO over the long road for simplicity and cost.

Your pairs were made two years ago from an older model's answers. What is the risk?

Step 6 of 6

Choosing a road, and testing it

For your shop's support assistant, the short road is usually the place to start: fewer parts, less computing, easier to repeat. Take the long road when you need what only it leaves behind, a scorer you can keep using to mark live answers, or practice on questions nobody has picked between. Either way, hold some pairs back and check the tuned model beats the untuned one on them.

You have 600 good pairs and want the model to answer more like the winners. Which road first?

Which road?

Here are four things you want from the AI in your business. Sort each one: tune straight on the pairs, train a scorer and let it practise, or skip training and fix the prompt.

  1. 1You have 800 pairs of support replies your team picked between, and you want the assistant to sound more like the winners.

  2. 2You want something that gives every live reply a score before it is sent, so low scorers wait for a person.

  3. 3It signs off with "Cheers!" and you want "Kind regards".

  4. 4You want it to keep getting better on new kinds of question each week, and nobody has time to pick pairs for them.

0 of 4 right so far, 4 to go.

RLHF or DPO: the comparison card

This is what you keep: the two roads on one card, and the rule for picking one.

RLHF or DPO: the comparison card

  1. Both start from the same thing: pairs of answers, with the better one marked.
  2. RLHF trains a scorer, then the model practises against it. More parts and more cost, but it can practise on new questions, and you keep the scorer.
  3. DPO tunes the model straight on the pairs. No scorer and no practice rounds, so it is simpler and cheaper.
  4. DPO only learns from the answers in the pairs. Pairs made from your own model's answers teach it the most.
  5. Both keep the model close to where it started, so it cannot drift into odd answers that happen to win.
  6. Test the tuned model against the untuned one on pairs it has never seen.

Start with the short road. Take the long one only when you need a scorer to keep, or practice beyond the pairs you have.

Next: Lesson 8: Rewards a machine can check, and GRPO. How a model learns from a group of its own tries, marked by a rule instead of a scorer.