Direct Preference Optimization trains a language model straight from pairs of "this reply beats that one". It needs no reward model and no RL loop. Paprika points the same loss at whole game trajectories and lifts an 8B model's success rate by 47%.
Pick a loss, then press Train. Five replies to one prompt start at the reference model's odds. Watch where the preferences push them. Then we build, piece by piece, the closed-form policy, the DPO loss, its gradient and Paprika's curriculum.
You need a little Python and what a probability is. We build the rest from zero.
Session 6 of Georgia Tech CS 8803, LLM seminar. It rests on two papers: Rafailov, Sharma, Mitchell, Ermon, Manning and Finn, Direct Preference Optimization: Your Language Model is Secretly a Reward Model (NeurIPS 2023), and Tajwar, Jiang, Thankaraj, Rahman, Kolter, Schneider and Salakhutdinov, Training a Generally Curious Agent (2025). Every idea is re-taught here in our own words and devices.
Toy, run live: five made-up replies, a made-up hidden reward, and preferences drawn from it by the Bradley-Terry rule. The dashed outline is the closed-form target of Chapter 1. "No weight" drops DPO's per-pair weight, as the paper's Unlikelihood baseline does.
Chapter 0
See which part of the standard alignment recipe is slow and unstable
A pretrained model can continue any text. Ask it a question and it may answer, or it may write the next forum post. Alignment teaches it which of the things it knows to say.
The standard recipe in 2022 is RLHF, reinforcement learning from human feedback. It has three phases, and each one trains a different model.
Phase 2 needs a model of one human choice. Call the hidden quality of a reply y to a prompt x its reward r(x, y). Call the two replies y1 and y2. The Bradley-Terry model gives the chance that a person prefers y1.
p of y-one beats y-two given x equals sigma of: r of x, y-one, minus r of x, y-two.
Take the reward gap between the two replies. Pass it through sigma. The result is the chance that the first reply wins.
With made-up rewards 2.0 and 1.0: the gap is 1.0, and σ(1.0) = 1 / (1 + 0.368) = 0.731. A one-point gap wins 73% of comparisons, not all of them.
Phase 2 is an ordinary classification problem. Phase 3 is the trouble. Its objective averages over replies sampled from the policy, and drawing a token is not differentiable. So the field uses PPO (Proximal Policy Optimization), an RL method that estimates the gradient from samples.
Each box is a 7B model held on the GPU. The bar adds up weights and optimizer state. Switch to DPO and see which boxes go.
Illustrative sums, not from the papers: 2 bytes per weight in bf16, plus 8 bytes of Adam state per trained weight. Activations, fp32 master weights and the rollout cache are left out.
With these sums: one 7B model is 7 billion × 2 bytes = 14 GB. PPO holds four (policy, critic, reward model, reference), so 56 GB. Adam adds 7 billion × 8 bytes = 56 GB for each of the two trained models. The total is 168 GB. DPO holds two models and trains one: 28 + 56 = 84 GB.
Failure. The policy finds text that the reward model over-scores, such as padding every answer. The DPO paper names the risk "mode-collapse to single high-reward answers". Measure: the reward climbs while human win rate stalls. Fix: the KL leash of Chapter 1. PPO adds four more knobs to tune: clip ratio, GAE lambda, value-loss weight and KL target.
Chapter 1
Solve the leashed reward problem exactly, with no search at all
Phase 3 asks: which policy earns the most reward while it stays near the reference? Name the parts. The policy π gives each reply y a probability π(y | x). The reference πref is the frozen SFT model. The KL divergence measures how far π has moved from πref; it is 0 only when they match. The knob β sets the price of each unit of distance.
Maximize over pi: the average, over replies y drawn from pi, of r of x, y, minus beta times the KL divergence of pi from pi-ref.
For a candidate policy, average the reward of its replies. Subtract beta times how far it moved from the reference. The best policy makes this largest.
With made-up numbers: average reward 1.5, KL 0.4 nats. At β = 0.1 the score is 1.5 − 0.04 = 1.46. At β = 1 the same move scores 1.1, so a large β keeps π near home.
Appendix A.1 of the paper solves this exactly. Put the KL inside the average, flip the sign and divide by β. The bracket becomes the KL from π to one special distribution, plus a term with no π in it. A KL is smallest, 0, when the two sides match. So that distribution is the answer.
pi-r of y given x equals pi-ref of y given x, times e to the r of x, y over beta, divided by Z of x.
Start from the reference odds. Multiply each reply by e to its reward over beta. Divide by the total Z so that the odds add to 1.
With made-up numbers: four replies at πref = 0.25, rewards 2.0, 1.0, 0.0 and −1.5, β = 1. The numerators are 1.847, 0.680, 0.250 and 0.056, so Z = 2.833. Then πr = 65.2%, 24.0%, 8.8% and 2.0%.
Four replies with their rewards. Grey ticks are the reference odds. Drag β and watch the formula move the mass.
Toy rewards and a uniform reference. The formula above draws each bar.
Failure. Z sums over every possible reply, which is every token sequence. Measure: count the terms. A 50,000-token vocabulary and 100-token replies give 50,000100 of them. So nobody can compute πr directly. Fix: Chapter 2 makes Z cancel.
Chapter 2
Turn the policy formula around so that the intractable sum cancels
Take the log of the Chapter 1 formula and solve it for the reward:
The reward that made a policy optimal is β times its log-ratio to the reference, plus a term that depends on the prompt alone. Bradley-Terry uses only the reward gap between two replies to one prompt. In that gap, β log Z(x) appears twice and subtracts to zero.
We do not know the optimal policy. So put the trainable policy πθ in its place and fit it to real pairs by maximum likelihood. Call the preferred reply yw (the winner) and the other yl (the loser). Negate the log-likelihood to get a loss.
L-DPO equals minus the average over pairs in D of log sigma of: beta log of pi-theta of y-w over pi-ref of y-w, minus beta log of pi-theta of y-l over pi-ref of y-l.
For each pair, take the winner's log-ratio minus the loser's log-ratio, times beta. Pass it through log sigma and negate. Average over the pairs.
With the made-up numbers of Chapter 3: the winner's log-ratio is +0.40 and the loser's is −0.80, with β = 0.1. Inside: 0.1 × 1.20 = 0.12. The loss is −log σ(0.12) = 0.635.
Every input comes from two forward passes: one through πθ, one through the frozen πref. The pairs exist before training starts, so the loop samples nothing.
Three replies, small enough to sum Z by hand. Add the same c to every reward. Watch Z and the policy bars.
Toy: πref = 0.5, 0.3, 0.2; rewards 1, 0, −1; β = 1. The paper calls rewards that differ by a function of the prompt alone one equivalence class (Appendix A.5, Lemma 1).
With c = 3: Z goes from 1.733 to 34.80, a factor of e3 = 20.1. The policy stays 78.44%, 17.31% and 4.25%. Every term of Z picked up the same factor, so every ratio stays the same.
Failure. Your loss sits at 0.693 and never moves. Measure: every log-ratio is 0, so the policy and the reference are the same weights. Fix: freeze a separate copy as πref before training, and give the optimizer only πθ.
Chapter 3
Push four log-probabilities through the loss and check them against the paper's code
The prompt: "Write a function that reverses a string." The winner yw is one line, return s[::-1]. The loser yl is a correct 12-line loop. To score a reply, add the log-probability of each of its tokens. That gives one number per reply and per model.
| Quantity | Meaning | Value |
|---|---|---|
| log πθ(yw|x) | policy, winner | −1.20 |
| log πθ(yl|x) | policy, loser | −2.10 |
| log πref(yw|x) | reference, winner | −1.60 |
| log πref(yl|x) | reference, loser | −1.30 |
Compare three states of the same pair. An untrained policy equals the reference, so the margin is 0 and the loss is ln 2 = 0.693, a coin flip. Our policy is a little better than a coin flip. A policy that ranks the pair the wrong way pays more.
| State | log πθ(yw), log πθ(yl) | Margin | Loss |
|---|---|---|---|
| Untrained | −1.60, −1.30 | 0 | 0.693 |
| Mid-training | −1.20, −2.10 | 0.120 | 0.635 |
| Later | −0.85, −3.40 | 0.285 | 0.561 |
| Wrong way | −3.00, −0.50 | −0.220 | 0.809 |
The curve is −log σ(margin). The dot is this pair. Raise the policy's winner, or lower its loser, and watch the dot slide.
Made-up log-probabilities. The formula is the paper's Eq. 7.
Appendix B of the paper gives the loss in six lines of PyTorch. It groups the same four numbers differently: policy gap minus reference gap. (−1.20 + 2.10) − (−1.60 + 1.30) = 0.90 + 0.30 = 1.20, times β gives 0.120 again.
pythonimport torch.nn.functional as F def dpo_loss(pi_logps, ref_logps, yw_idxs, yl_idxs, beta): # the paper's Appendix B pi_yw_logps, pi_yl_logps = pi_logps[yw_idxs], pi_logps[yl_idxs] # -1.20, -2.10 ref_yw_logps, ref_yl_logps = ref_logps[yw_idxs], ref_logps[yl_idxs] # -1.60, -1.30 pi_logratios = pi_yw_logps - pi_yl_logps # 0.90 ref_logratios = ref_yw_logps - ref_yl_logps # -0.30 losses = -F.logsigmoid(beta * (pi_logratios - ref_logratios)) # 0.635 at beta 0.1 rewards = beta * (pi_logps - ref_logps).detach() # implicit rewards return losses, rewards
Failure. The loss is right but the model does not move. Measure: print the sequence log-probabilities; if they include the prompt tokens, the prompt dominates. Fix: sum log-probabilities over the reply tokens only.
Chapter 4
Read the gradient, and see why each pair gets its own weight
Give the quantity inside the loss a name. The implicit reward of a reply is r̂θ(x, y) = β log(πθ(y|x) / πref(y|x)). It is a full reward function: give it a prompt and a reply, and it returns a score. This is the paper's title. Differentiate the loss, using d/dz log σ(z) = σ(−z), and you get its gradient.
The gradient of L-DPO equals minus beta times the average of: sigma of r-hat of y-l minus r-hat of y-w, times the gradient of log pi of y-w minus the gradient of log pi of y-l.
Push the winner up and the loser down. Scale the push by how wrong the current implicit ranking is. A pair that is already learned gets almost no push.
From Chapter 3, r̂w = 0.040 and r̂l = −0.080, so the weight is σ(−0.120) = 0.470. A pair at r̂w = 3 and r̂l = −3 gets σ(−6) = 0.0025, about 190 times less.
The teal curve is DPO's weight, σ(−margin). The blue line is the unweighted loss: every pair at full strength. Drag the margin.
The marks are this page's worked pairs: 0.120 (weight 0.470), 0.285 (0.429) and 6.0 (0.0025).
The paper tests the weight by removing it (Section 4, Appendix C.3). That is its Unlikelihood baseline: raise log π(yw), lower log π(yl), at the same strength for every pair. The hero's "No weight" button runs it.
Failure. The unweighted loss keeps pushing pairs that are already solved, and the policy collapses. Measure: sample at temperature 1. Appendix Table 3 shows Unlikelihood summaries that repeat the word "when" for whole lines. Fix: keep the weight; it fades each solved pair out.
pythondef implicit_reward(policy, ref, x, y, beta): # two forward passes, one subtraction return beta * (policy.seq_logprob(x, y) - ref.seq_logprob(x, y)) def best_of_n(policy, ref, x, candidates, beta): # rerank like a reward model return max(candidates, key=lambda y: implicit_reward(policy, ref, x, y, beta))
Section 5.2 also explains PPO's trouble. The term β log Z(x) returns there as a "soft value function". PPO must estimate it with a critic or a one-sample baseline, and the noise makes its gradient unstable. DPO never estimates it.
Chapter 5
Check what the DPO paper measured, and where its own evidence shows cracks
The paper tests DPO on three tasks, with models up to 6B parameters. Each row names the setup and the result.
| Task | Setup | Result |
|---|---|---|
| Sentiment | IMDb prefixes, GPT-2 large, a sentiment classifier as the true reward, 22 runs | "By far the most efficient frontier" of reward against KL. It beats PPO even when PPO sees the true reward (PPO-GT). |
| Summarization | Reddit TL;DR, GPT-J, GPT-4 as judge | About 61% win rate against reference summaries at temperature 0. PPO: 57% at its best temperature, also 0. |
| Dialogue | Anthropic HH, Pythia-2.8B | The only efficient method that beats the preferred replies. It matches Best of 128 with one sample. |
| New inputs | TL;DR policies on CNN/DailyMail news (Table 1) | DPO 0.36 and 0.31, PPO 0.26 and 0.23, at temperatures 0 and 0.25. |
DPO also holds its win rate as the sampling temperature rises; PPO falls toward the base GPT-J model. Every win rate above comes from a GPT-4 judge. Section 6.4 checks that judge against people.
The study compared each method's summaries with greedy PPO summaries. Pick a method and compare the two GPT-4 prompts with the human verdict.
The paper's Table 2 (TL;DR). "Simple" asks which summary covers the important information. "Concise" also asks which is more concise.
With the paper's numbers: for DPO, humans give 58%, the concise prompt 54% and the simple prompt 47%. The simple prompt is 11 points off; the concise prompt is 4 points off. The authors found that the simple prompt favours longer, more repetitive summaries, so they report the concise prompt.
Failure. DPO can be fluent and wrong. Appendix Table 9 shows a dialogue answer about how the United States entered World War II. It is detailed and confident, and it invents facts, so GPT-4 picks the human answer. Measure: check facts, not only preference. Fix: none inside the loss; DPO learns whatever the labels reward.
Two more limits come from the paper itself. The authors "did not meaningfully tune" β (0.1, or 0.5 for TL;DR). They also leave open generalization, reward over-optimization and scale beyond 6B.
Chapter 6
Turn games into preference pairs that reward gathering information
Now the setting changes. An agent plays twenty questions: it asks, gets "yes" or "no", and must find the secret. It acts for many turns, and it never sees the hidden state. That kind of task is a POMDP (partially observable Markov decision process). To win, the agent must explore: ask a question because the answer is unknown.
Prior work found that LLMs explore poorly even on a multi-armed bandit: several slot machines with unknown payout. Training on trajectories from a known algorithm (UCB) helps on bandits. But most tasks have no such algorithm. Paprika instead trains on many different games and hopes the skill transfers.
Five arms with hidden payout rates. Each dot is one pull: green paid, grey did not. Pick a strategy and play a game. The bars show the success rate over 4,000 games.
Toy payout rates 0.60, 0.30, 0.45, 0.75, 0.50. Paprika's own bandit task also gives 20 pulls, then asks for the best arm; its numbers are in Chapter 9.
Paprika builds ten task groups (Table 1 of the paper). Some need world knowledge, so another LLM, GPT-4o-mini, plays the environment. Rule-based games use a program, which the authors found more reliable. A judge filters out "wins" that the environment reported wrongly.
| Task group | Train / test tasks | Max turns | Feedback |
|---|---|---|---|
| Twenty questions | 1,499 / 367 | 20 | LLM |
| Guess my city | 500 / 185 | 20 | LLM |
| Wordle | 1,515 / 800 | 6 | program |
| Cellular automata | 1,000 / 500 | 6 | program |
| Customer service | 628 / 200 | 20 | LLM |
| Murder mystery | 203 / 50 | 20 | LLM |
| Mastermind | 1,000 / 500 | 12 | program |
| Battleship | 1,000 / 200 | 20 | program |
| Minesweeper | 1,000 / 200 | 20 | program |
| Bandit best arm | 81 / 1 | 21 | program |
To make data, Paprika samples nsample = 20 games per training task (100 for Mastermind). It uses Min-p sampling at temperature 1.5, which keeps only tokens close to the top token's probability. So games are diverse but still readable. The winner hw is the game that succeeds in the fewest turns. Paprika draws the loser hl at random from the worse games, to keep the data diverse.
With made-up scores for one task: 6 games fail, 9 win slowly, 5 win fast. hw is the fastest win. hl may be a failure or a slow win, with equal chance for each of the other 19.
Failure. The environment LLM says "Goal reached" when the guess was wrong. Measure: a separate judge call that knows the secret replies VALID or NOTVALID. Fix: drop the false wins, and drop games whose environment replies break the format after 5 attempts.
Chapter 7
Sum the implicit reward over the agent's own turns, and add a pull toward the winner
A game is a trajectory h: the environment speaks, the agent acts, again and again. Call the agent's action at turn t at, and everything before it, the history, h:t. Only the agent's tokens count. The environment's words are context, never a target.
L-DPO equals minus the average of log sigma of: the sum over t of beta log pi-theta of a-t-w given h-to-t-w, over pi-ref of the same, minus the same sum for the loser.
Add the agent's log-ratios over every turn of the winning game. Do the same for the losing game. Subtract, times beta, and apply the usual log sigma loss.
With made-up numbers: the winner's two turns have log-ratios +0.20 and +0.15, sum 0.35. The loser's three turns have −0.05, −0.20 and −0.40, sum −0.65. At β = 0.1 the margin is 0.100 and the loss is 0.644.
Paprika trains in two stages. First, SFT on the winning games alone: maximize the log-probability of the winner's action tokens, divided by their count. Then DPO on the pairs.
But DPO only watches the gap. It can widen the gap by lowering both replies, if the loser drops faster. Razin et al. call this unintentional unalignment. The fix is RPO, which adds the SFT loss back:
Both outcomes start at log πref = −1.00 (dashed line). Switch the outcome and watch the DPO term, then raise α.
Made-up log-probabilities, β = 0.1. The SFT term here is −log πθ(yw) for one token. Paprika uses α = 1.0, following Pang et al.
Both outcomes have margin 0.120 and DPO loss 0.635. With α = 1, RPO gives 0.635 + 0.60 = 1.235 when the winner rises, and 0.635 + 1.30 = 1.935 when both fall. Only RPO prefers the healthy outcome.
The recipe (Section 4): 17,181 SFT games and 5,260 RPO pairs; learning rate 10−6 for SFT and 2 × 10−7 for RPO; batch 32; AdamW with cosine decay. πref is the initial model. The authors chose DPO because it lets data collection and training run on different machines. They expect online RL to do better.
Failure. The agent starts to copy the environment's feedback text. Measure: check the loss mask; environment tokens must have no log-ratio term. Fix: mask every environment token, as the paper does.
Chapter 8
Spend the sampling budget on the task groups that still teach something
In Paprika, "the major cost for training is actually data generation rather than model updates". A 20-turn game needs an agent call and an environment call per turn, so up to 40 calls. Twenty games make up to 800 calls for one pair (our estimate). A task the model always wins, or never wins, gives no useful pair.
So score each task by its spread of outcomes. Call a task τ, the average score of policy π on it Rπ(τ), and the variance of that score σ2π(τ).
nu-pi of tau equals the square root of sigma-squared-pi of tau, divided by R-pi of tau.
Play the task several times. Take the standard deviation of the scores and divide by their average.
With made-up scores (11 for a win, 0 for a loss): always winning gives ν = 0. Winning half the time gives 5.5 / 5.5 = 1. Winning 1 game in 20 gives 2.40 / 0.55 = 4.36. Never winning makes R = 0, so ν has no value.
Measuring ν per task costs rollouts. So Paprika treats each task group as an arm of a bandit and picks groups with UCB (Upper Confidence Bound). Arm k has nk pulls so far, and its observed ν values add up to sk.
theta-k equals s-k over n-k, plus the square root of two log of the sum over j of n-j, over n-k.
For each group, add its average ν to a bonus that shrinks as it gets pulled. Sample the group with the largest total. Update its s and n.
With made-up numbers after 20 pulls: twenty questions has s = 3.2, n = 5, so θ = 0.640 + 1.095 = 1.735. Wordle has s = 0.9, n = 3, so θ = 0.300 + 1.413 = 1.713. Twenty questions is next. If it returns 0.50, it drops to 1.624 and Wordle (1.725) takes over.
Six groups with hidden learning potential (grey ticks). Solid bar: average ν seen. Pale cap: the bonus. Pink: the group served next. Press Play.
Toy: we made up the hidden ν values and the noise. The formula is the paper's Algorithm 1.
The paper ran this on twenty questions, split by GPT-4o-mini into 477 easy, 726 medium and 296 hard training topics. Each of 3 rounds sampled 250 tasks. Against uniform sampling, the curriculum gained 1.4% in average success and 3.3% in pass@4. Pass@4 counts a task as solved if any of 4 tries succeeds: at 40% per try that is 1 − 0.64 = 87%.
Failure. UCB keeps picking a group that always fails. Measure: that group's pairs are empty. Fix: skip tasks with no win; ν has no value there. The paper also warns that the curriculum depends on good groupings.
Chapter 9
Read the transfer results, their limits, and how they pull against alignment
Trained on about 22,500 trajectories from all ten groups, Paprika raises Llama-3.1-8B-Instruct's average success by 47% of its starting value. The sharper test is a game it never saw.
Blue: Llama-3.1-8B-Instruct. Teal: after Paprika. Switch between the unseen bandit and the standard benchmarks.
The paper's Figure 3 (bandit, trained only on other groups) and Table 2 (benchmarks; MT-Bench is out of 10, the rest are percentages).
With the paper's numbers: on the bandit group, success rises from 42.25% to 62.25% with no bandit data. That is (62.25 − 42.25) / 42.25 = 47% more. In leave-one-out runs, Paprika improves 9 of the 10 groups it did not train on. Wordle shows no transfer.
The controls rule out simpler stories. Fine-tuning on 100,000 WildChat conversations hurts every group, so more multi-turn text is not the cause. RPO beats SFT alone on all 6 groups tested, so the losing games carry signal.
Failure. Transfer has a limit. On the standard bandit benchmark, scored by regret (the reward lost on every pull of a worse arm), Paprika helps only with few arms: "the gap vanishes when the number of arms grow". Measure: regret over 100 trials. Fix: the authors suggest online RL on the bandit tasks.
The papers pull in opposite directions. Alignment DPO narrows a model toward liked replies and keeps it near πref. Paprika needs diversity, and it gets it upstream, from sampling at temperature 1.5. The loss only keeps what worked. So Paprika "would perform worse in the absence of a good base model": it can only amplify moves the base model sometimes makes.
Chapter 10
Keep the terms, the numbers, the code and the open questions in one place
DPO turns the leashed reward problem into a classification loss on the policy, because the intractable sum cancels in a reward gap. Paprika feeds the same loss whole game trajectories, chosen by a bandit, and gets an agent that explores better on games it never saw.
| Term | Meaning | Number to remember |
|---|---|---|
| Bradley-Terry | chance of a pick from the reward gap | gap 1.0 gives 0.731 |
| β | price of distance from πref | 0.1 default; 0.5 for TL;DR |
| Closed form | πref · exp(r/β) / Z | 65.2%, 24.0%, 8.8%, 2.0% |
| DPO loss | −log σ(β × log-ratio gap) | 0.693 untrained; 0.635 at margin 0.12 |
| Pair weight | σ(r̂l − r̂w) | 0.470 at margin 0.12; 0.0025 at 6 |
| TL;DR win rate | GPT-4 judge vs references | DPO 61%, PPO 57% |
| RPO | DPO + α × SFT | α = 1.0 |
| Paprika data | filtered self-play games | 17,181 SFT + 5,260 pairs |
| Coefficient of variation | spread of scores / mean | half wins: 1.0 |
| Transfer | unseen bandit group | 42.25% to 62.25% |
pythonimport math import torch.nn.functional as F def rpo_loss(pw, pl, rw, rl, n_tok_w, beta=0.1, alpha=1.0): # pw, pl: policy log-probs summed over AGENT tokens of winner / loser, shape (B,) # rw, rl: the same from the frozen reference dpo = -F.logsigmoid(beta * ((pw - rw) - (pl - rl))) sft = -pw / n_tok_w # per-token NLL of the winner return (dpo + alpha * sft).mean() def ucb_pick(s, n): # s, n: lists, one per task group N = sum(n) return max(range(len(s)), key=lambda k: s[k] / n[k] + (2 * math.log(N) / n[k]) ** .5)
| DPO for alignment | DPO for curiosity (Paprika) | |
|---|---|---|
| What yw is | the reply a person preferred | the game won in the fewest turns |
| Who labels | a human | a task score, checked by a judge |
| Where diversity comes from | the KL leash, as a guard | Min-p sampling at temperature 1.5 |
| Known failure | fluent but wrong; judge length bias | no gain with many arms; needs a good base model |
The DPO authors ask how DPO generalizes out of distribution, whether its late dip in dialogue is reward over-optimization, and how it scales past 6B. The Paprika authors expect online RL to beat offline DPO, and want models that generate their own tasks.
Credit: Session 6 of Georgia Tech CS 8803, LLM seminar. Papers: Direct Preference Optimization (Rafailov et al., NeurIPS 2023, arXiv 2305.18290) and Training a Generally Curious Agent (Tajwar et al., arXiv 2502.17543). The toy replies, bandits and all made-up numbers are ours.
Teach it back: open Present or Teach and explain why Z cancels and what the pair weight does. Then go back to the five replies and predict where DPO lands before you press Train.