Alignment: RLHF & DPO

Step 10 of 13 in Generative AI · Concept · Hard

Collect human preferences between answers, train a reward model, and optimize the LLM toward it (RLHF with PPO), or optimize directly on preferences (DPO).

Build it

  1. DPO on a tiny model

    Implement the DPO loss and train a small model on a preference dataset.

    Done when: Win rate vs the base model reported on held-out prompts.

Case study: InstructGPT (2022)

  • A 1.3B RLHF model was preferred over the 175B base GPT-3.
  • Labeller instructions shaped what 'helpful' meant.
  • The recipe behind ChatGPT.

Read the case study

Resources

Earn this star

On the map, you log what you built. Finish the step and its star lights.

Open this step on the map