Mid-level interview questionAsked at Mistral AI · interview write-up
Compare RLHF with a reward model to DPO.
Model answer
Both learn from preference pairs, a chosen and a rejected answer. RLHF trains a reward model on them, then optimises the policy against it with PPO, held near a reference model: powerful, but several models and a touchy RL loop.
Scroll sideways to see the whole diagram
RLHF: fit a reward model to human preferences, then optimise the policy against it with reinforcement learning.
Text version
- RLHF: fit a reward model to human preferences, then optimise the policy against it with reinforcement learning.
- DPO: one supervised-style loss on the same pairs. No reward model, no sampling loop, far fewer moving parts.
Ouyang et al. (2022), Training language models to follow instructions with human feedback; Rafailov et al. (2023), Direct Preference Optimization.
DPO drops the reward model and the RL: one loss on the pairs raises the chosen answer's probability relative to the reference. Simpler and steadier.
Practise the rest
20 Fine-tuning & alignment questions, 492 in all, each with a model answer. Free.
More from Mistral AI interview questions.
More Fine-tuning & alignment interview questions
- Prompting, RAG or fine-tuning: how do you choose?
- What is LoRA, and why is it so much cheaper than full fine-tuning?
- You're handed fine-tuning code whose loss behaves oddly. What do you check?
- Debug a GRPO training loop. What is the probability ratio, and what goes wrong with it?
- Design a platform for fine-tuning LLMs on AWS, covering distributed training and security between tenants.
- How do you detect and prevent reward hacking during LLM post-training?