Re:RLHF a LLM in <50 lines of Python
by patelajay285 on Sunday February 11, 2024 @11:00AM
(#39335871)
Yep, DPO is not technically “RL” and implicitly uses the LLM itself as a reward model, but training with DPO is far more stable for that reason.
[ Parent
| on HN ]
DPO is as close to RL as RLHF. The latter also uses the LLM as a reward model.
I'm not a fan of the RL/SL dichotomy, because the line gets so foggy. If you squint, every loss is a negative reward, and every policy improvement a supervised target.
Still, what the code does isn't what is described in the paper that the page links to.
Re:RLHF a LLM in <50 lines of Python
by nextaccountic on Sunday February 11, 2024 @11:40AM
(#39336168)
> I'm not a fan of the RL/SL dichotomy, because the line gets so foggy. If you squint, every loss is a negative reward, and every policy improvement a supervised target.
Isn't this just because reinforcement learning and supervised learning are both optimization problems?
In part, yes! But also because what used to define it was the human-curated datasets: SL contained input/output pairs, while RL contained episodes with sporadic rewards.
Nowadays, many datasets have different forms or are synthetic. DPO uses datasets with both positive and negative examples (instead of just a target output as with traditional SL); RLHF uses synthetic rewards.
Re:RLHF a LLM in <50 lines of Python
by patelajay285 on Sunday February 11, 2024 @11:16AM
(#39336009)
I tend to agree @espadrine, it's semantics for the most part