Derive the DPO loss from the KL-regularised RL objective
HardConcept30 minRERSMLEPro outline
The question
Start from the objective that maximises expected reward minus beta times the KL divergence to a reference policy. Derive the DPO loss step by step and say what assumptions you used.
What the interviewer is looking for
- Writes the closed form optimal policy as the reference times exp(reward over beta), normalised
- Inverts it to express reward through the log ratio of policy and reference
- Shows the partition function cancels in the Bradley-Terry preference model
- Ends with the logistic loss on the difference of scaled log ratios
- States what beta controls
Your answer
Saved in this browser only. Nobody else sees it.
Why this question
Written by BlogLLM in the style of a publicly reported DeepSeek question type: second hand list of written test topics: implement full multi-head attention by hand, derive the DPO objective, explain MoE communication cost and load imbalance.
Reported in: keepkeen.github.io
Practice question written by BlogLLM based on publicly reported interview formats. Not an official DeepSeek question.