Skip to content

Commit 2c9ac28

Browse files
author
kylening
committed
Publish DPO implicit KL derivation with handwritten notes
1 parent 4500a26 commit 2c9ac28

8 files changed

Lines changed: 701 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
从自回归序列分布和概率树出发,梳理 SFT、RL、On-Policy Distillation 的训练对象、更新信号,以及它们在泛化与灾难性遗忘上的差异。
1616

17+
- [DPO 为什么只做偏好分类,却“自带” KL 约束?](https://kaining-never-stop.github.io/llm-learning-notes/post-training/dpo-implicit-kl/)
18+
19+
从一次手推过程出发,完整推导 KL-Regularized RL、最优策略、同一 Prompt 下共享的 $Z(x)$,以及 DPO Loss 中隐含的 KL 结构。文章附有三页原始手稿。
20+
1721
## 获取笔记
1822

1923
- [下载全部笔记(ZIP)](https://github.com/kaining-never-stop/llm-learning-notes/archive/refs/heads/main.zip)
694 KB
Loading
708 KB
Loading
741 KB
Loading

docs/download.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ git pull
2828
- [查看 GitHub 中的 Markdown 文件](https://github.com/kaining-never-stop/llm-learning-notes/blob/main/docs/post-training/distributional-view.md)
2929
- [打开 Markdown 原文](https://raw.githubusercontent.com/kaining-never-stop/llm-learning-notes/main/docs/post-training/distributional-view.md)
3030

31+
### DPO 为什么只做偏好分类,却“自带” KL 约束?
32+
33+
- [在线阅读](post-training/dpo-implicit-kl.md)
34+
- [查看 GitHub 中的 Markdown 文件](https://github.com/kaining-never-stop/llm-learning-notes/blob/main/docs/post-training/dpo-implicit-kl.md)
35+
- [打开 Markdown 原文](https://raw.githubusercontent.com/kaining-never-stop/llm-learning-notes/main/docs/post-training/dpo-implicit-kl.md)
36+
3137
打开原文后,可以使用浏览器的“保存页面”功能保存为 `.md` 文件。

docs/index.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,25 @@
1515

1616
[阅读文章](post-training/distributional-view.md){ .md-button .md-button--primary }
1717

18+
### DPO 为什么只做偏好分类,却“自带” KL 约束?
19+
20+
这篇来自一次手推过程中产生的问题:DPO 看起来只是在拟合 Chosen 与 Rejected 的偏好关系,为什么 Loss 中却自然出现了当前策略与 Reference Policy 的概率比?
21+
22+
文章从 KL-Regularized Reward Maximization 出发,依次推导:
23+
24+
- KL 约束下最优策略的解析形式;
25+
- 为什么同一 Prompt 下的回答共享同一个 $Z(x)$;
26+
- $Z(x)$ 如何在 Bradley–Terry Preference Model 中抵消;
27+
- DPO Loss 为什么继承了原始 RLHF 目标的 KL 结构。
28+
29+
文中同时附有三页原始手稿。
30+
31+
[阅读文章](post-training/dpo-implicit-kl.md){ .md-button .md-button--primary }
32+
1833
## 获取原文
1934

2035
- [下载全部笔记(ZIP)](https://github.com/kaining-never-stop/llm-learning-notes/archive/refs/heads/main.zip)
2136
- [查看 GitHub 仓库](https://github.com/kaining-never-stop/llm-learning-notes)
22-
- [下载本文 Markdown 原文](https://raw.githubusercontent.com/kaining-never-stop/llm-learning-notes/main/docs/post-training/distributional-view.md)
37+
- [查看全部 Markdown 原文](https://github.com/kaining-never-stop/llm-learning-notes/tree/main/docs)
2338

2439
更多下载方式见[获取笔记](download.md)

0 commit comments

Comments
 (0)