06 · How LLMs work

Broad intuition · Study map 26 of 85

Preferences, rewards, and alignment

Suggested preparation: LoRA: learn a small correction

Picture it

Demonstrations teach what a good answer looks like; preferences teach which of two answers is better. RLHF can optimize a learned reward. DPO uses preference pairs directly to change relative response probabilities. Both inherit weaknesses in their feedback.

What to understand

  • Reward models, reference policies, PPO, DPO, and verifiable rewards
  • Reward hacking, distribution shift, safety evaluation

Follow the references

  1. 1 · Paper

    Rafailov et al. · Direct Preference Optimization ↗

    Read the problem setup and contrast its preference loss with the RLHF pipeline.

  2. 2 · Course

    Hugging Face · Deep reinforcement learning course ↗

    Review policy and reward before connecting reinforcement learning to language generation.

You understand it when…

Why can a model improve a reward score while becoming less useful to a person?

This is a study map. Follow the reference for the full explanation; use the question to test your mental model. Browse the reference shelf.