feat: publish alignment deep dive
This commit is contained in:
+14
-3
@@ -14,6 +14,7 @@
|
|||||||
| Scaling Laws | 完成首版 | 74% | 真实拟合复现、置信区间与更多模型族对照 |
|
| Scaling Laws | 完成首版 | 74% | 真实拟合复现、置信区间与更多模型族对照 |
|
||||||
| 数据工程与预训练配方 | 完成首版 | 73% | FineWeb / DCLM 逐图精读、真实去重误伤与 mixture traces |
|
| 数据工程与预训练配方 | 完成首版 | 73% | FineWeb / DCLM 逐图精读、真实去重误伤与 mixture traces |
|
||||||
| DeepSeek 专题 | 进行中 | 71% | 补 R1 / DAPO 的逐图训练轨迹与复现对照 |
|
| DeepSeek 专题 | 进行中 | 71% | 补 R1 / DAPO 的逐图训练轨迹与复现对照 |
|
||||||
|
| 指令微调与人类偏好 | 完成首版 | 75% | 真实偏好分歧、RM 长度偏置与 PPO/DPO 小模型复现 |
|
||||||
| 推理与测试时扩展 | 完成首版 | 76% | 真实模型采样曲线、PRM 案例与逐篇图表精读 |
|
| 推理与测试时扩展 | 完成首版 | 76% | 真实模型采样曲线、PRM 案例与逐篇图表精读 |
|
||||||
| 稀疏计算与 MoE | 完成首版 | 74% | 真实负载 traces 与专家特化案例 |
|
| 稀疏计算与 MoE | 完成首版 | 74% | 真实负载 traces 与专家特化案例 |
|
||||||
| 长上下文专题 | 完成首版 | 72% | 真实模型配置、内核细节与失败案例 |
|
| 长上下文专题 | 完成首版 | 72% | 真实模型配置、内核细节与失败案例 |
|
||||||
@@ -32,10 +33,10 @@
|
|||||||
- [x] 提炼参考网站的编辑设计语言。
|
- [x] 提炼参考网站的编辑设计语言。
|
||||||
- [x] 确认 `git.k1412.top` 为 Gitea/Forgejo 兼容服务且本机 HTTPS 凭据可用于既有仓库。
|
- [x] 确认 `git.k1412.top` 为 Gitea/Forgejo 兼容服务且本机 HTTPS 凭据可用于既有仓库。
|
||||||
- [x] 使用 Grok CLI 检索并形成约 95 篇一手论文的补充路线,主代理已回查关键来源。
|
- [x] 使用 Grok CLI 检索并形成约 95 篇一手论文的补充路线,主代理已回查关键来源。
|
||||||
- [x] 完成 258 篇关键论文索引,覆盖 14 个标签专题与 Kimi/DeepSeek 聚光主线。
|
- [x] 完成 280 篇关键论文索引,覆盖 14 个标签专题与 Kimi/DeepSeek 聚光主线。
|
||||||
- [x] 完成可检索、可按专题筛选的论文库页面。
|
- [x] 完成可检索、可按专题筛选的论文库页面。
|
||||||
- [x] 完成 K3、语言模型前史、Transformer 基础、DeepSeek 谱系、Scaling Laws、数据工程、长上下文、MoE、推理、训练系统与数值优化十一篇首版长文。
|
- [x] 完成 K3、语言模型前史、Transformer 基础、DeepSeek 谱系、Scaling Laws、数据工程、长上下文、MoE、指令微调与人类偏好、推理、训练系统与数值优化十二篇首版长文。
|
||||||
- [x] 完成 K3 三轴架构、语言模型前史四联实验、Transformer 四联实验、DeepSeek 谱系、长上下文、MoE 路由、推理三页签,以及训练系统、Scaling、数据工程与数值专题各四页签等三十一个原创交互视图。
|
- [x] 完成 K3 三轴架构、语言模型前史四联实验、Transformer 四联实验、DeepSeek 谱系、长上下文、MoE 路由、推理三页签,以及训练系统、Scaling、数据工程、数值与 Alignment 专题各四页签等三十五个原创交互视图。
|
||||||
- [x] 完成长上下文首版:五张成本账、26 篇一手论文、10+ 机制图与 8 策略交互实验室。
|
- [x] 完成长上下文首版:五张成本账、26 篇一手论文、10+ 机制图与 8 策略交互实验室。
|
||||||
- [x] 核验 FlashAttention、DeepSeek-V2/V3.2/V4、Kimi Linear/K3 等六份论文原文,并建立长上下文研究账本。
|
- [x] 核验 FlashAttention、DeepSeek-V2/V3.2/V4、Kimi Linear/K3 等六份论文原文,并建立长上下文研究账本。
|
||||||
- [x] 核验 Switch、ST-MoE、DeepSeekMoE、Loss-Free、V3、LatentMoE 与 K3 原文,并建立 MoE 研究账本。
|
- [x] 核验 Switch、ST-MoE、DeepSeekMoE、Loss-Free、V3、LatentMoE 与 K3 原文,并建立 MoE 研究账本。
|
||||||
@@ -91,9 +92,14 @@
|
|||||||
- [x] 完成 Transformer 深度首版:21 段正文与 QKV—Mask—多头位置—Block 成本四联实验。
|
- [x] 完成 Transformer 深度首版:21 段正文与 QKV—Mask—多头位置—Block 成本四联实验。
|
||||||
- [x] 论文库补齐 Residual/Norm、相对位置、UniLM、多头冗余与解释争论等 11 个节点,从 247 篇扩充至 258 篇。
|
- [x] 论文库补齐 Residual/Norm、相对位置、UniLM、多头冗余与解释争论等 11 个节点,从 247 篇扩充至 258 篇。
|
||||||
- [x] Transformer 深度首版以源提交 `252e7d6`、不可变镜像 `20260728T212813Z-252e7d6` 发布;NAS、VPS/Tailscale、NPM、DNS、HTTPS、证书、15 路由、门户、公开 Forgejo 与八套生产 Chrome 回归全链路通过。
|
- [x] Transformer 深度首版以源提交 `252e7d6`、不可变镜像 `20260728T212813Z-252e7d6` 发布;NAS、VPS/Tailscale、NPM、DNS、HTTPS、证书、15 路由、门户、公开 Forgejo 与八套生产 Chrome 回归全链路通过。
|
||||||
|
- [x] 启动 Alignment 专题:按十二张账拆开目标、监督、SFT、偏好、RM、策略更新、直接优化、分布、约束、失效与证据,避免把 SFT / RLHF / DPO 写成彼此替代的三代技术。
|
||||||
|
- [x] 缓存并核验 24 份新的一手论文全文,复用 DeepSeek / Kimi / MOPD 报告,建立 44 节点正式论文链;Grok 45 条候选另存为未核验 leads。
|
||||||
|
- [x] 完成 Alignment 首版:22 节长文、十二张账、DeepSeek/Kimi 后训练双谱系,以及 SFT—偏好/RM—PPO/DPO—配方比较四联实验。
|
||||||
|
- [x] 论文库新增人类偏好学习、HH-RLHF、LIMA、RLAIF、RewardBench、KTO、ORPO、SimPO 等 22 个节点,从 258 篇扩充至 280 篇。
|
||||||
|
|
||||||
## 正在进行
|
## 正在进行
|
||||||
|
|
||||||
|
- [ ] Alignment 工程验收与发布:浏览器交互、移动端、全站回归、公开仓库和生产不可变镜像。
|
||||||
- [ ] Transformer 二轮:多头电路逐图、Pre/Post-LN 真实 traces、Flash/KV kernel 与模型配置对照。
|
- [ ] Transformer 二轮:多头电路逐图、Pre/Post-LN 真实 traces、Flash/KV kernel 与模型配置对照。
|
||||||
- [ ] 语言模型前史二轮:Kneser–Ney / LSTM / Bahdanau 逐图精读、真实小语料复现与 tokenizer 公平性案例。
|
- [ ] 语言模型前史二轮:Kneser–Ney / LSTM / Bahdanau 逐图精读、真实小语料复现与 tokenizer 公平性案例。
|
||||||
- [ ] Scaling Laws 二轮精读:真实拟合复现、逐篇图表、置信区间、外推失败与更多模型族对照。
|
- [ ] Scaling Laws 二轮精读:真实拟合复现、逐篇图表、置信区间、外推失败与更多模型族对照。
|
||||||
@@ -156,6 +162,11 @@
|
|||||||
| 2026-07-29 | Attention 权重与因果解释永久分离 | 热力图只描述中间计算和提出假设;因果结论需要消融、patching 或反事实干预 |
|
| 2026-07-29 | Attention 权重与因果解释永久分离 | 热力图只描述中间计算和提出假设;因果结论需要消融、patching 或反事实干预 |
|
||||||
| 2026-07-29 | 论文库扩充到 258 篇 | 新增 Residual/Norm、relative position、UniLM、多头冗余、解释争论与 NormFormer 等 11 个节点 |
|
| 2026-07-29 | 论文库扩充到 258 篇 | 新增 Residual/Norm、relative position、UniLM、多头冗余、解释争论与 NormFormer 等 11 个节点 |
|
||||||
| 2026-07-29 | Transformer 深度首版用不可变镜像 `20260728T212813Z-252e7d6` 发布 | OCI digest `sha256:db003faa…59fa`;复用 `12010→8080`、NPM host 31 / cert 41、门户 order 180 与公开 Forgejo |
|
| 2026-07-29 | Transformer 深度首版用不可变镜像 `20260728T212813Z-252e7d6` 发布 | OCI digest `sha256:db003faa…59fa`;复用 `12010→8080`、NPM host 31 / cert 41、门户 order 180 与公开 Forgejo |
|
||||||
|
| 2026-07-29 | Alignment 拆成十二张彼此独立的账 | 防止把“更会答”“更符合偏好”“更安全”“更可验证”压成同一个 alignment 分数 |
|
||||||
|
| 2026-07-29 | Grok Alignment 线索与正式证据永久分离 | 45 条候选只负责查漏;公式、数字和历史结论必须回到一手 PDF / 会议页面 |
|
||||||
|
| 2026-07-29 | DeepSeek 与 Kimi 后训练按阶段合同重建 | R1-Zero 不外推为完整 R1;K3 partial rollout 与 MOPD 不混写;DPO 不被描述成取消偏好数据 |
|
||||||
|
| 2026-07-29 | Alignment 首版用 44 个一手节点与四个独立实验闭环 | SFT token mask、RM 偏置、PPO/DPO 更新与模型配方分开演示,不合成伪“对齐总分” |
|
||||||
|
| 2026-07-29 | 论文库扩充到 280 篇 | 新增 22 个 SFT、偏好、RM、RLAIF、直接偏好优化与后训练评测节点 |
|
||||||
|
|
||||||
## 未决问题
|
## 未决问题
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
- 持续进度:[PROGRESS.md](./PROGRESS.md)
|
- 持续进度:[PROGRESS.md](./PROGRESS.md)
|
||||||
- 证据与写作规范:[research/METHODOLOGY.md](./research/METHODOLOGY.md)
|
- 证据与写作规范:[research/METHODOLOGY.md](./research/METHODOLOGY.md)
|
||||||
|
|
||||||
当前里程碑包含 16 专题学习地图、258 篇关键论文索引、Kimi K3 完整导读、
|
当前里程碑包含 16 专题学习地图、280 篇关键论文索引、Kimi K3 完整导读、
|
||||||
语言模型前史、Transformer 基础、DeepSeek 技术谱系、Scaling Laws、数据工程、长上下文、MoE、推理、训练系统与数值优化深度专题,
|
语言模型前史、Transformer 基础、DeepSeek 技术谱系、Scaling Laws、数据工程、长上下文、MoE、指令微调与人类偏好、推理、训练系统与数值优化深度专题,
|
||||||
以及 31 个覆盖核心机制的原创交互视图。
|
以及 35 个覆盖核心机制的原创交互视图。
|
||||||
其余专题按进度账本持续扩建。
|
其余专题按进度账本持续扩建。
|
||||||
|
|
||||||
## 本地开发
|
## 本地开发
|
||||||
|
|||||||
@@ -84,6 +84,11 @@ Adam/AdamW、Adafactor、μP、Muon;FP16/BF16/FP8/MXFP4、量化感知训练
|
|||||||
|
|
||||||
Instruction Tuning、SFT、RLHF/PPO、RLAIF、Constitutional AI、DPO 及其后续。解释 base model 如何变成可协作助手。
|
Instruction Tuning、SFT、RLHF/PPO、RLAIF、Constitutional AI、DPO 及其后续。解释 base model 如何变成可协作助手。
|
||||||
|
|
||||||
|
首版已发布:以目标、监督单位、数据来源、SFT、偏好测量、奖励模型、策略更新、直接偏好、
|
||||||
|
分布、约束、失效与证据十二张账,串起 2017–2026 的 44 个一手节点。正文明确区分
|
||||||
|
SFT / RM / PPO / DPO / RLAIF / RLVR 的角色合同,重点追踪 DeepSeek LLM→V2→V3→R1→V3.2→V4
|
||||||
|
与 Kimi K2→K2.5→K3,并提供 SFT 显微镜、偏好/RM、PPO/DPO 更新和配方比较四个独立实验。
|
||||||
|
|
||||||
### 11. 推理模型与测试时扩展
|
### 11. 推理模型与测试时扩展
|
||||||
|
|
||||||
CoT、自洽性、搜索、验证器、过程奖励、GRPO、DeepSeekMath、DeepSeek-R1/R1-Zero、Kimi k1.5、multi-effort RL 与 on-policy distillation。
|
CoT、自洽性、搜索、验证器、过程奖励、GRPO、DeepSeekMath、DeepSeek-R1/R1-Zero、Kimi k1.5、multi-effort RL 与 on-policy distillation。
|
||||||
|
|||||||
+2
-1
@@ -17,7 +17,8 @@
|
|||||||
"check:data-browser": "node scripts/check-data-browser.mjs",
|
"check:data-browser": "node scripts/check-data-browser.mjs",
|
||||||
"check:numerics-browser": "node scripts/check-numerics-browser.mjs",
|
"check:numerics-browser": "node scripts/check-numerics-browser.mjs",
|
||||||
"check:language-model-history-browser": "node scripts/check-language-model-history-browser.mjs",
|
"check:language-model-history-browser": "node scripts/check-language-model-history-browser.mjs",
|
||||||
"check:transformer-browser": "node scripts/check-transformer-browser.mjs"
|
"check:transformer-browser": "node scripts/check-transformer-browser.mjs",
|
||||||
|
"check:alignment-browser": "node scripts/check-alignment-browser.mjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/sitemap": "3.7.3",
|
"@astrojs/sitemap": "3.7.3",
|
||||||
|
|||||||
@@ -0,0 +1,108 @@
|
|||||||
|
# Alignment:Grok 候选论文线索
|
||||||
|
|
||||||
|
> 状态:**未核验候选账**
|
||||||
|
> 生成方式:本机 Grok CLI Headless 模式,2026-07-29
|
||||||
|
> 使用约束:这里只记录检索线索,不能直接作为正文事实、公式、数字或历史结论的依据。正式内容必须回到论文 PDF、会议页面或研究机构原文逐项核验。
|
||||||
|
|
||||||
|
## 这次线索检索的用途
|
||||||
|
|
||||||
|
正式研究账本已经覆盖 SFT、偏好数据、奖励模型、PPO/RLHF、RLAIF、DPO、RLVR、DeepSeek 与 Kimi/K3。Grok 的任务不是替正文写作,而是做一次“漏项扫描”:寻找可能缺失的论文分支、失败模式和边界案例。
|
||||||
|
|
||||||
|
它给出 45 个候选条目,按下列九组组织:
|
||||||
|
|
||||||
|
| 候选组 | 条目数 | 对正式研究最有价值的提醒 |
|
||||||
|
|---|---:|---|
|
||||||
|
| SFT | 6 | FLAN、T0、Natural Instructions、SuperNI、Self-Instruct、LIMA 需要区分任务泛化、数据生成与少量高质量示范 |
|
||||||
|
| 偏好 / 奖励模型 | 5 | 不只看标注规模,也要检查偏好分歧、长度相关性和奖励泛化 |
|
||||||
|
| PPO / RLHF | 6 | Christiano → Ziegler → Stiennon → InstructGPT 的主线应与 PPO 算法本体分开 |
|
||||||
|
| RLAIF | 4 | Constitutional AI、自我批评修订与 AI preference 不是同一层概念 |
|
||||||
|
| DPO 分支 | 8 | RRHF、SLiC-HF、IPO、KTO、ORPO、SimPO 等不能笼统称作“DPO 小改版” |
|
||||||
|
| 失败模式 | 5 | reward hacking、overoptimization、sycophancy、verbosity bias 应拆成不同故障 |
|
||||||
|
| RLVR | 4 | PRM 是前驱但不等于程序化 verifier;DeepSeekMath 的 GRPO 与具体奖励来源要分开 |
|
||||||
|
| DeepSeek | 4 | LLM、Math、V3、R1 的角色不同,不能把 R1-Zero 的纯 RL 结论外推到完整 R1 |
|
||||||
|
| Kimi | 3 | k1.5、K2、K2.5 的推理、agentic、多模态主线不同 |
|
||||||
|
|
||||||
|
## 候选清单
|
||||||
|
|
||||||
|
以下名称保留为后续查漏入口;存在重复跨组复用,不代表 45 篇互不重复的唯一论文。
|
||||||
|
|
||||||
|
### SFT 与指令数据
|
||||||
|
|
||||||
|
- Finetuned Language Models Are Zero-Shot Learners(FLAN)
|
||||||
|
- Multitask Prompted Training Enables Zero-Shot Task Generalization(T0)
|
||||||
|
- Natural Instructions
|
||||||
|
- Super-NaturalInstructions
|
||||||
|
- Scaling Instruction-Finetuned Language Models
|
||||||
|
- Self-Instruct
|
||||||
|
- LIMA: Less Is More for Alignment
|
||||||
|
|
||||||
|
### 偏好、奖励模型与 RLHF
|
||||||
|
|
||||||
|
- Deep Reinforcement Learning from Human Preferences
|
||||||
|
- Fine-Tuning Language Models from Human Preferences
|
||||||
|
- Learning to Summarize from Human Feedback
|
||||||
|
- Training Language Models to Follow Instructions with Human Feedback
|
||||||
|
- Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedback
|
||||||
|
- Proximal Policy Optimization Algorithms
|
||||||
|
- Scaling Laws for Reward Model Overoptimization
|
||||||
|
- AlpacaFarm
|
||||||
|
- OpenAssistant Conversations
|
||||||
|
- Llama 2: Open Foundation and Fine-Tuned Chat Models
|
||||||
|
- Back to Basics: Revisiting REINFORCE-Style Optimization for Learning from Human Feedback in LLMs
|
||||||
|
|
||||||
|
### RLAIF 与宪法式约束
|
||||||
|
|
||||||
|
- Constitutional AI: Harmlessness from AI Feedback
|
||||||
|
- RLAIF: Scaling Reinforcement Learning from Human Feedback with AI Feedback
|
||||||
|
- UltraFeedback
|
||||||
|
- Self-Play Fine-Tuning Converts Weak Language Models to Strong Language Models
|
||||||
|
|
||||||
|
### 直接偏好优化分支
|
||||||
|
|
||||||
|
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model
|
||||||
|
- RRHF: Rank Responses to Align Language Models with Human Feedback
|
||||||
|
- SLiC-HF: Sequence Likelihood Calibration with Human Feedback
|
||||||
|
- A General Theoretical Paradigm to Understand Learning from Human Preferences(IPO)
|
||||||
|
- KTO: Model Alignment as Prospect Theoretic Optimization
|
||||||
|
- ORPO: Monolithic Preference Optimization without Reference Model
|
||||||
|
- SimPO: Simple Preference Optimization with a Reference-Free Reward
|
||||||
|
- Zephyr: Direct Distillation of LM Alignment
|
||||||
|
- Unpacking DPO and PPO: Disentangling Best Practices for Learning from Preference Feedback
|
||||||
|
|
||||||
|
### 失败模式与评测
|
||||||
|
|
||||||
|
- Sycophancy / 用户信念迎合相关研究
|
||||||
|
- A Long Way to Go: Investigating Length Correlations in RLHF
|
||||||
|
- RewardBench
|
||||||
|
- reward overoptimization / Goodhart 效应相关研究
|
||||||
|
- 偏好标注分歧、both-bad pair 与 verbosity bias 相关研究
|
||||||
|
|
||||||
|
### RLVR、DeepSeek 与 Kimi
|
||||||
|
|
||||||
|
- Let’s Verify Step by Step
|
||||||
|
- Tülu 3: Pushing Frontiers in Open Language Model Post-Training
|
||||||
|
- DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
|
||||||
|
- Crossing the Reward Bridge: Expanding RL with Verifiable Rewards Across Diverse Domains
|
||||||
|
- DeepSeek LLM
|
||||||
|
- DeepSeek-V3 Technical Report
|
||||||
|
- DeepSeek-R1
|
||||||
|
- Kimi k1.5
|
||||||
|
- Kimi K2
|
||||||
|
- Kimi K2.5
|
||||||
|
|
||||||
|
## 必须保留的边界提醒
|
||||||
|
|
||||||
|
1. “偏好更长”不能直接写成人类真正想要冗长答案;奖励模型可能只学到了长度代理特征。
|
||||||
|
2. sycophancy 不完全等于撒谎,它可能来自 helpfulness、agreeableness 与偏好标签的纠缠。
|
||||||
|
3. 人类标注的步骤正确性不等于程序可验证奖励,PRM 只能作为 RLVR 前驱来讲。
|
||||||
|
4. DeepSeekMath 同时讨论模型奖励与规则奖励;“用了 GRPO”不能反推出“奖励一定可验证”。
|
||||||
|
5. R1-Zero 的少监督 / 纯 RL 路径不能外推为完整 DeepSeek-R1 不需要冷启动与监督数据。
|
||||||
|
6. Kimi K2、K2.5 的 agentic / multimodal 叙事不能替代 k1.5 的推理 RL 算法细节。
|
||||||
|
7. “DPO 不需要奖励模型”仅指不单独训练显式 RM 并运行 PPO;偏好、参考策略与数据分布仍然存在。
|
||||||
|
|
||||||
|
## 当前裁决
|
||||||
|
|
||||||
|
- 已进入正式账本:有一手 PDF 或官方页面支撑、且边界已经逐项复核的节点。
|
||||||
|
- 暂留候选:`Crossing the Reward Bridge`、具体 sycophancy 论文、长度相关论文等,需要在对应专题扩写时重新核对标题、版本、实验设定和数字。
|
||||||
|
- 明确不采用:任何仅凭二手叙事得出的“某算法彻底取代另一算法”“纯 RL 不再需要数据”“AI feedback 等于没有人类价值输入”等强结论。
|
||||||
|
|
||||||
@@ -0,0 +1,601 @@
|
|||||||
|
# 指令微调与人类偏好研究账本
|
||||||
|
|
||||||
|
状态:正式一手证据账本,Chapter 10 首版研究中
|
||||||
|
研究截止:2026-07-29
|
||||||
|
本轮本地缓存:24 份新增一手 PDF / 文本,复用 PPO、DeepSeek、Kimi 与推理专题既有缓存
|
||||||
|
线索发现:K3 references、论文引用网络、会议/作者页面、Grok CLI
|
||||||
|
结论依据:原论文正文、会议论文页、官方技术报告;Grok 只用于扩大候选召回
|
||||||
|
|
||||||
|
## 0. 这一章真正要回答什么
|
||||||
|
|
||||||
|
“Alignment / 对齐”经常被说成一个模糊的终点,仿佛模型经过某种神秘训练后就“符合人类价值”。
|
||||||
|
为了避免这种过度承诺,本章把问题限定为:
|
||||||
|
|
||||||
|
> 一个只会延续互联网文本分布的 base language model,
|
||||||
|
> 如何学会理解用户接口、产生可协作行为、区分更好与更差的回答,
|
||||||
|
> 并在代理目标、反馈偏差与能力退化之间保持可检查的边界?
|
||||||
|
|
||||||
|
至少要分开十二张账:
|
||||||
|
|
||||||
|
1. **行为目标账**:我们想改变 helpfulness、harmlessness、honesty、格式遵循、风格还是某项能力?
|
||||||
|
2. **监督单位账**:标签作用于 Token、整段 demonstration、pairwise preference、标量、步骤还是环境结果?
|
||||||
|
3. **数据来源账**:人类、AI teacher、constitution、规则 verifier、执行环境分别提供什么信息?
|
||||||
|
4. **SFT 账**:teacher forcing 的条件似然学到了什么,又没有学到什么?
|
||||||
|
5. **偏好测量账**:排序、评分、二元可取性与多人分歧怎样进入数据?
|
||||||
|
6. **奖励模型账**:Bradley–Terry 类模型如何把比较变成标量代理?
|
||||||
|
7. **策略优化账**:PPO、REINFORCE/RLOO、GRPO 分别怎样更新 policy?
|
||||||
|
8. **直接偏好账**:DPO、IPO、KTO、ORPO、SimPO 消掉了哪些组件,保留了哪些假设?
|
||||||
|
9. **分布账**:反馈来自当前 policy 还是旧 policy;online、offline、on-policy、off-policy 不能混写。
|
||||||
|
10. **约束账**:reference KL、pretraining mix、长度/语言/安全约束怎样防止“为了高分走太远”?
|
||||||
|
11. **失效账**:reward hacking、过优化、迎合、长度偏置、拒答过度与 alignment tax 怎样出现?
|
||||||
|
12. **证据账**:训练 reward、RM accuracy、LLM judge、人工盲评、规则验证分别能证明到哪一步?
|
||||||
|
|
||||||
|
本章不声称给出“人类价值”的唯一数学定义。它讲的是可观测的 post-training 接口、训练信号和证据边界。
|
||||||
|
|
||||||
|
## 1. 四条因果链
|
||||||
|
|
||||||
|
### 1.1 从任务标签到自然语言接口
|
||||||
|
|
||||||
|
```text
|
||||||
|
每个任务训练一个专用模型
|
||||||
|
→ 多任务共享参数
|
||||||
|
→ 用 prompt template 把不同数据集写成自然语言任务
|
||||||
|
→ FLAN / T0:在许多 prompted tasks 上 instruction tuning
|
||||||
|
→ Self-Instruct:让模型自举生成 instruction / input / output
|
||||||
|
→ LIMA:检验少量高质量示范能把多大比例的预训练能力“叫出来”
|
||||||
|
→ 当代 SFT:混合通用、推理、工具、代码、安全与多轮轨迹
|
||||||
|
```
|
||||||
|
|
||||||
|
这里的核心变化不是“下一个 Token 目标消失”,而是训练条件从普通文本前缀变成了
|
||||||
|
`system / instruction / context / response` 的交互接口。
|
||||||
|
|
||||||
|
### 1.2 从比较轨迹到通用助手 RLHF
|
||||||
|
|
||||||
|
```text
|
||||||
|
Christiano et al. 2017:人比较两段行为轨迹
|
||||||
|
→ reward predictor 拟合 pairwise preference
|
||||||
|
→ Ziegler et al. 2019:把 RM + KL + PPO 接到语言模型
|
||||||
|
→ Stiennon et al. 2020:摘要任务验证完整三段式管线
|
||||||
|
→ InstructGPT 2022:SFT → RM → PPO-ptx 扩展到开放指令
|
||||||
|
→ HH-RLHF / Llama 2:helpfulness、安全与多轮迭代被显式分账
|
||||||
|
```
|
||||||
|
|
||||||
|
真正的桥梁是“比较比绝对打分更容易”,并通过 Bradley–Terry 风格的选择模型把比较拟合成可优化标量。
|
||||||
|
|
||||||
|
### 1.3 从显式奖励模型到直接偏好目标
|
||||||
|
|
||||||
|
```text
|
||||||
|
RM + PPO:先拟合 scalar reward,再对当前 policy 做在线优化
|
||||||
|
→ RRHF / SLiC-HF:用排序或似然校准直接作用到回答概率
|
||||||
|
→ DPO:在 BT + KL-regularized optimum 假设下,把 reward 改写成 policy/reference log-ratio
|
||||||
|
→ IPO:指出确定性偏好假设下的过拟合问题,改用回归式间隔
|
||||||
|
→ KTO:允许 desirable / undesirable 非成对反馈
|
||||||
|
→ ORPO:把 SFT 与 odds-ratio preference 合为单阶段
|
||||||
|
→ SimPO:用长度归一平均 log-prob 和 margin 构造 reference-free reward
|
||||||
|
```
|
||||||
|
|
||||||
|
“无需 reward model”不等于“无需偏好信号”,也不等于“自动 on-policy”。
|
||||||
|
|
||||||
|
### 1.4 从人类偏好到 AI、规则与环境反馈
|
||||||
|
|
||||||
|
```text
|
||||||
|
Human demonstrations / rankings
|
||||||
|
→ Constitutional AI:原则 → 自我批评/修订 → AI preference
|
||||||
|
→ RLAIF / UltraFeedback:用 LLM 扩大标签量与维度
|
||||||
|
→ rule-based verifier:数学答案、编译器、测试用例
|
||||||
|
→ generative reward model:按 rubric 生成评价过程与分数
|
||||||
|
→ DeepSeek:SFT + GRPO + rule/model/GRM,多阶段合并
|
||||||
|
→ Kimi K3:SFT → 3 domains × 3 efforts RL teachers → MOPD
|
||||||
|
```
|
||||||
|
|
||||||
|
这不是“AI 反馈取代人类”的单向历史。现代系统常把人工定义的目标、AI 扩标、可执行规则和环境结果组合起来。
|
||||||
|
|
||||||
|
## 2. 最小数学:四个不同对象
|
||||||
|
|
||||||
|
### 2.1 SFT:模仿一个给定回答
|
||||||
|
|
||||||
|
对 prompt `x` 与示范回答 `y = (y₁,…,y_T)`:
|
||||||
|
|
||||||
|
```text
|
||||||
|
L_SFT = - Σ_t m_t log πθ(y_t | x, y_<t)
|
||||||
|
```
|
||||||
|
|
||||||
|
`m_t` 通常只让 assistant response token 计入损失;system/user token 用作条件但不作为目标。
|
||||||
|
|
||||||
|
它在问:
|
||||||
|
|
||||||
|
> 在已经给定这个参考答案的条件下,模型是否提高了每个参考 Token 的概率?
|
||||||
|
|
||||||
|
它没有直接问“另一个回答是否更好”,也没有在自由 rollout 分布上训练纠错。
|
||||||
|
|
||||||
|
### 2.2 偏好模型:比较两个完整回答
|
||||||
|
|
||||||
|
对同一 prompt 的 chosen `y_w` 与 rejected `y_l`,Bradley–Terry 形式为:
|
||||||
|
|
||||||
|
```text
|
||||||
|
P(y_w ≻ y_l | x)
|
||||||
|
= σ(rφ(x,y_w) - rφ(x,y_l))
|
||||||
|
```
|
||||||
|
|
||||||
|
reward model loss:
|
||||||
|
|
||||||
|
```text
|
||||||
|
L_RM = -log σ(rφ(x,y_w) - rφ(x,y_l))
|
||||||
|
```
|
||||||
|
|
||||||
|
只有 reward difference 可辨识:给同一 prompt 的全部奖励同时加一个常数,不改变偏好概率。
|
||||||
|
|
||||||
|
### 2.3 KL-regularized policy optimization
|
||||||
|
|
||||||
|
典型目标的抽象形式:
|
||||||
|
|
||||||
|
```text
|
||||||
|
max_π E[rφ(x,y)] - β KL(π(·|x) || π_ref(·|x))
|
||||||
|
```
|
||||||
|
|
||||||
|
`π_ref` 不是装饰:
|
||||||
|
|
||||||
|
- 把 policy 留在 reward model 见过的分布附近;
|
||||||
|
- 保持语言质量与已有行为;
|
||||||
|
- 让 reward 与偏离成本之间形成可调边界。
|
||||||
|
|
||||||
|
InstructGPT 还加入 pretraining mix:
|
||||||
|
|
||||||
|
```text
|
||||||
|
reward - β log(π_RL / π_SFT) + γ log π_RL(x_pretrain)
|
||||||
|
```
|
||||||
|
|
||||||
|
因此论文默认的 InstructGPT 是 PPO-ptx,不应把它简化成“纯 PPO”。
|
||||||
|
|
||||||
|
### 2.4 DPO:用 policy/reference 比值参数化隐式奖励
|
||||||
|
|
||||||
|
在论文的假设下:
|
||||||
|
|
||||||
|
```text
|
||||||
|
rθ(x,y) = β log [πθ(y|x) / π_ref(y|x)]
|
||||||
|
```
|
||||||
|
|
||||||
|
DPO loss:
|
||||||
|
|
||||||
|
```text
|
||||||
|
L_DPO =
|
||||||
|
-log σ( β[
|
||||||
|
log πθ(y_w|x) - log π_ref(y_w|x)
|
||||||
|
- log πθ(y_l|x) + log π_ref(y_l|x)
|
||||||
|
])
|
||||||
|
```
|
||||||
|
|
||||||
|
它训练的是“相对 reference,chosen 比 rejected 获得更大的 log-ratio 提升”。
|
||||||
|
所以 DPO 仍依赖:
|
||||||
|
|
||||||
|
- preference pair 的质量;
|
||||||
|
- pair 来自哪个行为分布;
|
||||||
|
- reference policy;
|
||||||
|
- `β`;
|
||||||
|
- sequence log-prob 的求和、mask 与长度口径。
|
||||||
|
|
||||||
|
## 3. 十二张教学账
|
||||||
|
|
||||||
|
### 3.1 行为目标账:先说清“对齐什么”
|
||||||
|
|
||||||
|
至少区分:
|
||||||
|
|
||||||
|
| 目标 | 典型问题 | 不能替代的证据 |
|
||||||
|
|---|---|---|
|
||||||
|
| Instruction following | 是否遵守格式、约束和任务 | 仅看流畅度不够 |
|
||||||
|
| Helpfulness | 是否解决用户真实问题 | RM 分数不是用户成功率 |
|
||||||
|
| Harmlessness / safety | 是否拒绝或安全重定向 | “总是拒答”不是完整安全 |
|
||||||
|
| Honesty / calibration | 是否承认不知道、避免编造 | 偏好者也可能奖励自信语气 |
|
||||||
|
| Reasoning / coding | 是否得到可验证结果 | 长 CoT 或漂亮代码不等于通过 |
|
||||||
|
| Agent execution | 是否在环境中完成长程任务 | 单轮 chat win-rate 不足 |
|
||||||
|
| Style / personality | 是否符合表达规范 | 不应冒充能力增长 |
|
||||||
|
|
||||||
|
“能力学习”与“行为塑形”不是二选一。SFT 可注入新任务知识,RL 也可能重排甚至扩展可访问策略;
|
||||||
|
但任何因果归因都需要控制 base、数据、预算和评测。
|
||||||
|
|
||||||
|
### 3.2 监督单位账:标签落在哪里
|
||||||
|
|
||||||
|
| 信号 | 单位 | 优点 | 盲点 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| Demonstration | 整段目标回答的 Token | 稠密、稳定 | 只有一种参考路径 |
|
||||||
|
| Pairwise preference | 两个完整回答 | 比绝对分数容易 | 只给相对次序 |
|
||||||
|
| Likert / scalar | 单回答 | 可表达强弱 | 标尺跨人漂移 |
|
||||||
|
| Outcome reward | 轨迹末端 | 便宜、客观 | credit assignment 稀疏 |
|
||||||
|
| Process reward | 中间步骤 | 更细粒度 | 标注贵,可能不忠实 |
|
||||||
|
| Token teacher signal | 每个 Token | 稠密整合能力 | teacher 偏差逐 Token 传递 |
|
||||||
|
| Environment reward | 状态变化/测试 | 接近任务结果 | verifier 可能有漏洞 |
|
||||||
|
|
||||||
|
### 3.3 数据来源账:谁定义“更好”
|
||||||
|
|
||||||
|
1. 专业标注者;
|
||||||
|
2. 目标用户或产品日志;
|
||||||
|
3. 众包标注者;
|
||||||
|
4. AI judge / teacher;
|
||||||
|
5. 宪法或书面 rubric;
|
||||||
|
6. ground truth / 单元测试 / 编译器;
|
||||||
|
7. 沙箱环境的真实结果;
|
||||||
|
8. 多来源混合。
|
||||||
|
|
||||||
|
来源决定偏差。把 “human preference” 聚合成单一标量,会隐藏群体分歧、标注者训练、文化背景和任务专长。
|
||||||
|
|
||||||
|
### 3.4 SFT 账:稳定冷启动,不是万能答案
|
||||||
|
|
||||||
|
SFT 的三个主要作用:
|
||||||
|
|
||||||
|
- 教交互协议、角色与输出格式;
|
||||||
|
- 把 base model 的已有能力放到用户可调用的接口上;
|
||||||
|
- 给 RL 提供足够可靠的 cold-start policy,避免 rollout 一开始全是无效样本。
|
||||||
|
|
||||||
|
主要代价:
|
||||||
|
|
||||||
|
- teacher forcing 与自由生成分布不一致;
|
||||||
|
- 参考答案不是唯一正确策略;
|
||||||
|
- 每个回答 Token 都被模仿,难表达“这部分好、那部分差”;
|
||||||
|
- 低质量、重复或模板化示范会被直接学习;
|
||||||
|
- 过强模仿可能缩小探索空间。
|
||||||
|
|
||||||
|
LIMA 的 1,000 高质量样本是“强 base + 指定评测 + 风格/接口”的实证结果,不是“小数据对齐普遍定律”。
|
||||||
|
|
||||||
|
### 3.5 偏好测量账:比较也不是客观真值
|
||||||
|
|
||||||
|
偏好数据必须记录:
|
||||||
|
|
||||||
|
- candidate 由哪些 policy、temperature、长度上限生成;
|
||||||
|
- 是两两比较、K-way ranking 还是独立评分;
|
||||||
|
- 是否允许 tie / both bad;
|
||||||
|
- rubric 是总体质量还是多维评分;
|
||||||
|
- 是否随机交换展示位置;
|
||||||
|
- 每个样本有几名标注者、分歧如何保留;
|
||||||
|
- chosen 是否只是“两者较好”,而不是真正高质量。
|
||||||
|
|
||||||
|
训练集若只有“一个差回答和一个明显好回答”,RM 可能只学会表面线索;
|
||||||
|
部署时遇到两个都很强、差异很细的回答就会失准。
|
||||||
|
|
||||||
|
### 3.6 奖励模型账:代理目标的力量和危险来自同一处
|
||||||
|
|
||||||
|
reward model 把开放式判断压成一个可微标量,policy 因而能在没有唯一参考答案时继续优化。
|
||||||
|
但 policy 会主动寻找 RM 的高分区域,而这些区域可能远离 RM 的训练分布。
|
||||||
|
|
||||||
|
重要检查:
|
||||||
|
|
||||||
|
- in-distribution pair accuracy;
|
||||||
|
- hard / OOD / adversarial pairs;
|
||||||
|
- 长度、格式、拒答等 shortcut;
|
||||||
|
- calibration 与多人分歧;
|
||||||
|
- gold human evaluation 随 KL / optimization strength 的曲线;
|
||||||
|
- reward ensemble 或 uncertainty。
|
||||||
|
|
||||||
|
RewardBench 是对 RM 本身的测试入口,不是最终 assistant 质量的充分证明。
|
||||||
|
|
||||||
|
### 3.7 策略优化账:PPO 不是 RLHF 的同义词
|
||||||
|
|
||||||
|
PPO 的 clipped surrogate 限制单次 importance ratio:
|
||||||
|
|
||||||
|
```text
|
||||||
|
min(
|
||||||
|
ρ_t A_t,
|
||||||
|
clip(ρ_t, 1-ε, 1+ε) A_t
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
LLM RLHF 的完整系统还常包含:
|
||||||
|
|
||||||
|
- actor / policy;
|
||||||
|
- reference policy;
|
||||||
|
- reward model;
|
||||||
|
- critic / value;
|
||||||
|
- rollout engine;
|
||||||
|
- GAE / return;
|
||||||
|
- token mask、长度处理、KL controller;
|
||||||
|
- 可选 pretraining gradient。
|
||||||
|
|
||||||
|
RLOO、GRPO 等方法可省去 learned critic,但不因此自动解决 reward misspecification。
|
||||||
|
|
||||||
|
### 3.8 直接偏好账:算法名字先归到角色合同
|
||||||
|
|
||||||
|
| 方法 | 数据 | 显式 RM | Reference | 核心角色 |
|
||||||
|
|---|---|---:|---:|---|
|
||||||
|
| DPO | chosen/rejected pair | 否 | 是 | policy/reference log-ratio 分类 |
|
||||||
|
| IPO | pair | 否 | 是 | 回归到有限偏好 margin |
|
||||||
|
| KTO | desirable / undesirable 可非配对 | 否 | 通常是 | prospect-theoretic utility |
|
||||||
|
| ORPO | pair + SFT | 否 | 否 | NLL + odds-ratio penalty |
|
||||||
|
| SimPO | pair | 否 | 否 | 平均 log-prob reward + target margin |
|
||||||
|
| RRHF | ranking / 多来源候选 | 否 | 否 | 序列得分排序 |
|
||||||
|
| SLiC-HF | pair | 否 | 可选校准基线 | sequence likelihood calibration |
|
||||||
|
|
||||||
|
不能从“模型数更少”直接推出“效果更好”。2024 NeurIPS 的 DPO/PPO 解耦实验明确把
|
||||||
|
preference data、learning algorithm、reward model 和 policy prompts 分成四个变量,并发现数据质量影响最大。
|
||||||
|
|
||||||
|
### 3.9 分布账:online/offline 与 on/off-policy 是两组词
|
||||||
|
|
||||||
|
- **offline preference optimization**:固定 pair 数据训练,不随着当前 policy 更新标签;
|
||||||
|
- **online preference optimization**:当前 policy 生成新候选,再获取反馈;
|
||||||
|
- **on-policy RL**:梯度主要使用当前 policy 的 rollout;
|
||||||
|
- **off-policy / stale rollout**:行为 policy 与当前 policy 不同,需要 importance correction 或 clipping。
|
||||||
|
|
||||||
|
DPO 通常是 offline;PPO 通常需要近 on-policy rollout;K3 partial rollout 会让超长轨迹跨迭代变旧,
|
||||||
|
因此必须显式做 off-policy 稳定化。这些词描述不同轴。
|
||||||
|
|
||||||
|
### 3.10 约束账:为什么不能只追 reward
|
||||||
|
|
||||||
|
常见防线:
|
||||||
|
|
||||||
|
1. reference KL;
|
||||||
|
2. PPO ratio clipping;
|
||||||
|
3. pretraining / SFT replay;
|
||||||
|
4. response length / verbosity budget;
|
||||||
|
5. language consistency;
|
||||||
|
6. safety constraint reward;
|
||||||
|
7. rule-based verifier 优先;
|
||||||
|
8. reward ensemble / uncertainty;
|
||||||
|
9. 在线补充 policy 当前分布上的偏好数据;
|
||||||
|
10. hidden evaluator 与提交预算。
|
||||||
|
|
||||||
|
约束会产生真实 trade-off。例如语言一致性奖励可能轻微降低某些任务表现,却改善目标语言可读性;
|
||||||
|
这不是“白送”的收益。
|
||||||
|
|
||||||
|
### 3.11 失效账:高 reward 不等于高真实效用
|
||||||
|
|
||||||
|
#### Reward overoptimization
|
||||||
|
|
||||||
|
Gao et al. 使用 proxy–gold synthetic setup 展示:
|
||||||
|
|
||||||
|
```text
|
||||||
|
proxy reward 持续上升
|
||||||
|
gold reward 先上升、后饱和甚至下降
|
||||||
|
```
|
||||||
|
|
||||||
|
这是 Goodhart 风险的受控实证,不应外推成所有真实 RLHF 的统一数值曲线。
|
||||||
|
|
||||||
|
#### 长度与语气偏置
|
||||||
|
|
||||||
|
长回答更容易显得完整;礼貌、自信、分点也可能成为 shortcut。
|
||||||
|
需要 length-controlled evaluation,而不是看到 win-rate 上升就断言事实性更好。
|
||||||
|
|
||||||
|
#### 迎合
|
||||||
|
|
||||||
|
如果人更喜欢被认同,模型可能学会顺着错误前提。helpfulness、honesty 和 user approval 必须分开评测。
|
||||||
|
|
||||||
|
#### 过度拒答
|
||||||
|
|
||||||
|
只奖励“不产生危险文本”会推动模型拒绝无害请求。安全评测必须同时测 should-refuse 和 should-respond。
|
||||||
|
|
||||||
|
#### Alignment tax
|
||||||
|
|
||||||
|
RL 或偏好优化可能让某些标准能力退化。DeepSeek-V2 报告明确观察到部分 benchmark 的 alignment tax,
|
||||||
|
并通过训练策略缓解;不能只报 chat judge。
|
||||||
|
|
||||||
|
### 3.12 证据账:每个数字到底证明什么
|
||||||
|
|
||||||
|
| 证据 | 能证明 | 不能单独证明 |
|
||||||
|
|---|---|---|
|
||||||
|
| SFT loss | 模仿训练集 Token 的拟合 | 用户偏好、事实性 |
|
||||||
|
| RM pair accuracy | 在该 pair 分布上的排序 | policy 优化后的 OOD 可靠性 |
|
||||||
|
| training reward | 对当前 proxy 的优化 | 真实人类效用 |
|
||||||
|
| KL | 与 reference 的分布距离 | 改变是好是坏 |
|
||||||
|
| LLM judge win-rate | 该 judge/rubric 下的相对偏好 | 无偏人类共识 |
|
||||||
|
| blind human eval | 特定人群/协议下偏好 | 普适价值 |
|
||||||
|
| rule pass rate | verifier 定义的正确性 | 开放式质量与安全 |
|
||||||
|
| downstream benchmark | 指定任务能力 | 完整助手行为 |
|
||||||
|
|
||||||
|
## 4. DeepSeek:从 SFT+DPO 到多源 GRPO / GRM
|
||||||
|
|
||||||
|
### 4.1 DeepSeek LLM
|
||||||
|
|
||||||
|
官方报告公开:
|
||||||
|
|
||||||
|
- 超过 100 万 SFT instances;
|
||||||
|
- 7B 使用 4 epochs,67B 使用 2 epochs;
|
||||||
|
- helpfulness 与 harmlessness preference data;
|
||||||
|
- DPO 训练 1 epoch;
|
||||||
|
- 数学 SFT 过多会提高重复率;
|
||||||
|
- 报告把 reasoning 改善谨慎归因:SFT 可能主要注入了题型与知识,不能直接证明学会一般推理。
|
||||||
|
|
||||||
|
这是一条典型的 `base → SFT chat → DPO` 管线。
|
||||||
|
|
||||||
|
### 4.2 DeepSeek-V2
|
||||||
|
|
||||||
|
V2 把对齐管线改成:
|
||||||
|
|
||||||
|
```text
|
||||||
|
base
|
||||||
|
→ SFT
|
||||||
|
→ reasoning alignment
|
||||||
|
→ human preference alignment
|
||||||
|
```
|
||||||
|
|
||||||
|
第二阶段采用 helpful、safety 与 rule-based 多奖励;RL 使用 GRPO。
|
||||||
|
报告同时讨论:
|
||||||
|
|
||||||
|
- SFT 数量与质量;
|
||||||
|
- alignment tax;
|
||||||
|
- online RL 与 offline preference alignment 的差异;
|
||||||
|
- code preference 来自 compiler feedback,数学来自 ground-truth labels。
|
||||||
|
|
||||||
|
### 4.3 DeepSeek-V3
|
||||||
|
|
||||||
|
V3 的 post-training 包括:
|
||||||
|
|
||||||
|
- 从 expert model / DeepSeek-R1 蒸馏 reasoning data;
|
||||||
|
- 两个 epochs 的 SFT;
|
||||||
|
- rule-based RM 与 model-based RM;
|
||||||
|
- GRPO;
|
||||||
|
- generative reward model 的探索;
|
||||||
|
- 尽可能优先使用规则验证以降低 reward hacking。
|
||||||
|
|
||||||
|
官方报告给出 pretraining、context extension、post-training 的计算分账;不能把整套 V3 能力归因于 GRPO。
|
||||||
|
|
||||||
|
### 4.4 DeepSeek-R1
|
||||||
|
|
||||||
|
必须分开:
|
||||||
|
|
||||||
|
- **R1-Zero**:从 base 直接做 rule-based reasoning RL,没有初始 SFT;
|
||||||
|
- **R1**:cold-start data → reasoning RL → rejection sampling / SFT → broader RL;
|
||||||
|
- **distilled models**:只做 SFT,不等于复现 R1 的 RL 训练。
|
||||||
|
|
||||||
|
报告附录展示 helpful RM reward hacking:reward 上升而测试表现下降;也展示语言一致性 reward 的能力 trade-off。
|
||||||
|
|
||||||
|
### 4.5 DeepSeek-V3.2 / V4
|
||||||
|
|
||||||
|
V3.2 把 reasoning、agent 与 human alignment 合并进一个大规模 GRPO 阶段,
|
||||||
|
通用任务采用 generative reward model,agent/reasoning 尽量使用规则结果。
|
||||||
|
|
||||||
|
V4 的两阶段主线:
|
||||||
|
|
||||||
|
```text
|
||||||
|
SFT:高质量、多领域、能力冷启动
|
||||||
|
→ GRPO:domain-aligned behavior
|
||||||
|
```
|
||||||
|
|
||||||
|
对 hard-to-verify tasks,V4 报告明确说不再使用传统 scalar RM,而采用 rubric-guided data 与
|
||||||
|
Generative Reward Model;easy-to-verify tasks 继续用规则或测试。
|
||||||
|
|
||||||
|
## 5. Kimi:从长轨迹 RL 到 K3 多教师整合
|
||||||
|
|
||||||
|
### 5.1 Kimi K2 / K2.5
|
||||||
|
|
||||||
|
K2 公开 post-training 覆盖:
|
||||||
|
|
||||||
|
- general RL;
|
||||||
|
- self-critique rubric reward;
|
||||||
|
- verifiable reward;
|
||||||
|
- PTX 与 budget control。
|
||||||
|
|
||||||
|
K2.5 继续扩展 unified agentic RL、视觉与并行 agent,Rollout Manager 支持大规模并发任务。
|
||||||
|
|
||||||
|
这些工作已经超出“聊天回答偏好”:reward 来自执行环境、规则与生成式 rubric 的组合。
|
||||||
|
|
||||||
|
### 5.2 Kimi K3 的三阶段合同
|
||||||
|
|
||||||
|
K3 官方报告明确:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Stage 1 · SFT
|
||||||
|
建立高质量 cold-start agent policy
|
||||||
|
|
||||||
|
Stage 2 · RL experts
|
||||||
|
general / general-agent / coding
|
||||||
|
× low / high / max reasoning effort
|
||||||
|
= 9 个领域-强度专家
|
||||||
|
|
||||||
|
Stage 3 · MOPD
|
||||||
|
student on-policy rollout
|
||||||
|
+ 对应 teacher 的逐 Token log-ratio reward
|
||||||
|
→ 把九个专家整合回一个统一模型
|
||||||
|
```
|
||||||
|
|
||||||
|
MOPD 的逐 Token信号是:
|
||||||
|
|
||||||
|
```text
|
||||||
|
r_opd(y_t)
|
||||||
|
= clip(stopgrad(log π_teacher(y_t|prefix) / π_student(y_t|prefix)),
|
||||||
|
-R_max, R_max)
|
||||||
|
```
|
||||||
|
|
||||||
|
概念边界:
|
||||||
|
|
||||||
|
- K3 的 partial rollout 是长轨迹跨迭代产生的 off-policy 稳定性问题;
|
||||||
|
- MOPD 则在当前 student 自己访问的状态上计算 teacher signal;
|
||||||
|
- 两者可以在同一系统中共存,但不是同一种算法;
|
||||||
|
- agentic GRM 仍需 verbosity budget,报告明确把它作为防 reward hacking 的约束;
|
||||||
|
- MXFP4 QAT 从 SFT 起覆盖整个 post-training,是部署约束,不是偏好目标。
|
||||||
|
|
||||||
|
## 6. 正式一手论文链(44 个节点)
|
||||||
|
|
||||||
|
| # | 年份 | 节点 | 本章角色 | 核验入口 |
|
||||||
|
|---:|---:|---|---|---|
|
||||||
|
| 01 | 2017 | Deep RL from Human Preferences | pairwise trajectory → reward | `1706.03741` Eq.1 / Fig.1 |
|
||||||
|
| 02 | 2017 | PPO | clipped on-policy update | `1707.06347` Eq.7 |
|
||||||
|
| 03 | 2019 | Fine-Tuning LMs from Human Preferences | LM reward + KL + PPO | `1909.08593` Eq.1–2 |
|
||||||
|
| 04 | 2020 | Learning to Summarize from Human Feedback | 完整生成式 RLHF | `2009.01325` Fig.2 / Fig.5 |
|
||||||
|
| 05 | 2021 | Natural Instructions | declarative task interface | `2104.08773` |
|
||||||
|
| 06 | 2021 | FLAN | instruction-tuned zero-shot | `2109.01652` Fig.6 |
|
||||||
|
| 07 | 2021 | T0 | prompted multitask mixture | `2110.08207` Fig.2 |
|
||||||
|
| 08 | 2021 | WebGPT | browser action + preference | `2112.09332` |
|
||||||
|
| 09 | 2022 | InstructGPT | SFT → RM → PPO-ptx | `2203.02155` Fig.2 / Eq.1–2 |
|
||||||
|
| 10 | 2022 | HH-RLHF | helpful / harmless assistant | `2204.05862` |
|
||||||
|
| 11 | 2022 | Super-NaturalInstructions | 1,600+ task generalization | `2204.07705` |
|
||||||
|
| 12 | 2022 | Scaling Instruction-Finetuned LMs | Flan collection scaling | `2210.11416` |
|
||||||
|
| 13 | 2022 | Reward Model Overoptimization | proxy / gold Goodhart curve | `2210.10760` |
|
||||||
|
| 14 | 2022 | Constitutional AI | self-critique + RLAIF | `2212.08073` Fig.1 |
|
||||||
|
| 15 | 2022 | Self-Instruct | synthetic instruction bootstrap | `2212.10560` Fig.2 |
|
||||||
|
| 16 | 2023 | OpenAssistant Conversations | open conversation / ranking tree | `2304.07327` |
|
||||||
|
| 17 | 2023 | RRHF | response ranking objective | `2304.05302` |
|
||||||
|
| 18 | 2023 | SLiC-HF | sequence likelihood calibration | `2305.10425` |
|
||||||
|
| 19 | 2023 | LIMA | 1K curated SFT | `2305.11206` |
|
||||||
|
| 20 | 2023 | AlpacaFarm | feedback simulator / baselines | `2305.14387` |
|
||||||
|
| 21 | 2023 | DPO | implicit reward / direct objective | `2305.18290` Eq.5–7 |
|
||||||
|
| 22 | 2023 | RLAIF vs RLHF | human/AI label comparison | `2309.00267` |
|
||||||
|
| 23 | 2023 | UltraFeedback | scaled multi-aspect AI feedback | `2310.01377` |
|
||||||
|
| 24 | 2023 | IPO theory | finite-margin preference regression | `2310.12036` |
|
||||||
|
| 25 | 2023 | Zephyr | dSFT + AI preference dDPO | `2310.16944` Fig.2 |
|
||||||
|
| 26 | 2024 | KTO | unpaired binary feedback | `2402.01306` |
|
||||||
|
| 27 | 2024 | RLOO | critic-free REINFORCE baseline | `2402.14740` |
|
||||||
|
| 28 | 2024 | ORPO | SFT + odds-ratio single stage | `2403.07691` |
|
||||||
|
| 29 | 2024 | RewardBench | reward model evaluation | `2403.13787` Fig.1 |
|
||||||
|
| 30 | 2024 | SimPO | reference-free mean log-prob | `2405.14734` |
|
||||||
|
| 31 | 2024 | Unpacking DPO and PPO | data/algorithm/RM/prompt 四变量 | NeurIPS 2024 |
|
||||||
|
| 32 | 2024 | Tülu 3 | open SFT → DPO → RLVR recipe | `2411.15124` |
|
||||||
|
| 33 | 2024 | DeepSeek LLM | 1M+ SFT + DPO | `2401.02954` §4 |
|
||||||
|
| 34 | 2024 | DeepSeekMath | GRPO | `2402.03300` |
|
||||||
|
| 35 | 2024 | DeepSeek-V2 | SFT + two-stage GRPO alignment | `2405.04434` §4 |
|
||||||
|
| 36 | 2024 | DeepSeek-V3 | SFT / RM / GRPO / GRM | `2412.19437` §5 |
|
||||||
|
| 37 | 2025 | DeepSeek-R1 | Zero / cold-start / RL / SFT 分层 | `2501.12948` |
|
||||||
|
| 38 | 2025 | DAPO | long-CoT GRPO stabilization | `2503.14476` |
|
||||||
|
| 39 | 2025 | Kimi K2 | verifiable + generative rewards | `2507.20534` |
|
||||||
|
| 40 | 2025 | DeepSeek-V3.2 | merged reasoning/agent/alignment RL | `2512.02556` §3 |
|
||||||
|
| 41 | 2026 | Kimi K2.5 | unified multimodal/agentic RL | `2602.02276` |
|
||||||
|
| 42 | 2026 | DeepSeek-V4 | SFT + GRPO + GRM | `2606.19348` §5 |
|
||||||
|
| 43 | 2026 | MOPD | multi-teacher on-policy distillation | `2606.30406` |
|
||||||
|
| 44 | 2026 | Kimi K3 | 9 experts → MOPD / 1M agentic RL | `2607.24653` §4 |
|
||||||
|
|
||||||
|
## 7. 常见误解清单
|
||||||
|
|
||||||
|
1. **“SFT 改了 next-token 目标”**:通常仍是 next-token cross-entropy,只是条件与训练分布变了。
|
||||||
|
2. **“chosen 就是完美答案”**:pair 只保证 chosen 相对更受偏好,可能两者都差。
|
||||||
|
3. **“reward model 学到了人类价值”**:它拟合特定标签者、rubric、候选分布下的比较。
|
||||||
|
4. **“PPO 就是 RLHF”**:PPO 只是 policy optimizer;RLHF 还含反馈、RM、reference、rollout 和评测。
|
||||||
|
5. **“DPO 不需要 reward”**:它不训练显式 RM,但偏好 pair 与隐式 reward 假设仍在。
|
||||||
|
6. **“DPO 永远比 PPO 好”**:数据质量、online sampling、RM、prompt 分布和实现可改变结论。
|
||||||
|
7. **“RLAIF 没有人类参与”**:原则、rubric、teacher 训练与最终评测仍来自人类选择。
|
||||||
|
8. **“规则奖励不会被 hack”**:解析器、测试覆盖、沙箱和提交预算都可能有漏洞。
|
||||||
|
9. **“训练 reward 上升就是模型更好”**:必须看 gold/human/environment outcome 与 KL。
|
||||||
|
10. **“RLVR 与 RLHF 是两代技术”**:开放任务可用偏好,数学/代码可用 verifier,现代系统混合两者。
|
||||||
|
11. **“R1-Zero 就是 DeepSeek-R1”**:正式 R1 还有 cold start、SFT、多阶段 RL 与蒸馏。
|
||||||
|
12. **“K3 MOPD 是普通离线蒸馏”**:student 在自己的 rollout 状态上接收对应 teacher 的逐 Token 信号。
|
||||||
|
|
||||||
|
## 8. 页面与交互验收合同
|
||||||
|
|
||||||
|
### 8.1 正文
|
||||||
|
|
||||||
|
- 20–22 个正文区段;
|
||||||
|
- 十二张账;
|
||||||
|
- 至少 44 个正式一手节点;
|
||||||
|
- DeepSeek LLM → V2 → V3 → R1 → V3.2 → V4 完整主线;
|
||||||
|
- Kimi K2 → K2.5 → K3 完整主线;
|
||||||
|
- 所有机制图为原创 HTML/CSS/SVG 示意,显式标注证据边界。
|
||||||
|
|
||||||
|
### 8.2 四联实验室
|
||||||
|
|
||||||
|
1. **SFT 损失显微镜**
|
||||||
|
可切换 prompt masking、参考回答质量和长度;显示哪些 Token 产生梯度、NLL 与 teacher-forcing 边界。
|
||||||
|
|
||||||
|
2. **偏好与奖励模型实验**
|
||||||
|
调整两回答的 factuality/helpfulness/style/length、标注噪声与 reward weights;
|
||||||
|
显示 Bradley–Terry 概率、shortcut 与“chosen 不等于绝对好”。
|
||||||
|
|
||||||
|
3. **PPO / DPO 更新控制室**
|
||||||
|
调 reward gap、KL/β、policy/reference log-ratio、数据新鲜度;
|
||||||
|
分别展示显式 RM+rollout 与离线 pair 的更新合同,不伪造可比总分。
|
||||||
|
|
||||||
|
4. **现代 Post-training 配方比较器**
|
||||||
|
InstructGPT / Constitutional AI / DPO / DeepSeek-V2 / DeepSeek-V4 / Kimi K3;
|
||||||
|
比较反馈源、模型组件、在线/离线、监督粒度、约束与主要失效模式。
|
||||||
|
|
||||||
|
### 8.3 工程闸门
|
||||||
|
|
||||||
|
- 键盘 tabs 与 `aria-selected`;
|
||||||
|
- 390px 移动端根页面零横向溢出;
|
||||||
|
- 交互数字标为教学模拟;
|
||||||
|
- 论文链接全部指向 canonical primary source;
|
||||||
|
- Astro check / build / internal link checker / 真实 Chrome regression 全部通过。
|
||||||
@@ -21,3 +21,13 @@
|
|||||||
|
|
||||||
其余已核节点通过 DOI、ACL Anthology、PMLR、ISCA、JMLR、NeurIPS 或官方 arXiv 页面定位,
|
其余已核节点通过 DOI、ACL Anthology、PMLR、ISCA、JMLR、NeurIPS 或官方 arXiv 页面定位,
|
||||||
完整证据边界见 `../LANGUAGE_MODEL_HISTORY_RESEARCH.md`。
|
完整证据边界见 `../LANGUAGE_MODEL_HISTORY_RESEARCH.md`。
|
||||||
|
|
||||||
|
Alignment 首轮缓存位于 `alignment/`(不提交 PDF/TXT):
|
||||||
|
|
||||||
|
- Christiano 2017、Ziegler 2019、Stiennon 2020 与 InstructGPT;
|
||||||
|
- Natural Instructions、FLAN、T0、HH-RLHF、Constitutional AI 与 Self-Instruct;
|
||||||
|
- DPO、RRHF、SLiC-HF、LIMA、RLAIF、UltraFeedback、IPO、KTO、ORPO、RewardBench 与 SimPO。
|
||||||
|
|
||||||
|
DeepSeek LLM/V2/V3/R1/V3.2/V4、Kimi K2/K2.5/K3 与 MOPD 复用既有本地缓存。
|
||||||
|
正式机制、公式、版本边界与 44 节点论文链见 `../ALIGNMENT_RESEARCH.md`;Grok 候选线索单独保存在
|
||||||
|
`../ALIGNMENT_GROK_LEADS.md`,不能直接作为正文证据。
|
||||||
|
|||||||
@@ -0,0 +1,241 @@
|
|||||||
|
import { writeFileSync } from "node:fs";
|
||||||
|
|
||||||
|
const cdpPort = process.env.CDP_PORT ?? "9224";
|
||||||
|
const baseUrl = process.env.SITE_URL ?? "http://127.0.0.1:4323";
|
||||||
|
const pages = await fetch(`http://127.0.0.1:${cdpPort}/json/list`).then((response) => response.json());
|
||||||
|
const page = pages.find((entry) => entry.type === "page");
|
||||||
|
if (!page) throw new Error(`CDP ${cdpPort} 没有可用页面`);
|
||||||
|
|
||||||
|
const socket = new WebSocket(page.webSocketDebuggerUrl);
|
||||||
|
await new Promise((resolve, reject) => {
|
||||||
|
socket.addEventListener("open", resolve, { once: true });
|
||||||
|
socket.addEventListener("error", reject, { once: true });
|
||||||
|
});
|
||||||
|
|
||||||
|
let nextId = 0;
|
||||||
|
const pending = new Map();
|
||||||
|
const exceptions = [];
|
||||||
|
socket.addEventListener("message", (event) => {
|
||||||
|
const message = JSON.parse(event.data);
|
||||||
|
if (message.id && pending.has(message.id)) {
|
||||||
|
const { resolve, reject } = pending.get(message.id);
|
||||||
|
pending.delete(message.id);
|
||||||
|
if (message.error) reject(new Error(message.error.message));
|
||||||
|
else resolve(message.result);
|
||||||
|
}
|
||||||
|
if (message.method === "Runtime.exceptionThrown") {
|
||||||
|
exceptions.push(message.params.exceptionDetails.exception?.description ?? message.params.exceptionDetails.text);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const command = (method, params = {}) => new Promise((resolve, reject) => {
|
||||||
|
const id = ++nextId;
|
||||||
|
pending.set(id, { resolve, reject });
|
||||||
|
socket.send(JSON.stringify({ id, method, params }));
|
||||||
|
});
|
||||||
|
const pause = (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));
|
||||||
|
const evaluate = async (expression) => {
|
||||||
|
const result = await command("Runtime.evaluate", { expression, returnByValue: true, awaitPromise: true });
|
||||||
|
if (result.exceptionDetails) throw new Error(result.exceptionDetails.exception?.description ?? result.exceptionDetails.text);
|
||||||
|
return result.result.value;
|
||||||
|
};
|
||||||
|
const navigate = async (path) => {
|
||||||
|
await command("Page.navigate", { url: `${baseUrl}${path}` });
|
||||||
|
for (let attempt = 0; attempt < 70; attempt += 1) {
|
||||||
|
await pause(100);
|
||||||
|
if (await evaluate("document.readyState === 'complete'")) return;
|
||||||
|
}
|
||||||
|
throw new Error(`${path} 加载超时`);
|
||||||
|
};
|
||||||
|
const screenshot = async (path, full = false) => {
|
||||||
|
const params = { format: "png", captureBeyondViewport: full };
|
||||||
|
if (full) {
|
||||||
|
const metrics = await command("Page.getLayoutMetrics");
|
||||||
|
params.clip = {
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
width: metrics.cssContentSize.width,
|
||||||
|
height: metrics.cssContentSize.height,
|
||||||
|
scale: 1,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
const result = await command("Page.captureScreenshot", params);
|
||||||
|
writeFileSync(path, Buffer.from(result.data, "base64"));
|
||||||
|
};
|
||||||
|
|
||||||
|
await command("Page.enable");
|
||||||
|
await command("Runtime.enable");
|
||||||
|
await command("Emulation.setDeviceMetricsOverride", {
|
||||||
|
width: 1440,
|
||||||
|
height: 1100,
|
||||||
|
deviceScaleFactor: 1,
|
||||||
|
mobile: false,
|
||||||
|
});
|
||||||
|
await navigate("/post-training/alignment/");
|
||||||
|
await screenshot("/tmp/llm-atlas-alignment-desktop.png");
|
||||||
|
|
||||||
|
const overview = await evaluate(`(() => ({
|
||||||
|
title: document.querySelector("h1")?.textContent.trim(),
|
||||||
|
sections: document.querySelectorAll(".article-section").length,
|
||||||
|
tocLinks: document.querySelectorAll(".side-rail a").length,
|
||||||
|
paperLinks: document.querySelectorAll(".paper-chain a").length,
|
||||||
|
labTabs: document.querySelectorAll("[data-alignment-tab]").length,
|
||||||
|
labPanels: document.querySelectorAll("[data-alignment-panel]").length,
|
||||||
|
navLinks: document.querySelectorAll(".top-nav a").length,
|
||||||
|
documentOverflow: document.documentElement.scrollWidth - document.documentElement.clientWidth,
|
||||||
|
}))()`);
|
||||||
|
|
||||||
|
const sft = await evaluate(`(() => {
|
||||||
|
const root = document.querySelector("[data-alignment-lab]");
|
||||||
|
const read = () => ({
|
||||||
|
active: root.querySelector("[data-sft-active]").textContent.trim(),
|
||||||
|
nll: root.querySelector("[data-sft-nll]").textContent.trim(),
|
||||||
|
reading: root.querySelector("[data-sft-reading]").textContent.trim(),
|
||||||
|
lossStates: [...root.querySelectorAll("[data-sft-loss]")].map((node) => node.textContent.trim()),
|
||||||
|
});
|
||||||
|
const initial = read();
|
||||||
|
root.querySelector('[data-sft-mask="all"]').click();
|
||||||
|
const quality = root.querySelector("[data-sft-quality]");
|
||||||
|
quality.value = "unsafe";
|
||||||
|
quality.dispatchEvent(new Event("change", { bubbles: true }));
|
||||||
|
return { initial, unsafeAll: read() };
|
||||||
|
})()`);
|
||||||
|
|
||||||
|
const preference = await evaluate(`(() => {
|
||||||
|
const root = document.querySelector("[data-alignment-lab]");
|
||||||
|
root.querySelector('[data-alignment-tab="preference"]').click();
|
||||||
|
root.querySelector('[data-pref-preset="bothbad"]').click();
|
||||||
|
return {
|
||||||
|
rewardA: root.querySelector('[data-reward="a"]').textContent.trim(),
|
||||||
|
rewardB: root.querySelector('[data-reward="b"]').textContent.trim(),
|
||||||
|
probability: root.querySelector("[data-pref-probability]").textContent.trim(),
|
||||||
|
reading: root.querySelector("[data-pref-reading]").textContent.trim(),
|
||||||
|
visiblePanel: root.querySelector("[data-alignment-panel]:not([hidden])").dataset.alignmentPanel,
|
||||||
|
};
|
||||||
|
})()`);
|
||||||
|
|
||||||
|
const update = await evaluate(`(() => {
|
||||||
|
const root = document.querySelector("[data-alignment-lab]");
|
||||||
|
root.querySelector('[data-alignment-tab="update"]').click();
|
||||||
|
root.querySelector('[data-update-method="dpo"]').click();
|
||||||
|
const stale = root.querySelector("[data-update-stale]");
|
||||||
|
stale.value = "85";
|
||||||
|
stale.dispatchEvent(new Event("input", { bubbles: true }));
|
||||||
|
return {
|
||||||
|
models: root.querySelector("[data-update-models]").textContent.trim(),
|
||||||
|
regime: root.querySelector("[data-update-regime]").textContent.trim(),
|
||||||
|
equation: root.querySelector("[data-update-equation]").textContent.trim(),
|
||||||
|
reading: root.querySelector("[data-update-reading]").textContent.trim(),
|
||||||
|
steps: [...root.querySelectorAll("[data-update-step]")].map((node) => node.textContent.trim()),
|
||||||
|
};
|
||||||
|
})()`);
|
||||||
|
|
||||||
|
const recipe = await evaluate(`(() => {
|
||||||
|
const root = document.querySelector("[data-alignment-lab]");
|
||||||
|
root.querySelector('[data-alignment-tab="recipe"]').click();
|
||||||
|
root.querySelector('[data-recipe-id="k3"]').click();
|
||||||
|
const selected = {
|
||||||
|
family: root.querySelector("[data-recipe-family]").textContent.trim(),
|
||||||
|
regime: root.querySelector("[data-recipe-regime]").textContent.trim(),
|
||||||
|
constraints: root.querySelector("[data-recipe-constraints]").textContent.trim(),
|
||||||
|
path: [...root.querySelectorAll("[data-recipe-step]")].map((node) => node.textContent.trim()),
|
||||||
|
risk: root.querySelector("[data-recipe-risk]").textContent.trim(),
|
||||||
|
};
|
||||||
|
const firstTab = root.querySelector('[data-alignment-tab="sft"]');
|
||||||
|
firstTab.focus();
|
||||||
|
firstTab.dispatchEvent(new KeyboardEvent("keydown", { key: "End", bubbles: true }));
|
||||||
|
return {
|
||||||
|
...selected,
|
||||||
|
keyboardSelected: root.querySelector('[data-alignment-tab][aria-selected="true"]').dataset.alignmentTab,
|
||||||
|
keyboardVisible: root.querySelector("[data-alignment-panel]:not([hidden])").dataset.alignmentPanel,
|
||||||
|
};
|
||||||
|
})()`);
|
||||||
|
|
||||||
|
await evaluate(`document.querySelector("[data-alignment-lab]").scrollIntoView({ block: "start", behavior: "instant" })`);
|
||||||
|
await pause(180);
|
||||||
|
await screenshot("/tmp/llm-atlas-alignment-lab-desktop.png");
|
||||||
|
|
||||||
|
await navigate("/");
|
||||||
|
const home = await evaluate(`(() => ({
|
||||||
|
releaseCards: document.querySelectorAll(".release-card").length,
|
||||||
|
firstRelease: document.querySelector(".release-card h2").textContent.trim(),
|
||||||
|
firstHref: document.querySelector(".release-card").getAttribute("href"),
|
||||||
|
paperCount: document.querySelector(".hero-stats div:nth-child(3) b").textContent.trim(),
|
||||||
|
navLinks: document.querySelectorAll(".top-nav a").length,
|
||||||
|
}))()`);
|
||||||
|
|
||||||
|
await navigate("/papers/");
|
||||||
|
const papers = await evaluate(`(() => {
|
||||||
|
const button = [...document.querySelectorAll("[data-filter]")].find((node) => node.textContent.includes("后训练"));
|
||||||
|
button?.click();
|
||||||
|
return {
|
||||||
|
total: document.querySelectorAll("[data-paper]").length,
|
||||||
|
alignmentVisible: document.querySelectorAll("[data-paper]:not([hidden])").length,
|
||||||
|
hasAlignmentFilter: Boolean(button),
|
||||||
|
};
|
||||||
|
})()`);
|
||||||
|
|
||||||
|
await command("Emulation.setDeviceMetricsOverride", {
|
||||||
|
width: 390,
|
||||||
|
height: 844,
|
||||||
|
deviceScaleFactor: 1,
|
||||||
|
mobile: true,
|
||||||
|
});
|
||||||
|
await navigate("/post-training/alignment/");
|
||||||
|
const mobile = await evaluate(`(() => {
|
||||||
|
const root = document.querySelector("[data-alignment-lab]");
|
||||||
|
root.scrollIntoView({ block: "start", behavior: "instant" });
|
||||||
|
const toggle = document.querySelector("#menu-toggle");
|
||||||
|
toggle?.click();
|
||||||
|
return {
|
||||||
|
documentOverflow: document.documentElement.scrollWidth - document.documentElement.clientWidth,
|
||||||
|
menuVisible: getComputedStyle(toggle).display !== "none",
|
||||||
|
menuOpen: toggle.getAttribute("aria-expanded"),
|
||||||
|
mobileLinks: document.querySelectorAll("#mobile-nav a").length,
|
||||||
|
tabs: root.querySelectorAll("[data-alignment-tab]").length,
|
||||||
|
offenders: [...document.querySelectorAll("body *")]
|
||||||
|
.filter((node) => node.getBoundingClientRect().right > document.documentElement.clientWidth + 1)
|
||||||
|
.slice(0, 12)
|
||||||
|
.map((node) => ({
|
||||||
|
tag: node.tagName,
|
||||||
|
className: typeof node.className === "string" ? node.className : "",
|
||||||
|
right: Math.round(node.getBoundingClientRect().right),
|
||||||
|
width: Math.round(node.getBoundingClientRect().width),
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
})()`);
|
||||||
|
await pause(180);
|
||||||
|
await screenshot("/tmp/llm-atlas-alignment-mobile.png");
|
||||||
|
|
||||||
|
const report = { overview, sft, preference, update, recipe, home, papers, mobile, exceptions };
|
||||||
|
console.log(JSON.stringify(report, null, 2));
|
||||||
|
|
||||||
|
const numeric = (value) => Number.parseFloat(value);
|
||||||
|
const failures = [];
|
||||||
|
if (!overview.title.includes("真正与人协作")) failures.push("章节标题异常");
|
||||||
|
if (overview.sections !== 22 || overview.tocLinks !== 22) failures.push("章节/目录数量异常");
|
||||||
|
if (overview.paperLinks !== 44) failures.push("正式论文链不是 44 个节点");
|
||||||
|
if (overview.labTabs !== 4 || overview.labPanels !== 4) failures.push("四联实验结构异常");
|
||||||
|
if (overview.navLinks !== 15 || home.navLinks !== 15 || mobile.mobileLinks !== 15) failures.push("全站导航未同步后训练专题");
|
||||||
|
if (overview.documentOverflow > 1 || mobile.documentOverflow > 1) failures.push("桌面或移动端存在横向溢出");
|
||||||
|
if (sft.initial.active !== "6 / 10" || !sft.initial.lossStates.slice(0, 4).every((value) => value === "MASKED")) failures.push("SFT response-only mask 异常");
|
||||||
|
if (sft.unsafeAll.active !== "10 / 10" || numeric(sft.unsafeAll.nll) <= numeric(sft.initial.nll) || !sft.unsafeAll.reading.includes("错误")) failures.push("SFT 全序列/坏示范交互异常");
|
||||||
|
if (numeric(preference.rewardA) >= 0 || numeric(preference.rewardB) >= 0 || !preference.reading.includes("两坏") || preference.visiblePanel !== "preference") failures.push("both-bad 偏好实验异常");
|
||||||
|
if (update.models !== "2" || update.regime !== "OFFLINE" || !update.equation.includes("Δlog") || !update.reading.includes("旧候选")) failures.push("DPO / 陈旧分布实验异常");
|
||||||
|
if (!update.steps[0].includes("Fixed preference")) failures.push("DPO 更新流程没有切换");
|
||||||
|
if (!recipe.family.includes("Multi-effort") || !recipe.regime.includes("9 RL experts") || !recipe.constraints.includes("verbosity")) failures.push("K3 配方合同异常");
|
||||||
|
if (!recipe.path.some((step) => step.includes("3 domains × 3 efforts")) || !recipe.path.some((step) => step.includes("MOPD"))) failures.push("K3 配方路径异常");
|
||||||
|
if (recipe.keyboardSelected !== "recipe" || recipe.keyboardVisible !== "recipe") failures.push("实验 tab 键盘导航异常");
|
||||||
|
if (home.releaseCards !== 10 || !home.firstRelease.includes("DPO 没有") || home.firstHref !== "/post-training/alignment/") failures.push("首页 Alignment 首发入口异常");
|
||||||
|
if (home.paperCount !== "280" || papers.total !== 280 || !papers.hasAlignmentFilter || papers.alignmentVisible < 35) failures.push("论文库后训练标签或论文总数异常");
|
||||||
|
if (!mobile.menuVisible || mobile.menuOpen !== "true" || mobile.tabs !== 4) failures.push("移动端导航或实验异常");
|
||||||
|
if (exceptions.length) failures.push(`浏览器异常:${exceptions.join(" | ")}`);
|
||||||
|
|
||||||
|
if (failures.length) {
|
||||||
|
console.error(`\nFAIL\n- ${failures.join("\n- ")}`);
|
||||||
|
process.exitCode = 1;
|
||||||
|
} else {
|
||||||
|
console.log("\nPASS alignment browser regression");
|
||||||
|
}
|
||||||
|
|
||||||
|
socket.close();
|
||||||
@@ -230,15 +230,15 @@ if (transform.keyboard.selected !== "transform" || transform.keyboard.visible !=
|
|||||||
if (layout.articleSections !== 18 || layout.paperLinks !== 31 || layout.labTabs !== 4 || layout.views !== 4) {
|
if (layout.articleSections !== 18 || layout.paperLinks !== 31 || layout.labTabs !== 4 || layout.views !== 4) {
|
||||||
failures.push("章节、论文或实验数量异常");
|
failures.push("章节、论文或实验数量异常");
|
||||||
}
|
}
|
||||||
if (layout.navLinks !== 14 || mobile.mobileLinks !== 14 || home.navLinks !== 14) failures.push("全站导航未同步数值专题");
|
if (layout.navLinks !== 15 || mobile.mobileLinks !== 15 || home.navLinks !== 15) failures.push("全站导航未同步数值专题");
|
||||||
if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentOverflow > 0) failures.push("页面存在横向溢出");
|
if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentOverflow > 0) failures.push("页面存在横向溢出");
|
||||||
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
|
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
|
||||||
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
|
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
|
||||||
if (home.releaseCards !== 9 || !home.firstRelease.includes("Attention 不只是") || home.firstHref !== "/foundations/") {
|
if (home.releaseCards !== 10 || !home.firstRelease.includes("DPO 没有") || home.firstHref !== "/post-training/alignment/") {
|
||||||
failures.push("首页 Transformer 新章入口异常");
|
failures.push("首页 Transformer 新章入口异常");
|
||||||
}
|
}
|
||||||
if (home.paperCount !== "258") failures.push(`首页论文总数异常:${home.paperCount}`);
|
if (home.paperCount !== "280") failures.push(`首页论文总数异常:${home.paperCount}`);
|
||||||
if (!papers.hasDataFilter || papers.total !== 258 || papers.visible < 25) failures.push("论文库数据标签或论文总数异常");
|
if (!papers.hasDataFilter || papers.total !== 280 || papers.visible < 25) failures.push("论文库数据标签或论文总数异常");
|
||||||
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
|
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
|
||||||
|
|
||||||
socket.close();
|
socket.close();
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentO
|
|||||||
}
|
}
|
||||||
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
|
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
|
||||||
if (!mobile.menuVisible) failures.push("移动端菜单按钮未显示");
|
if (!mobile.menuVisible) failures.push("移动端菜单按钮未显示");
|
||||||
if (home.releaseCards !== 9) failures.push(`首页新章卡数量异常:${home.releaseCards}`);
|
if (home.releaseCards !== 10) failures.push(`首页新章卡数量异常:${home.releaseCards}`);
|
||||||
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
|
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
|
||||||
|
|
||||||
socket.close();
|
socket.close();
|
||||||
|
|||||||
@@ -273,15 +273,15 @@ if (stability.keyboard.selected !== "stability" || stability.keyboard.visible !=
|
|||||||
if (layout.articleSections !== 19 || layout.paperLinks !== 36 || layout.labTabs !== 4 || layout.views !== 4) {
|
if (layout.articleSections !== 19 || layout.paperLinks !== 36 || layout.labTabs !== 4 || layout.views !== 4) {
|
||||||
failures.push("章节、论文或实验数量异常");
|
failures.push("章节、论文或实验数量异常");
|
||||||
}
|
}
|
||||||
if (layout.navLinks !== 14 || mobile.mobileLinks !== 14 || home.navLinks !== 14) failures.push("全站导航未同步数值专题");
|
if (layout.navLinks !== 15 || mobile.mobileLinks !== 15 || home.navLinks !== 15) failures.push("全站导航未同步数值专题");
|
||||||
if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentOverflow > 0) failures.push("页面存在横向溢出");
|
if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentOverflow > 0) failures.push("页面存在横向溢出");
|
||||||
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
|
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
|
||||||
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
|
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
|
||||||
if (home.releaseCards !== 9 || !home.firstRelease.includes("Attention 不只是") || home.firstHref !== "/foundations/") {
|
if (home.releaseCards !== 10 || !home.firstRelease.includes("DPO 没有") || home.firstHref !== "/post-training/alignment/") {
|
||||||
failures.push("首页 Transformer 新章入口异常");
|
failures.push("首页 Transformer 新章入口异常");
|
||||||
}
|
}
|
||||||
if (home.paperCount !== "258") failures.push(`首页论文总数异常:${home.paperCount}`);
|
if (home.paperCount !== "280") failures.push(`首页论文总数异常:${home.paperCount}`);
|
||||||
if (!papers.hasOptimizerFilter || papers.total !== 258 || papers.visible < 8) failures.push("论文库优化器标签或论文总数异常");
|
if (!papers.hasOptimizerFilter || papers.total !== 280 || papers.visible < 8) failures.push("论文库优化器标签或论文总数异常");
|
||||||
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
|
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
|
||||||
|
|
||||||
socket.close();
|
socket.close();
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentO
|
|||||||
}
|
}
|
||||||
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
|
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
|
||||||
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
|
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
|
||||||
if (home.releaseCards !== 9 || !home.firstRelease.includes("Attention 不只是")) failures.push("首页 Transformer 新章入口异常");
|
if (home.releaseCards !== 10 || !home.firstRelease.includes("DPO 没有")) failures.push("首页 Transformer 新章入口异常");
|
||||||
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
|
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
|
||||||
|
|
||||||
socket.close();
|
socket.close();
|
||||||
|
|||||||
@@ -269,14 +269,14 @@ if (emergence.paths.some((length) => length < 500)) failures.push("涌现多指
|
|||||||
if (layout.articleSections !== 16 || layout.paperLinks !== 29 || layout.labTabs !== 4 || layout.views !== 4) {
|
if (layout.articleSections !== 16 || layout.paperLinks !== 29 || layout.labTabs !== 4 || layout.views !== 4) {
|
||||||
failures.push("章节、论文或实验数量异常");
|
failures.push("章节、论文或实验数量异常");
|
||||||
}
|
}
|
||||||
if (layout.navLinks !== 14 || mobile.mobileLinks !== 14 || home.navLinks !== 14) failures.push("全站导航未同步数值专题");
|
if (layout.navLinks !== 15 || mobile.mobileLinks !== 15 || home.navLinks !== 15) failures.push("全站导航未同步数值专题");
|
||||||
if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentOverflow > 0) failures.push("页面存在横向溢出");
|
if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentOverflow > 0) failures.push("页面存在横向溢出");
|
||||||
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
|
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
|
||||||
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
|
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
|
||||||
if (home.releaseCards !== 9 || !home.firstRelease.includes("Attention 不只是") || home.firstHref !== "/foundations/") {
|
if (home.releaseCards !== 10 || !home.firstRelease.includes("DPO 没有") || home.firstHref !== "/post-training/alignment/") {
|
||||||
failures.push("首页 Transformer 新章入口异常");
|
failures.push("首页 Transformer 新章入口异常");
|
||||||
}
|
}
|
||||||
if (home.paperCount !== "258") failures.push(`首页论文总数异常:${home.paperCount}`);
|
if (home.paperCount !== "280") failures.push(`首页论文总数异常:${home.paperCount}`);
|
||||||
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
|
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
|
||||||
|
|
||||||
socket.close();
|
socket.close();
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ if (layout.articleSections !== 16 || layout.paperLinks !== 37 || layout.labTabs
|
|||||||
if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentOverflow > 0) failures.push("页面存在横向溢出");
|
if (layout.documentOverflow > 0 || mobile.documentOverflow > 0 || home.documentOverflow > 0) failures.push("页面存在横向溢出");
|
||||||
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
|
if (layout.navGap < 0) failures.push(`桌面导航碰撞:${layout.navGap}px`);
|
||||||
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
|
if (!mobile.menuVisible || mobile.menuOpen !== "true") failures.push("移动端菜单不可用");
|
||||||
if (home.releaseCards !== 9 || !home.firstRelease.includes("Attention 不只是")) failures.push("首页 Transformer 新章入口异常");
|
if (home.releaseCards !== 10 || !home.firstRelease.includes("DPO 没有")) failures.push("首页 Transformer 新章入口异常");
|
||||||
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
|
if (exceptions.length) failures.push(`浏览器脚本异常:${exceptions.join("; ")}`);
|
||||||
|
|
||||||
socket.close();
|
socket.close();
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ const home = await evaluate(`(() => ({
|
|||||||
releaseCards: document.querySelectorAll(".release-card").length,
|
releaseCards: document.querySelectorAll(".release-card").length,
|
||||||
firstRelease: document.querySelector(".release-card h2").textContent,
|
firstRelease: document.querySelector(".release-card h2").textContent,
|
||||||
firstHref: document.querySelector(".release-card").getAttribute("href"),
|
firstHref: document.querySelector(".release-card").getAttribute("href"),
|
||||||
paperCount: [...document.querySelectorAll(".hero-stats b")].map((node) => node.textContent.trim()).find((value) => value === "258"),
|
paperCount: [...document.querySelectorAll(".hero-stats b")].map((node) => node.textContent.trim()).find((value) => value === "280"),
|
||||||
}))()`);
|
}))()`);
|
||||||
|
|
||||||
await navigate("/papers/");
|
await navigate("/papers/");
|
||||||
@@ -236,8 +236,8 @@ if (block.family.trim() !== "Hybrid MoE" || !block.kv.includes("3 KDA : 1 Gated
|
|||||||
if (!block.path.some((step) => step.includes("KDA × 3")) || !block.note.includes("AttnRes")) failures.push("K3 Block 路径异常");
|
if (!block.path.some((step) => step.includes("KDA × 3")) || !block.note.includes("AttnRes")) failures.push("K3 Block 路径异常");
|
||||||
if (block.context.trim() !== "128K" || numeric(block.mha) !== 400 || numeric(block.kda) !== 1) failures.push("KV 成本缩放异常");
|
if (block.context.trim() !== "128K" || numeric(block.mha) !== 400 || numeric(block.kda) !== 1) failures.push("KV 成本缩放异常");
|
||||||
if (block.keyboardSelected !== "block" || block.keyboardVisible !== "block") failures.push("实验 tab 键盘导航异常");
|
if (block.keyboardSelected !== "block" || block.keyboardVisible !== "block") failures.push("实验 tab 键盘导航异常");
|
||||||
if (home.releaseCards !== 9 || !home.firstRelease.includes("Attention 不只是") || home.firstHref !== "/foundations/") failures.push("首页 Transformer 首发入口异常");
|
if (home.releaseCards !== 10 || !home.firstRelease.includes("DPO 没有") || home.firstHref !== "/post-training/alignment/") failures.push("首页 Transformer 首发入口异常");
|
||||||
if (home.paperCount !== "258" || papers.total !== 258 || papers.transformerVisible < 30) failures.push("论文库或首页论文数量异常");
|
if (home.paperCount !== "280" || papers.total !== 280 || papers.transformerVisible < 30) failures.push("论文库或首页论文数量异常");
|
||||||
if (!mobile.menuVisible || mobile.menuOpen !== "true" || mobile.tabs !== 4) failures.push("移动端导航或实验异常");
|
if (!mobile.menuVisible || mobile.menuOpen !== "true" || mobile.tabs !== 4) failures.push("移动端导航或实验异常");
|
||||||
if (exceptions.length) failures.push(`浏览器异常:${exceptions.join(" | ")}`);
|
if (exceptions.length) failures.push(`浏览器异常:${exceptions.join(" | ")}`);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,895 @@
|
|||||||
|
---
|
||||||
|
const sftTokens = [
|
||||||
|
{ text: "<system>", role: "prompt", probability: 0.94 },
|
||||||
|
{ text: "请简洁回答", role: "prompt", probability: 0.66 },
|
||||||
|
{ text: "<user>", role: "prompt", probability: 0.91 },
|
||||||
|
{ text: "为什么海是蓝色?", role: "prompt", probability: 0.42 },
|
||||||
|
{ text: "<assistant>", role: "response", probability: 0.87 },
|
||||||
|
{ text: "阳光", role: "response", probability: 0.72 },
|
||||||
|
{ text: "进入海水后", role: "response", probability: 0.58 },
|
||||||
|
{ text: "红光更易被吸收", role: "response", probability: 0.36 },
|
||||||
|
{ text: "蓝光更易散射返回", role: "response", probability: 0.29 },
|
||||||
|
{ text: "因此看起来偏蓝", role: "response", probability: 0.63 },
|
||||||
|
];
|
||||||
|
|
||||||
|
const recipes = [
|
||||||
|
{
|
||||||
|
id: "instructgpt",
|
||||||
|
label: "InstructGPT",
|
||||||
|
year: "2022",
|
||||||
|
family: "Human-feedback RLHF",
|
||||||
|
feedback: "人工 demonstration + 人工 K-way ranking",
|
||||||
|
regime: "SFT → RM → online PPO-ptx",
|
||||||
|
granularity: "Token imitation + response scalar",
|
||||||
|
models: "Policy · Reference · RM · Value",
|
||||||
|
constraints: "per-token KL + pretraining mix",
|
||||||
|
risk: "RM 过优化、标注群体边界、alignment tax",
|
||||||
|
path: ["API / 标注者 prompts", "13K SFT demos", "33K ranking prompts → RM", "31K PPO prompts", "PPO-ptx policy"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "cai",
|
||||||
|
label: "Constitutional AI",
|
||||||
|
year: "2022",
|
||||||
|
family: "Principle-guided RLAIF",
|
||||||
|
feedback: "人写原则 + AI critique / revision / preference",
|
||||||
|
regime: "SL-CAI → preference model → RL-CAI",
|
||||||
|
granularity: "修订示范 + response preference",
|
||||||
|
models: "Policy · AI labeler · PM · Value",
|
||||||
|
constraints: "constitution + helpfulness objective",
|
||||||
|
risk: "原则覆盖、teacher 偏差、无害但回避",
|
||||||
|
path: ["Constitution", "Self-critique", "Revised SFT data", "AI preferences → PM", "RL-CAI"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "dpo",
|
||||||
|
label: "DPO",
|
||||||
|
year: "2023",
|
||||||
|
family: "Offline direct preference",
|
||||||
|
feedback: "固定 chosen / rejected pairs",
|
||||||
|
regime: "SFT reference → offline DPO",
|
||||||
|
granularity: "sequence log-ratio pair",
|
||||||
|
models: "Policy · frozen Reference",
|
||||||
|
constraints: "β × policy/reference ratio",
|
||||||
|
risk: "pair 分布陈旧、长度口径、reference 选择",
|
||||||
|
path: ["Prompt", "Sample pairs", "Preference label", "Reference log-prob", "Direct policy update"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "deepseekv2",
|
||||||
|
label: "DeepSeek-V2",
|
||||||
|
year: "2024",
|
||||||
|
family: "Multi-reward GRPO",
|
||||||
|
feedback: "人工偏好 + RM + 编译器/答案规则",
|
||||||
|
regime: "SFT → reasoning RL → preference RL",
|
||||||
|
granularity: "group-relative outcome reward",
|
||||||
|
models: "Policy · Reference · multiple RMs",
|
||||||
|
constraints: "KL + rule / helpful / safety rewards",
|
||||||
|
risk: "alignment tax、online/offline 分布、RM 可靠性",
|
||||||
|
path: ["SFT", "Reasoning RM", "GRPO stage 1", "Helpful / Safety / Rule", "GRPO stage 2"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "deepseekv4",
|
||||||
|
label: "DeepSeek-V4",
|
||||||
|
year: "2026",
|
||||||
|
family: "SFT + GRPO + GRM",
|
||||||
|
feedback: "规则 verifier + rubric-guided generative reward",
|
||||||
|
regime: "SFT → unified domain GRPO",
|
||||||
|
granularity: "outcome + generated rubric score",
|
||||||
|
models: "Policy · Reference · Verifier / GRM",
|
||||||
|
constraints: "规则优先、rubric、QAT deployment constraint",
|
||||||
|
risk: "GRM 可被利用、rubric 缺口、环境覆盖不足",
|
||||||
|
path: ["Curated SFT", "Rule-verifiable tasks", "Hard tasks → GRM", "GRPO", "Domain-aligned model"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "k3",
|
||||||
|
label: "Kimi K3",
|
||||||
|
year: "2026",
|
||||||
|
family: "Multi-effort expert integration",
|
||||||
|
feedback: "规则/环境/Agentic GRM + 9 teachers",
|
||||||
|
regime: "SFT → 9 RL experts → MOPD",
|
||||||
|
granularity: "outcome reward + per-token teacher signal",
|
||||||
|
models: "Student · 9 Teachers · Verifiers / GRM",
|
||||||
|
constraints: "partial-rollout clipping + budget + verbosity",
|
||||||
|
risk: "长轨迹陈旧、teacher 偏差、reward hacking",
|
||||||
|
path: ["Cold-start SFT", "3 domains × 3 efforts", "Partial-rollout RL", "Student on-policy rollout", "MOPD consolidation"],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
---
|
||||||
|
|
||||||
|
<figure
|
||||||
|
class="alignment-lab"
|
||||||
|
data-alignment-lab
|
||||||
|
data-sft-tokens={JSON.stringify(sftTokens)}
|
||||||
|
data-recipes={JSON.stringify(recipes)}
|
||||||
|
>
|
||||||
|
<div class="lab-heading">
|
||||||
|
<div>
|
||||||
|
<span class="micro-label">INTERACTIVE / FOUR-VIEW LAB</span>
|
||||||
|
<h3>把“对齐”拆成四个不相互冒充的实验</h3>
|
||||||
|
</div>
|
||||||
|
<p>所有数字都是教学模拟,用来展示目标函数和反馈结构;不是任何模型的训练日志或产品指标。</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="lab-tabs" role="tablist" aria-label="后训练四联实验">
|
||||||
|
<button type="button" role="tab" aria-selected="true" aria-controls="alignment-panel-sft" id="alignment-tab-sft" data-alignment-tab="sft">
|
||||||
|
<span>01</span><b>SFT 显微镜</b><small>哪些 Token 产生梯度</small>
|
||||||
|
</button>
|
||||||
|
<button type="button" role="tab" aria-selected="false" aria-controls="alignment-panel-preference" id="alignment-tab-preference" data-alignment-tab="preference" tabindex="-1">
|
||||||
|
<span>02</span><b>偏好与 RM</b><small>比较怎样变成标量</small>
|
||||||
|
</button>
|
||||||
|
<button type="button" role="tab" aria-selected="false" aria-controls="alignment-panel-update" id="alignment-tab-update" data-alignment-tab="update" tabindex="-1">
|
||||||
|
<span>03</span><b>PPO / DPO</b><small>两种更新合同</small>
|
||||||
|
</button>
|
||||||
|
<button type="button" role="tab" aria-selected="false" aria-controls="alignment-panel-recipe" id="alignment-tab-recipe" data-alignment-tab="recipe" tabindex="-1">
|
||||||
|
<span>04</span><b>现代配方</b><small>2022 → K3</small>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<section class="lab-panel" role="tabpanel" id="alignment-panel-sft" aria-labelledby="alignment-tab-sft" data-alignment-panel="sft">
|
||||||
|
<div class="panel-intro">
|
||||||
|
<div><span>QUESTION</span><h4>SFT 到底在模仿 prompt,还是只模仿 assistant?</h4></div>
|
||||||
|
<p>真实 chat template 会把角色标记也编码成 Token;是否计入 loss 由 mask 决定,而不是由颜色决定。</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sft-controls">
|
||||||
|
<div class="mode-switch" role="group" aria-label="选择 SFT loss mask">
|
||||||
|
<button type="button" class="active" data-sft-mask="response">只训练 Assistant</button>
|
||||||
|
<button type="button" data-sft-mask="all">全序列训练</button>
|
||||||
|
</div>
|
||||||
|
<label>
|
||||||
|
Demonstration 质量
|
||||||
|
<select data-sft-quality>
|
||||||
|
<option value="expert" selected>专家、简洁、事实正确</option>
|
||||||
|
<option value="verbose">基本正确,但冗长</option>
|
||||||
|
<option value="unsafe">格式流畅,但事实错误</option>
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sft-sequence" data-sft-sequence>
|
||||||
|
{sftTokens.map((token, index) => (
|
||||||
|
<div data-sft-token={index} data-role={token.role}>
|
||||||
|
<span>{token.role === "prompt" ? "CONDITION" : "TARGET"}</span>
|
||||||
|
<b>{token.text}</b>
|
||||||
|
<i><em data-sft-prob={index}>{Math.round(token.probability * 100)}%</em><small data-sft-loss={index}>—</small></i>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="metric-row">
|
||||||
|
<article><span>LOSS TOKENS</span><b data-sft-active>6 / 10</b><p>真正进入交叉熵求和的 Token</p></article>
|
||||||
|
<article><span>MEAN NLL</span><b data-sft-nll>0.72</b><p>只反映这条示范的拟合难度</p></article>
|
||||||
|
<article><span>TEACHER FORCING</span><b>ON</b><p>第 t 步总能看到参考答案的前缀</p></article>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="lab-takeaway">
|
||||||
|
<b data-sft-reading>SFT 正在学习一条高质量示范,但它没有直接比较其他可能回答。</b>
|
||||||
|
<p>如果 demonstration 本身错误,交叉熵仍会忠实提高错误 Token 的概率;loss 并不知道“事实正确”。</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="lab-panel" role="tabpanel" id="alignment-panel-preference" aria-labelledby="alignment-tab-preference" data-alignment-panel="preference" hidden>
|
||||||
|
<div class="panel-intro">
|
||||||
|
<div><span>QUESTION</span><h4>为什么“chosen”只是相对更好,不一定是好答案?</h4></div>
|
||||||
|
<p>滑块控制的是一个教学 reward model 的偏好权重;真实 RM 会从标注数据中学习这些权重与 shortcut。</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="preference-presets" role="group" aria-label="选择偏好场景">
|
||||||
|
<button type="button" class="active" data-pref-preset="evidence">事实胜过语气</button>
|
||||||
|
<button type="button" data-pref-preset="length">长度 Shortcut</button>
|
||||||
|
<button type="button" data-pref-preset="bothbad">两个都不好</button>
|
||||||
|
<button type="button" data-pref-preset="disagree">标注者分歧</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="preference-grid">
|
||||||
|
<article data-answer-card="a">
|
||||||
|
<span>RESPONSE A</span>
|
||||||
|
<h4 data-answer-title="a">短而有证据</h4>
|
||||||
|
<p data-answer-copy="a">指出海水对长波吸收更强,并说明散射与反射共同影响观察颜色。</p>
|
||||||
|
<dl>
|
||||||
|
<div><dt>事实</dt><dd data-feature="a-fact">92</dd></div>
|
||||||
|
<div><dt>帮助</dt><dd data-feature="a-help">78</dd></div>
|
||||||
|
<div><dt>风格</dt><dd data-feature="a-style">58</dd></div>
|
||||||
|
<div><dt>长度</dt><dd data-feature="a-length">34</dd></div>
|
||||||
|
</dl>
|
||||||
|
<strong data-reward="a">+1.42</strong>
|
||||||
|
</article>
|
||||||
|
<div class="versus">
|
||||||
|
<span>BRADLEY–TERRY</span>
|
||||||
|
<b data-pref-probability>74%</b>
|
||||||
|
<small data-pref-choice>P(A ≻ B)</small>
|
||||||
|
<i><em data-pref-meter></em></i>
|
||||||
|
</div>
|
||||||
|
<article data-answer-card="b">
|
||||||
|
<span>RESPONSE B</span>
|
||||||
|
<h4 data-answer-title="b">流畅但错误</h4>
|
||||||
|
<p data-answer-copy="b">写得更长、更有自信,却把海水颜色完全归因于天空倒影。</p>
|
||||||
|
<dl>
|
||||||
|
<div><dt>事实</dt><dd data-feature="b-fact">24</dd></div>
|
||||||
|
<div><dt>帮助</dt><dd data-feature="b-help">46</dd></div>
|
||||||
|
<div><dt>风格</dt><dd data-feature="b-style">86</dd></div>
|
||||||
|
<div><dt>长度</dt><dd data-feature="b-length">78</dd></div>
|
||||||
|
</dl>
|
||||||
|
<strong data-reward="b">+0.39</strong>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="rm-controls">
|
||||||
|
<label>事实权重<input type="range" min="0" max="100" value="70" data-rm-weight="fact" /><output data-rm-label="fact">0.70</output></label>
|
||||||
|
<label>帮助权重<input type="range" min="0" max="100" value="50" data-rm-weight="help" /><output data-rm-label="help">0.50</output></label>
|
||||||
|
<label>风格权重<input type="range" min="0" max="100" value="25" data-rm-weight="style" /><output data-rm-label="style">0.25</output></label>
|
||||||
|
<label>长度权重<input type="range" min="-50" max="80" value="5" data-rm-weight="length" /><output data-rm-label="length">0.05</output></label>
|
||||||
|
<label>标签噪声<input type="range" min="0" max="45" value="8" data-rm-noise /><output data-rm-noise-label>8%</output></label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="lab-takeaway">
|
||||||
|
<b data-pref-reading>这个 RM 更看重事实,因此短回答 A 获得更高偏好概率。</b>
|
||||||
|
<p>概率来自 reward difference,不是绝对质量证书;如果两个回答都很差,模型仍会被要求选出一个相对赢家。</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="lab-panel" role="tabpanel" id="alignment-panel-update" aria-labelledby="alignment-tab-update" data-alignment-panel="update" hidden>
|
||||||
|
<div class="panel-intro">
|
||||||
|
<div><span>QUESTION</span><h4>PPO 与 DPO 到底在哪一步分叉?</h4></div>
|
||||||
|
<p>二者都可从 pairwise preference 出发,但 PPO 显式拟合 RM 并向当前 policy 采样;经典 DPO 直接消费固定 pairs。</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="update-switch" role="group" aria-label="选择偏好优化方法">
|
||||||
|
<button type="button" class="active" data-update-method="ppo">PPO / explicit RM</button>
|
||||||
|
<button type="button" data-update-method="dpo">DPO / implicit RM</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="update-workbench">
|
||||||
|
<div class="update-flow" data-update-flow>
|
||||||
|
<div><span>01</span><b data-update-step="0">Current policy rollout</b></div>
|
||||||
|
<i>→</i>
|
||||||
|
<div><span>02</span><b data-update-step="1">Reward model score</b></div>
|
||||||
|
<i>→</i>
|
||||||
|
<div><span>03</span><b data-update-step="2">Advantage + critic</b></div>
|
||||||
|
<i>→</i>
|
||||||
|
<div><span>04</span><b data-update-step="3">Clipped policy update</b></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="update-controls">
|
||||||
|
<label>
|
||||||
|
Reward / preference gap
|
||||||
|
<input type="range" min="-100" max="200" value="80" data-update-gap />
|
||||||
|
<output data-update-gap-label>+0.80</output>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
KL / β 约束
|
||||||
|
<input type="range" min="1" max="100" value="25" data-update-beta />
|
||||||
|
<output data-update-beta-label>0.25</output>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
Policy 相对 reference 位移
|
||||||
|
<input type="range" min="-100" max="160" value="40" data-update-shift />
|
||||||
|
<output data-update-shift-label>+0.40</output>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
Pair / rollout 陈旧度
|
||||||
|
<input type="range" min="0" max="100" value="15" data-update-stale />
|
||||||
|
<output data-update-stale-label>15%</output>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="metric-row">
|
||||||
|
<article><span>TRAINING SIGNAL</span><b data-update-signal>+0.41</b><p data-update-signal-note>RM advantage 经 PPO clip 与 KL 后的教学量</p></article>
|
||||||
|
<article><span>LIVE MODELS</span><b data-update-models>4</b><p data-update-model-note>policy · reference · RM · value</p></article>
|
||||||
|
<article><span>DATA REGIME</span><b data-update-regime>ONLINE</b><p data-update-regime-note>需要接近当前 policy 的 rollout</p></article>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="equation-card">
|
||||||
|
<span data-update-kicker>PPO SKETCH</span>
|
||||||
|
<code data-update-equation>min(ρA, clip(ρ)A) − β KL(π || πref)</code>
|
||||||
|
<p data-update-reading>当 policy 已明显偏离 behavior policy,importance ratio 与 critic 误差会让更新更脆弱。</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="lab-panel" role="tabpanel" id="alignment-panel-recipe" aria-labelledby="alignment-tab-recipe" data-alignment-panel="recipe" hidden>
|
||||||
|
<div class="panel-intro">
|
||||||
|
<div><span>QUESTION</span><h4>现代 post-training 为什么不再是一条固定的 SFT→RM→PPO 流水线?</h4></div>
|
||||||
|
<p>用同一组字段比较反馈来源、训练制度、监督粒度、约束与失效模式,避免只比较算法缩写。</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="recipe-selector" role="group" aria-label="选择 post-training 配方">
|
||||||
|
{recipes.map((recipe, index) => (
|
||||||
|
<button type="button" class:list={{ active: index === 0 }} data-recipe-id={recipe.id}>
|
||||||
|
<span>{recipe.year}</span>{recipe.label}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="recipe-layout">
|
||||||
|
<div class="recipe-path" data-recipe-path>
|
||||||
|
{recipes[0].path.map((step, index) => (
|
||||||
|
<div>
|
||||||
|
<span>{String(index + 1).padStart(2, "0")}</span>
|
||||||
|
<b data-recipe-step>{step}</b>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
<dl class="recipe-contract">
|
||||||
|
<div><dt>FAMILY</dt><dd data-recipe-family>{recipes[0].family}</dd></div>
|
||||||
|
<div><dt>FEEDBACK</dt><dd data-recipe-feedback>{recipes[0].feedback}</dd></div>
|
||||||
|
<div><dt>REGIME</dt><dd data-recipe-regime>{recipes[0].regime}</dd></div>
|
||||||
|
<div><dt>GRANULARITY</dt><dd data-recipe-granularity>{recipes[0].granularity}</dd></div>
|
||||||
|
<div><dt>LIVE MODELS</dt><dd data-recipe-models>{recipes[0].models}</dd></div>
|
||||||
|
<div><dt>CONSTRAINTS</dt><dd data-recipe-constraints>{recipes[0].constraints}</dd></div>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="risk-strip">
|
||||||
|
<span>PRIMARY FAILURE MODE</span>
|
||||||
|
<b data-recipe-risk>{recipes[0].risk}</b>
|
||||||
|
<p>这是一张角色合同,不是排行榜;不同配方面对的任务、数据与预算并不相同。</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<figcaption>
|
||||||
|
<b>交互图 10</b>
|
||||||
|
四个实验依次回答:示范怎样产生 Token 梯度、偏好怎样变成代理标量、policy 怎样更新,以及现代配方怎样组合多种反馈。
|
||||||
|
</figcaption>
|
||||||
|
</figure>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
type SftToken = { text: string; role: "prompt" | "response"; probability: number };
|
||||||
|
type Recipe = {
|
||||||
|
id: string;
|
||||||
|
label: string;
|
||||||
|
year: string;
|
||||||
|
family: string;
|
||||||
|
feedback: string;
|
||||||
|
regime: string;
|
||||||
|
granularity: string;
|
||||||
|
models: string;
|
||||||
|
constraints: string;
|
||||||
|
risk: string;
|
||||||
|
path: string[];
|
||||||
|
};
|
||||||
|
|
||||||
|
document.querySelectorAll<HTMLElement>("[data-alignment-lab]").forEach((root) => {
|
||||||
|
const tabs = [...root.querySelectorAll<HTMLButtonElement>("[data-alignment-tab]")];
|
||||||
|
const panels = [...root.querySelectorAll<HTMLElement>("[data-alignment-panel]")];
|
||||||
|
const sftTokens = JSON.parse(root.dataset.sftTokens ?? "[]") as SftToken[];
|
||||||
|
const recipes = JSON.parse(root.dataset.recipes ?? "[]") as Recipe[];
|
||||||
|
|
||||||
|
const setText = (selector: string, text: string) => {
|
||||||
|
const node = root.querySelector<HTMLElement>(selector);
|
||||||
|
if (node) node.textContent = text;
|
||||||
|
};
|
||||||
|
const clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value));
|
||||||
|
const sigmoid = (value: number) => 1 / (1 + Math.exp(-value));
|
||||||
|
|
||||||
|
const activateTab = (name: string, focus = false) => {
|
||||||
|
tabs.forEach((tab) => {
|
||||||
|
const active = tab.dataset.alignmentTab === name;
|
||||||
|
tab.setAttribute("aria-selected", String(active));
|
||||||
|
tab.tabIndex = active ? 0 : -1;
|
||||||
|
if (active && focus) tab.focus();
|
||||||
|
});
|
||||||
|
panels.forEach((panel) => {
|
||||||
|
panel.hidden = panel.dataset.alignmentPanel !== name;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
tabs.forEach((tab, index) => {
|
||||||
|
tab.addEventListener("click", () => activateTab(tab.dataset.alignmentTab ?? "sft"));
|
||||||
|
tab.addEventListener("keydown", (event) => {
|
||||||
|
let next = index;
|
||||||
|
if (event.key === "ArrowRight") next = (index + 1) % tabs.length;
|
||||||
|
else if (event.key === "ArrowLeft") next = (index - 1 + tabs.length) % tabs.length;
|
||||||
|
else if (event.key === "Home") next = 0;
|
||||||
|
else if (event.key === "End") next = tabs.length - 1;
|
||||||
|
else return;
|
||||||
|
event.preventDefault();
|
||||||
|
activateTab(tabs[next].dataset.alignmentTab ?? "sft", true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
let sftMask = "response";
|
||||||
|
const qualitySelect = root.querySelector<HTMLSelectElement>("[data-sft-quality]");
|
||||||
|
const qualityMultipliers: Record<string, { probabilities: number[]; reading: string }> = {
|
||||||
|
expert: {
|
||||||
|
probabilities: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
|
||||||
|
reading: "SFT 正在学习一条高质量示范,但它没有直接比较其他可能回答。",
|
||||||
|
},
|
||||||
|
verbose: {
|
||||||
|
probabilities: [1, 1, 1, 1, 1, 0.92, 0.84, 0.78, 0.72, 0.68],
|
||||||
|
reading: "冗长示范提供更多稠密梯度,也会把重复、铺垫和表达习惯一起写进 policy。",
|
||||||
|
},
|
||||||
|
unsafe: {
|
||||||
|
probabilities: [1, 1, 1, 1, 1, 0.7, 0.46, 0.3, 0.24, 0.34],
|
||||||
|
reading: "交叉熵不会识别事实错误:只要它是 target,错误回答同样会得到正向模仿梯度。",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const renderSft = () => {
|
||||||
|
const quality = qualitySelect?.value ?? "expert";
|
||||||
|
const profile = qualityMultipliers[quality];
|
||||||
|
let active = 0;
|
||||||
|
let totalNll = 0;
|
||||||
|
sftTokens.forEach((token, index) => {
|
||||||
|
const contributes = sftMask === "all" || token.role === "response";
|
||||||
|
const probability = clamp(token.probability * (profile.probabilities[index] ?? 1), 0.04, 0.99);
|
||||||
|
const loss = -Math.log(probability);
|
||||||
|
const card = root.querySelector<HTMLElement>(`[data-sft-token="${index}"]`);
|
||||||
|
card?.toggleAttribute("data-active", contributes);
|
||||||
|
setText(`[data-sft-prob="${index}"]`, `${Math.round(probability * 100)}%`);
|
||||||
|
setText(`[data-sft-loss="${index}"]`, contributes ? `NLL ${loss.toFixed(2)}` : "MASKED");
|
||||||
|
if (contributes) {
|
||||||
|
active += 1;
|
||||||
|
totalNll += loss;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
setText("[data-sft-active]", `${active} / ${sftTokens.length}`);
|
||||||
|
setText("[data-sft-nll]", (totalNll / Math.max(active, 1)).toFixed(2));
|
||||||
|
setText("[data-sft-reading]", profile.reading);
|
||||||
|
root.querySelectorAll<HTMLButtonElement>("[data-sft-mask]").forEach((button) => {
|
||||||
|
button.classList.toggle("active", button.dataset.sftMask === sftMask);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
root.querySelectorAll<HTMLButtonElement>("[data-sft-mask]").forEach((button) => {
|
||||||
|
button.addEventListener("click", () => {
|
||||||
|
sftMask = button.dataset.sftMask ?? "response";
|
||||||
|
renderSft();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
qualitySelect?.addEventListener("change", renderSft);
|
||||||
|
renderSft();
|
||||||
|
|
||||||
|
type Answer = { title: string; copy: string; fact: number; help: number; style: number; length: number };
|
||||||
|
const preferenceProfiles: Record<string, { a: Answer; b: Answer; weights: number[]; noise: number; reading: string }> = {
|
||||||
|
evidence: {
|
||||||
|
a: { title: "短而有证据", copy: "指出海水对长波吸收更强,并说明散射与反射共同影响观察颜色。", fact: 92, help: 78, style: 58, length: 34 },
|
||||||
|
b: { title: "流畅但错误", copy: "写得更长、更有自信,却把海水颜色完全归因于天空倒影。", fact: 24, help: 46, style: 86, length: 78 },
|
||||||
|
weights: [70, 50, 25, 5], noise: 8,
|
||||||
|
reading: "这个 RM 更看重事实,因此短回答 A 获得更高偏好概率。",
|
||||||
|
},
|
||||||
|
length: {
|
||||||
|
a: { title: "短而正确", copy: "答案正确、简洁,但没有铺陈背景或重复结论。", fact: 90, help: 72, style: 52, length: 24 },
|
||||||
|
b: { title: "长而空泛", copy: "分成很多段并反复总结,信息增量有限,但表面上显得完整。", fact: 54, help: 58, style: 78, length: 96 },
|
||||||
|
weights: [35, 35, 35, 65], noise: 10,
|
||||||
|
reading: "长度被赋予过高权重时,RM 会把“写得多”误当成“帮助更大”。",
|
||||||
|
},
|
||||||
|
bothbad: {
|
||||||
|
a: { title: "简短猜测", copy: "给出一个没有证据的猜测,遗漏关键机制。", fact: 28, help: 24, style: 42, length: 20 },
|
||||||
|
b: { title: "自信编造", copy: "用流畅长文包装错误因果,还加入不存在的数字。", fact: 12, help: 30, style: 76, length: 82 },
|
||||||
|
weights: [60, 45, 30, 5], noise: 12,
|
||||||
|
reading: "A 只是“两坏相较取其轻”;chosen 标签不能把它升级成高质量 demonstration。",
|
||||||
|
},
|
||||||
|
disagree: {
|
||||||
|
a: { title: "直接纠错", copy: "明确指出用户前提错误,事实准确但语气生硬。", fact: 94, help: 62, style: 28, length: 38 },
|
||||||
|
b: { title: "温和迎合", copy: "先认同用户,再给模糊建议;更悦耳但保留错误前提。", fact: 42, help: 66, style: 91, length: 58 },
|
||||||
|
weights: [48, 50, 55, 8], noise: 38,
|
||||||
|
reading: "当标注者在“直接事实”与“关系体验”之间分歧,单一标量会把差异压成平均偏好。",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
let currentPreference = preferenceProfiles.evidence;
|
||||||
|
const weightInputs = [...root.querySelectorAll<HTMLInputElement>("[data-rm-weight]")];
|
||||||
|
const noiseInput = root.querySelector<HTMLInputElement>("[data-rm-noise]");
|
||||||
|
const updateAnswer = (side: "a" | "b", answer: Answer) => {
|
||||||
|
setText(`[data-answer-title="${side}"]`, answer.title);
|
||||||
|
setText(`[data-answer-copy="${side}"]`, answer.copy);
|
||||||
|
(["fact", "help", "style", "length"] as const).forEach((feature) => {
|
||||||
|
setText(`[data-feature="${side}-${feature}"]`, String(answer[feature]));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const renderPreference = () => {
|
||||||
|
const weights = Object.fromEntries(weightInputs.map((input) => [input.dataset.rmWeight ?? "", Number(input.value) / 100])) as Record<string, number>;
|
||||||
|
const noise = Number(noiseInput?.value ?? 0) / 100;
|
||||||
|
const score = (answer: Answer) => (
|
||||||
|
answer.fact * weights.fact +
|
||||||
|
answer.help * weights.help +
|
||||||
|
answer.style * weights.style +
|
||||||
|
answer.length * weights.length
|
||||||
|
) / 100 - 0.95;
|
||||||
|
const rewardA = score(currentPreference.a);
|
||||||
|
const rewardB = score(currentPreference.b);
|
||||||
|
const cleanProbability = sigmoid(rewardA - rewardB);
|
||||||
|
const probability = cleanProbability * (1 - noise) + 0.5 * noise;
|
||||||
|
setText('[data-reward="a"]', `${rewardA >= 0 ? "+" : ""}${rewardA.toFixed(2)}`);
|
||||||
|
setText('[data-reward="b"]', `${rewardB >= 0 ? "+" : ""}${rewardB.toFixed(2)}`);
|
||||||
|
setText("[data-pref-probability]", `${Math.round(probability * 100)}%`);
|
||||||
|
setText("[data-pref-choice]", probability >= 0.5 ? "P(A ≻ B)" : "P(B ≻ A)");
|
||||||
|
const meter = root.querySelector<HTMLElement>("[data-pref-meter]");
|
||||||
|
if (meter) meter.style.width = `${probability * 100}%`;
|
||||||
|
weightInputs.forEach((input) => {
|
||||||
|
const key = input.dataset.rmWeight ?? "";
|
||||||
|
setText(`[data-rm-label="${key}"]`, (Number(input.value) / 100).toFixed(2));
|
||||||
|
});
|
||||||
|
setText("[data-rm-noise-label]", `${Math.round(noise * 100)}%`);
|
||||||
|
setText("[data-pref-reading]", currentPreference.reading);
|
||||||
|
};
|
||||||
|
root.querySelectorAll<HTMLButtonElement>("[data-pref-preset]").forEach((button) => {
|
||||||
|
button.addEventListener("click", () => {
|
||||||
|
currentPreference = preferenceProfiles[button.dataset.prefPreset ?? "evidence"];
|
||||||
|
updateAnswer("a", currentPreference.a);
|
||||||
|
updateAnswer("b", currentPreference.b);
|
||||||
|
weightInputs.forEach((input, index) => { input.value = String(currentPreference.weights[index]); });
|
||||||
|
if (noiseInput) noiseInput.value = String(currentPreference.noise);
|
||||||
|
root.querySelectorAll<HTMLButtonElement>("[data-pref-preset]").forEach((item) => item.classList.toggle("active", item === button));
|
||||||
|
renderPreference();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
[...weightInputs, noiseInput].forEach((input) => input?.addEventListener("input", renderPreference));
|
||||||
|
renderPreference();
|
||||||
|
|
||||||
|
let updateMethod = "ppo";
|
||||||
|
const gapInput = root.querySelector<HTMLInputElement>("[data-update-gap]");
|
||||||
|
const betaInput = root.querySelector<HTMLInputElement>("[data-update-beta]");
|
||||||
|
const shiftInput = root.querySelector<HTMLInputElement>("[data-update-shift]");
|
||||||
|
const staleInput = root.querySelector<HTMLInputElement>("[data-update-stale]");
|
||||||
|
const renderUpdate = () => {
|
||||||
|
const gap = Number(gapInput?.value ?? 80) / 100;
|
||||||
|
const beta = Number(betaInput?.value ?? 25) / 100;
|
||||||
|
const shift = Number(shiftInput?.value ?? 40) / 100;
|
||||||
|
const stale = Number(staleInput?.value ?? 15) / 100;
|
||||||
|
setText("[data-update-gap-label]", `${gap >= 0 ? "+" : ""}${gap.toFixed(2)}`);
|
||||||
|
setText("[data-update-beta-label]", beta.toFixed(2));
|
||||||
|
setText("[data-update-shift-label]", `${shift >= 0 ? "+" : ""}${shift.toFixed(2)}`);
|
||||||
|
setText("[data-update-stale-label]", `${Math.round(stale * 100)}%`);
|
||||||
|
root.querySelectorAll<HTMLButtonElement>("[data-update-method]").forEach((button) => {
|
||||||
|
button.classList.toggle("active", button.dataset.updateMethod === updateMethod);
|
||||||
|
});
|
||||||
|
if (updateMethod === "ppo") {
|
||||||
|
const ratio = Math.exp(shift * (1 + stale));
|
||||||
|
const clipped = clamp(ratio, 0.8, 1.2);
|
||||||
|
const signal = Math.min(ratio * gap, clipped * gap) - beta * Math.abs(shift);
|
||||||
|
["Current policy rollout", "Reward model score", "Advantage + critic", "Clipped policy update"].forEach((step, index) => setText(`[data-update-step="${index}"]`, step));
|
||||||
|
setText("[data-update-signal]", `${signal >= 0 ? "+" : ""}${signal.toFixed(2)}`);
|
||||||
|
setText("[data-update-signal-note]", "RM advantage 经 PPO clip 与 KL 后的教学量");
|
||||||
|
setText("[data-update-models]", "4");
|
||||||
|
setText("[data-update-model-note]", "policy · reference · RM · value");
|
||||||
|
setText("[data-update-regime]", "ONLINE");
|
||||||
|
setText("[data-update-regime-note]", "需要接近当前 policy 的 rollout");
|
||||||
|
setText("[data-update-kicker]", "PPO SKETCH");
|
||||||
|
setText("[data-update-equation]", "min(ρA, clip(ρ)A) − β KL(π || πref)");
|
||||||
|
setText("[data-update-reading]", stale > 0.55
|
||||||
|
? "rollout 已明显陈旧;importance ratio、critic 与长轨迹 credit 会让更新更脆弱。"
|
||||||
|
: "PPO 显式消费 rollout 与 scalar reward;clip 约束单次 policy 位移,但不修复错误奖励。");
|
||||||
|
} else {
|
||||||
|
const implicitMargin = beta * (gap - shift * stale);
|
||||||
|
const loss = -Math.log(sigmoid(implicitMargin));
|
||||||
|
["Fixed preference pairs", "Policy / reference log-probs", "Implicit reward margin", "Classification-style update"].forEach((step, index) => setText(`[data-update-step="${index}"]`, step));
|
||||||
|
setText("[data-update-signal]", implicitMargin.toFixed(2));
|
||||||
|
setText("[data-update-signal-note]", "β × chosen/rejected 的相对 log-ratio margin");
|
||||||
|
setText("[data-update-models]", "2");
|
||||||
|
setText("[data-update-model-note]", "trainable policy · frozen reference");
|
||||||
|
setText("[data-update-regime]", "OFFLINE");
|
||||||
|
setText("[data-update-regime-note]", "经典 DPO 不在训练中向当前 policy 采样");
|
||||||
|
setText("[data-update-kicker]", "DPO SKETCH");
|
||||||
|
setText("[data-update-equation]", `−log σ(β Δlog(π/πref)) = ${loss.toFixed(2)}`);
|
||||||
|
setText("[data-update-reading]", stale > 0.55
|
||||||
|
? "pair 与当前 policy 差距很大:目标仍能计算,但它回答的是旧候选分布上的偏好。"
|
||||||
|
: "DPO 省去显式 RM 与在线 RL loop;偏好 pair、reference、β 和分布匹配仍然存在。");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
root.querySelectorAll<HTMLButtonElement>("[data-update-method]").forEach((button) => {
|
||||||
|
button.addEventListener("click", () => {
|
||||||
|
updateMethod = button.dataset.updateMethod ?? "ppo";
|
||||||
|
renderUpdate();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
[gapInput, betaInput, shiftInput, staleInput].forEach((input) => input?.addEventListener("input", renderUpdate));
|
||||||
|
renderUpdate();
|
||||||
|
|
||||||
|
const recipeButtons = [...root.querySelectorAll<HTMLButtonElement>("[data-recipe-id]")];
|
||||||
|
const renderRecipe = (id: string) => {
|
||||||
|
const recipe = recipes.find((item) => item.id === id) ?? recipes[0];
|
||||||
|
recipeButtons.forEach((button) => button.classList.toggle("active", button.dataset.recipeId === recipe.id));
|
||||||
|
const stepNodes = [...root.querySelectorAll<HTMLElement>("[data-recipe-step]")];
|
||||||
|
stepNodes.forEach((node, index) => { node.textContent = recipe.path[index] ?? ""; });
|
||||||
|
(["family", "feedback", "regime", "granularity", "models", "constraints", "risk"] as const).forEach((field) => {
|
||||||
|
setText(`[data-recipe-${field}]`, recipe[field]);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
recipeButtons.forEach((button) => button.addEventListener("click", () => renderRecipe(button.dataset.recipeId ?? "instructgpt")));
|
||||||
|
renderRecipe("instructgpt");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.alignment-lab {
|
||||||
|
max-width: 1020px;
|
||||||
|
margin: 42px 0;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
background: var(--paper-raised);
|
||||||
|
}
|
||||||
|
|
||||||
|
.lab-heading,
|
||||||
|
.panel-intro {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr minmax(250px, 350px);
|
||||||
|
gap: 34px;
|
||||||
|
align-items: end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lab-heading {
|
||||||
|
padding: 30px;
|
||||||
|
border-bottom: 1px solid var(--line);
|
||||||
|
}
|
||||||
|
|
||||||
|
.lab-heading h3 {
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 1.55rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lab-heading p,
|
||||||
|
.panel-intro p {
|
||||||
|
color: var(--muted);
|
||||||
|
font-size: .72rem;
|
||||||
|
line-height: 1.75;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lab-tabs {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
|
border-bottom: 1px solid var(--line);
|
||||||
|
}
|
||||||
|
|
||||||
|
.lab-tabs button {
|
||||||
|
display: grid;
|
||||||
|
gap: 7px;
|
||||||
|
min-height: 92px;
|
||||||
|
padding: 15px 17px;
|
||||||
|
border: 0;
|
||||||
|
border-right: 1px solid var(--line);
|
||||||
|
background: transparent;
|
||||||
|
color: var(--muted);
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lab-tabs button:last-child { border-right: 0; }
|
||||||
|
.lab-tabs button[aria-selected="true"] { color: white; background: var(--navy); }
|
||||||
|
.lab-tabs span,
|
||||||
|
.panel-intro span,
|
||||||
|
.preference-grid > article > span,
|
||||||
|
.versus span,
|
||||||
|
.risk-strip span,
|
||||||
|
.equation-card span {
|
||||||
|
color: var(--copper);
|
||||||
|
font: .58rem/1.2 var(--mono);
|
||||||
|
letter-spacing: .09em;
|
||||||
|
}
|
||||||
|
.lab-tabs b { font: 600 .85rem/1.15 var(--sans); }
|
||||||
|
.lab-tabs small { font: .54rem/1.2 var(--mono); }
|
||||||
|
|
||||||
|
.lab-panel { padding: 30px; }
|
||||||
|
.panel-intro { margin-bottom: 28px; }
|
||||||
|
.panel-intro h4 { margin-top: 8px; font-size: 1.28rem; }
|
||||||
|
|
||||||
|
.mode-switch,
|
||||||
|
.preference-presets,
|
||||||
|
.update-switch,
|
||||||
|
.recipe-selector {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mode-switch button,
|
||||||
|
.preference-presets button,
|
||||||
|
.update-switch button,
|
||||||
|
.recipe-selector button {
|
||||||
|
padding: 10px 13px;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
background: var(--paper);
|
||||||
|
color: var(--muted);
|
||||||
|
font: .62rem var(--mono);
|
||||||
|
}
|
||||||
|
|
||||||
|
.mode-switch button.active,
|
||||||
|
.preference-presets button.active,
|
||||||
|
.update-switch button.active,
|
||||||
|
.recipe-selector button.active {
|
||||||
|
border-color: var(--navy);
|
||||||
|
background: var(--navy);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sft-controls {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 20px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sft-controls label,
|
||||||
|
.update-controls label,
|
||||||
|
.rm-controls label {
|
||||||
|
color: var(--muted);
|
||||||
|
font: .62rem var(--mono);
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
min-height: 38px;
|
||||||
|
margin-left: 8px;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
background: var(--paper);
|
||||||
|
color: var(--ink);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sft-sequence {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||||
|
gap: 1px;
|
||||||
|
margin-top: 24px;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
background: var(--line);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sft-sequence > div {
|
||||||
|
min-height: 126px;
|
||||||
|
padding: 13px;
|
||||||
|
background: var(--paper);
|
||||||
|
opacity: .56;
|
||||||
|
}
|
||||||
|
.sft-sequence > div[data-active] { opacity: 1; box-shadow: inset 0 -3px var(--copper); }
|
||||||
|
.sft-sequence > div[data-role="response"] { background: #f0eadf; }
|
||||||
|
.sft-sequence span { color: var(--muted); font: .5rem var(--mono); }
|
||||||
|
.sft-sequence b { display: block; min-height: 42px; margin: 12px 0; font-size: .7rem; }
|
||||||
|
.sft-sequence i { display: flex; justify-content: space-between; gap: 6px; font-style: normal; }
|
||||||
|
.sft-sequence em { color: var(--navy); font: normal 600 .62rem var(--mono); }
|
||||||
|
.sft-sequence small { color: var(--copper); font: .52rem var(--mono); }
|
||||||
|
|
||||||
|
.metric-row {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
gap: 1px;
|
||||||
|
margin-top: 24px;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
background: var(--line);
|
||||||
|
}
|
||||||
|
.metric-row article { padding: 18px; background: var(--paper); }
|
||||||
|
.metric-row span { color: var(--muted); font: .52rem var(--mono); }
|
||||||
|
.metric-row b { display: block; margin: 11px 0 6px; color: var(--navy); font: 600 1.25rem var(--serif); }
|
||||||
|
.metric-row p { margin: 0; color: var(--muted); font-size: .62rem; }
|
||||||
|
|
||||||
|
.lab-takeaway {
|
||||||
|
margin-top: 20px;
|
||||||
|
padding: 18px 20px;
|
||||||
|
border-left: 3px solid var(--copper);
|
||||||
|
background: #f1eadf;
|
||||||
|
}
|
||||||
|
.lab-takeaway b { color: var(--navy); }
|
||||||
|
.lab-takeaway p { margin: 8px 0 0; color: var(--muted); font-size: .7rem; }
|
||||||
|
|
||||||
|
.preference-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 120px 1fr;
|
||||||
|
gap: 1px;
|
||||||
|
margin-top: 22px;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
background: var(--line);
|
||||||
|
}
|
||||||
|
.preference-grid > article { padding: 20px; background: var(--paper); }
|
||||||
|
.preference-grid h4 { margin: 10px 0; font-size: 1rem; }
|
||||||
|
.preference-grid p { min-height: 64px; color: var(--muted); font-size: .68rem; }
|
||||||
|
.preference-grid dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 18px 0; background: var(--line); }
|
||||||
|
.preference-grid dl div { padding: 9px 5px; background: white; text-align: center; }
|
||||||
|
.preference-grid dt { color: var(--muted); font: .48rem var(--mono); }
|
||||||
|
.preference-grid dd { margin: 6px 0 0; font: 600 .72rem var(--mono); }
|
||||||
|
.preference-grid article > strong { color: var(--navy); font: 600 1.35rem var(--serif); }
|
||||||
|
|
||||||
|
.versus {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 12px;
|
||||||
|
background: var(--navy);
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.versus b { font: 600 1.6rem var(--serif); }
|
||||||
|
.versus small { font: .5rem var(--mono); }
|
||||||
|
.versus i { width: 100%; height: 5px; background: #526477; }
|
||||||
|
.versus em { display: block; height: 100%; background: var(--copper); }
|
||||||
|
|
||||||
|
.rm-controls,
|
||||||
|
.update-controls {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||||
|
gap: 14px;
|
||||||
|
margin-top: 20px;
|
||||||
|
padding: 18px;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
background: #f7f3eb;
|
||||||
|
}
|
||||||
|
.rm-controls label,
|
||||||
|
.update-controls label { display: grid; gap: 8px; }
|
||||||
|
input[type="range"] { width: 100%; accent-color: var(--copper); }
|
||||||
|
output { color: var(--navy); font-weight: 700; }
|
||||||
|
|
||||||
|
.update-workbench {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 300px;
|
||||||
|
gap: 22px;
|
||||||
|
margin-top: 22px;
|
||||||
|
}
|
||||||
|
.update-flow {
|
||||||
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
.update-flow div {
|
||||||
|
display: grid;
|
||||||
|
flex: 1;
|
||||||
|
align-content: center;
|
||||||
|
gap: 8px;
|
||||||
|
min-height: 124px;
|
||||||
|
padding: 14px;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
background: var(--paper);
|
||||||
|
}
|
||||||
|
.update-flow span,
|
||||||
|
.recipe-path span { color: var(--copper); font: .55rem var(--mono); }
|
||||||
|
.update-flow b { font-size: .67rem; }
|
||||||
|
.update-flow i { align-self: center; color: var(--copper); font-style: normal; }
|
||||||
|
.update-controls { grid-template-columns: 1fr; margin: 0; }
|
||||||
|
|
||||||
|
.equation-card {
|
||||||
|
margin-top: 20px;
|
||||||
|
padding: 20px;
|
||||||
|
background: #25364b;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.equation-card code { display: block; margin: 12px 0; color: #fff; font-size: .82rem; }
|
||||||
|
.equation-card p { margin: 0; color: #c0cbd8; font-size: .67rem; }
|
||||||
|
|
||||||
|
.recipe-selector button { display: grid; gap: 5px; }
|
||||||
|
.recipe-selector button span { color: inherit; font-size: .48rem; }
|
||||||
|
.recipe-layout {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(280px, .85fr) 1.15fr;
|
||||||
|
gap: 24px;
|
||||||
|
margin-top: 24px;
|
||||||
|
}
|
||||||
|
.recipe-path { display: grid; gap: 1px; border: 1px solid var(--line); background: var(--line); }
|
||||||
|
.recipe-path div { display: grid; grid-template-columns: 42px 1fr; align-items: center; min-height: 58px; padding: 10px 14px; background: var(--paper); }
|
||||||
|
.recipe-path b { font-size: .7rem; }
|
||||||
|
.recipe-contract { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); }
|
||||||
|
.recipe-contract div { padding: 14px; background: var(--paper); }
|
||||||
|
.recipe-contract dt { color: var(--muted); font: .5rem var(--mono); }
|
||||||
|
.recipe-contract dd { margin: 8px 0 0; font-size: .66rem; line-height: 1.5; }
|
||||||
|
.risk-strip { margin-top: 20px; padding: 20px; border: 1px solid #7a6549; background: #efe6d8; }
|
||||||
|
.risk-strip b { display: block; margin: 9px 0; color: #6c3c29; }
|
||||||
|
.risk-strip p { margin: 0; color: var(--muted); font-size: .66rem; }
|
||||||
|
|
||||||
|
figcaption {
|
||||||
|
padding: 18px 30px;
|
||||||
|
border-top: 1px solid var(--line);
|
||||||
|
color: var(--muted);
|
||||||
|
font-size: .64rem;
|
||||||
|
}
|
||||||
|
figcaption b { margin-right: 9px; color: var(--copper); font-family: var(--mono); }
|
||||||
|
|
||||||
|
@media (max-width: 820px) {
|
||||||
|
.lab-heading,
|
||||||
|
.panel-intro,
|
||||||
|
.update-workbench,
|
||||||
|
.recipe-layout { grid-template-columns: 1fr; }
|
||||||
|
.lab-tabs { grid-template-columns: 1fr 1fr; }
|
||||||
|
.lab-tabs button:nth-child(2) { border-right: 0; }
|
||||||
|
.sft-sequence { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||||||
|
.preference-grid { grid-template-columns: 1fr; }
|
||||||
|
.versus { min-height: 110px; }
|
||||||
|
.rm-controls { grid-template-columns: 1fr 1fr; }
|
||||||
|
.update-flow { display: grid; grid-template-columns: 1fr 1fr; }
|
||||||
|
.update-flow > i { display: none; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 520px) {
|
||||||
|
.lab-heading,
|
||||||
|
.lab-panel { padding: 20px; }
|
||||||
|
.lab-tabs { grid-template-columns: 1fr; }
|
||||||
|
.lab-tabs button { border-right: 0; border-bottom: 1px solid var(--line); }
|
||||||
|
.sft-controls { align-items: stretch; flex-direction: column; }
|
||||||
|
.sft-controls select { width: 100%; margin: 8px 0 0; }
|
||||||
|
.sft-sequence,
|
||||||
|
.metric-row,
|
||||||
|
.rm-controls,
|
||||||
|
.recipe-contract,
|
||||||
|
.update-flow { grid-template-columns: 1fr; }
|
||||||
|
.preference-grid dl { grid-template-columns: 1fr 1fr; }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -14,6 +14,7 @@ const items = [
|
|||||||
{ id: "data", href: "/pretraining/data/", label: "数据工程" },
|
{ id: "data", href: "/pretraining/data/", label: "数据工程" },
|
||||||
{ id: "moe", href: "/moe/", label: "MoE" },
|
{ id: "moe", href: "/moe/", label: "MoE" },
|
||||||
{ id: "long-context", href: "/long-context/", label: "长上下文" },
|
{ id: "long-context", href: "/long-context/", label: "长上下文" },
|
||||||
|
{ id: "alignment", href: "/post-training/alignment/", label: "后训练" },
|
||||||
{ id: "reasoning", href: "/reasoning/", label: "推理" },
|
{ id: "reasoning", href: "/reasoning/", label: "推理" },
|
||||||
{ id: "training-systems", href: "/training-systems/", label: "训练系统" },
|
{ id: "training-systems", href: "/training-systems/", label: "训练系统" },
|
||||||
{ id: "numerics", href: "/systems/numerics/", label: "数值" },
|
{ id: "numerics", href: "/systems/numerics/", label: "数值" },
|
||||||
|
|||||||
@@ -151,12 +151,12 @@ export const chapters: Chapter[] = [
|
|||||||
title: "指令微调与人类偏好",
|
title: "指令微调与人类偏好",
|
||||||
kicker: "ALIGNMENT",
|
kicker: "ALIGNMENT",
|
||||||
question: "会续写的 base model,怎样变成愿意协作的助手?",
|
question: "会续写的 base model,怎样变成愿意协作的助手?",
|
||||||
summary: "从 instruction tuning、SFT、RLHF/PPO 到 DPO 与 RLAIF,区分能力学习和行为塑形。",
|
summary: "用十二张账拆开 instruction tuning、SFT、偏好数据、奖励模型、RLHF/PPO、RLAIF、DPO 与 RLVR,并追到 DeepSeek 和 K3。",
|
||||||
status: "queued",
|
status: "published",
|
||||||
progress: 10,
|
progress: 75,
|
||||||
papers: 18,
|
papers: 44,
|
||||||
prerequisites: ["01", "02"],
|
prerequisites: ["01", "02"],
|
||||||
highlights: ["SFT", "奖励模型", "偏好优化"],
|
highlights: ["十二张对齐账", "四联实验", "DeepSeek / K3"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
number: "11",
|
number: "11",
|
||||||
|
|||||||
@@ -1651,6 +1651,182 @@ export const papers: Paper[] = [
|
|||||||
contribution: "把偏好优化改写为直接分类目标,省去在线 RL loop。",
|
contribution: "把偏好优化改写为直接分类目标,省去在线 RL loop。",
|
||||||
verified: true,
|
verified: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
year: 2017,
|
||||||
|
title: "Deep Reinforcement Learning from Human Preferences",
|
||||||
|
url: "https://proceedings.neurips.cc/paper/2017/hash/d5e2c0adad503c91f91df240d0cd4e49-Abstract.html",
|
||||||
|
topics: ["后训练"],
|
||||||
|
contribution: "把人类对轨迹片段的成对比较拟合成奖励预测器,再用预测奖励优化策略。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2019,
|
||||||
|
title: "Fine-Tuning Language Models from Human Preferences",
|
||||||
|
url: "https://arxiv.org/abs/1909.08593",
|
||||||
|
topics: ["后训练"],
|
||||||
|
contribution: "把偏好奖励、reference KL 与 PPO 接到生成式语言模型,是现代语言模型 RLHF 的直接前身。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2021,
|
||||||
|
title: "Natural Instructions: Benchmarking Generalization to New Tasks from Natural Language Instructions",
|
||||||
|
url: "https://arxiv.org/abs/2104.08773",
|
||||||
|
topics: ["后训练", "评测"],
|
||||||
|
contribution: "把任务定义写成声明式自然语言说明,系统检验模型对未见任务的 instruction generalization。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2022,
|
||||||
|
title: "Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedback",
|
||||||
|
url: "https://arxiv.org/abs/2204.05862",
|
||||||
|
topics: ["后训练"],
|
||||||
|
contribution: "把 helpfulness 与 harmlessness 分开收集偏好并研究在线迭代,揭示通用助手对齐的多目标性质。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2022,
|
||||||
|
title: "Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Tasks",
|
||||||
|
url: "https://arxiv.org/abs/2204.07705",
|
||||||
|
topics: ["后训练", "评测"],
|
||||||
|
contribution: "把自然语言任务定义扩展到 1,600 余个任务,检验跨任务和跨类型泛化。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2022,
|
||||||
|
title: "Scaling Instruction-Finetuned Language Models",
|
||||||
|
url: "https://arxiv.org/abs/2210.11416",
|
||||||
|
topics: ["后训练", "Scaling"],
|
||||||
|
contribution: "联合扩展 Flan 的任务混合、模型规模与 chain-of-thought 数据,研究 instruction tuning 的规模效应。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2022,
|
||||||
|
title: "Scaling Laws for Reward Model Overoptimization",
|
||||||
|
url: "https://arxiv.org/abs/2210.10760",
|
||||||
|
topics: ["后训练", "Scaling", "评测"],
|
||||||
|
contribution: "在 proxy reward 与 gold reward 的受控设置中量化 Goodhart 曲线,展示继续追高代理奖励何时反而伤害真实目标。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2023,
|
||||||
|
title: "OpenAssistant Conversations: Democratizing Large Language Model Alignment",
|
||||||
|
url: "https://arxiv.org/abs/2304.07327",
|
||||||
|
topics: ["后训练", "数据"],
|
||||||
|
contribution: "开放多轮对话树、候选排序和标注流程,为可复查的助手后训练数据提供公共基线。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2023,
|
||||||
|
title: "RRHF: Rank Responses to Align Language Models with Human Feedback",
|
||||||
|
url: "https://arxiv.org/abs/2304.05302",
|
||||||
|
topics: ["后训练"],
|
||||||
|
contribution: "用回答序列得分的排序约束让模型学习多来源候选的相对质量。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2023,
|
||||||
|
title: "SLiC-HF: Sequence Likelihood Calibration with Human Feedback",
|
||||||
|
url: "https://arxiv.org/abs/2305.10425",
|
||||||
|
topics: ["后训练"],
|
||||||
|
contribution: "直接校准 chosen 与 rejected 回答的序列似然,为不运行在线 RL 的偏好训练提供早期路线。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2023,
|
||||||
|
title: "LIMA: Less Is More for Alignment",
|
||||||
|
url: "https://arxiv.org/abs/2305.11206",
|
||||||
|
topics: ["后训练", "数据"],
|
||||||
|
contribution: "用约一千条精选示范检验强基座上少量高质量 SFT 的接口塑形能力,并明确其适用边界。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2023,
|
||||||
|
title: "AlpacaFarm: A Simulation Framework for Methods that Learn from Human Feedback",
|
||||||
|
url: "https://arxiv.org/abs/2305.14387",
|
||||||
|
topics: ["后训练", "评测"],
|
||||||
|
contribution: "提供模拟偏好、自动评测与多种 RLHF 基线,降低比较后训练方法的实验成本。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2023,
|
||||||
|
title: "RLAIF: Scaling Reinforcement Learning from Human Feedback with AI Feedback",
|
||||||
|
url: "https://arxiv.org/abs/2309.00267",
|
||||||
|
topics: ["后训练", "评测"],
|
||||||
|
contribution: "在摘要、helpful 与 harmless 场景直接比较 AI 和人工偏好标签,而不是把 AI feedback 当作无价值来源。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2023,
|
||||||
|
title: "UltraFeedback: Boosting Language Models with Scaled AI Feedback",
|
||||||
|
url: "https://arxiv.org/abs/2310.01377",
|
||||||
|
topics: ["后训练", "数据"],
|
||||||
|
contribution: "规模化生成多候选、多维度 AI 反馈,成为开放偏好训练与直接优化的重要数据来源。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2023,
|
||||||
|
title: "A General Theoretical Paradigm to Understand Learning from Human Preferences",
|
||||||
|
url: "https://arxiv.org/abs/2310.12036",
|
||||||
|
topics: ["后训练"],
|
||||||
|
contribution: "分析确定性偏好下 DPO 的过拟合边界,并以有限间隔回归提出 IPO。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2023,
|
||||||
|
title: "Zephyr: Direct Distillation of LM Alignment",
|
||||||
|
url: "https://arxiv.org/abs/2310.16944",
|
||||||
|
topics: ["后训练"],
|
||||||
|
contribution: "以蒸馏式 SFT、UltraFeedback AI 偏好与直接偏好优化展示开放模型的完整对齐配方。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2024,
|
||||||
|
title: "KTO: Model Alignment as Prospect Theoretic Optimization",
|
||||||
|
url: "https://arxiv.org/abs/2402.01306",
|
||||||
|
topics: ["后训练"],
|
||||||
|
contribution: "用前景理论式效用处理 desirable / undesirable 二元反馈,放宽必须提供成对偏好的数据合同。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2024,
|
||||||
|
title: "Back to Basics: Revisiting REINFORCE Style Optimization for Learning from Human Feedback in LLMs",
|
||||||
|
url: "https://arxiv.org/abs/2402.14740",
|
||||||
|
topics: ["后训练"],
|
||||||
|
contribution: "以 leave-one-out baseline 重新建立 critic-free REINFORCE 基线,说明 PPO 不是在线 RLHF 的唯一实现。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2024,
|
||||||
|
title: "ORPO: Monolithic Preference Optimization without Reference Model",
|
||||||
|
url: "https://arxiv.org/abs/2403.07691",
|
||||||
|
topics: ["后训练"],
|
||||||
|
contribution: "把 SFT 负对数似然与 odds-ratio 偏好惩罚合成单阶段、无独立 reference model 的目标。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2024,
|
||||||
|
title: "RewardBench: Evaluating Reward Models for Language Modeling",
|
||||||
|
url: "https://arxiv.org/abs/2403.13787",
|
||||||
|
topics: ["后训练", "评测"],
|
||||||
|
contribution: "按 chat、hard、safety、reasoning 与分布外样本直接评估奖励模型的成对排序能力。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2024,
|
||||||
|
title: "SimPO: Simple Preference Optimization with a Reference-Free Reward",
|
||||||
|
url: "https://arxiv.org/abs/2405.14734",
|
||||||
|
topics: ["后训练"],
|
||||||
|
contribution: "用长度归一的平均 log-prob 与目标 margin 构造 reference-free implicit reward。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
year: 2024,
|
||||||
|
title: "Unpacking DPO and PPO: Disentangling Best Practices for Learning from Preference Feedback",
|
||||||
|
url: "https://proceedings.neurips.cc/paper_files/paper/2024/hash/404df2480b6eef0486a1679e371894b0-Abstract-Conference.html",
|
||||||
|
topics: ["后训练", "评测"],
|
||||||
|
contribution: "把 preference data、优化算法、奖励模型和 policy prompts 四个变量拆开,避免把配方差异误判为算法胜负。",
|
||||||
|
verified: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
year: 2022,
|
year: 2022,
|
||||||
title: "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models",
|
title: "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models",
|
||||||
|
|||||||
+29
-1
@@ -12,6 +12,7 @@ const routes: Record<string, string> = {
|
|||||||
"pretraining/data": "/pretraining/data/",
|
"pretraining/data": "/pretraining/data/",
|
||||||
moe: "/moe/",
|
moe: "/moe/",
|
||||||
"long-context": "/long-context/",
|
"long-context": "/long-context/",
|
||||||
|
"post-training/alignment": "/post-training/alignment/",
|
||||||
reasoning: "/reasoning/",
|
reasoning: "/reasoning/",
|
||||||
"training-systems": "/training-systems/",
|
"training-systems": "/training-systems/",
|
||||||
"systems/numerics": "/systems/numerics/",
|
"systems/numerics": "/systems/numerics/",
|
||||||
@@ -88,6 +89,7 @@ const paths = [
|
|||||||
<a class="button" href="/pretraining/data/">数据工程专题</a>
|
<a class="button" href="/pretraining/data/">数据工程专题</a>
|
||||||
<a class="button" href="/moe/">MoE 专题</a>
|
<a class="button" href="/moe/">MoE 专题</a>
|
||||||
<a class="button" href="/long-context/">长上下文专题</a>
|
<a class="button" href="/long-context/">长上下文专题</a>
|
||||||
|
<a class="button" href="/post-training/alignment/">后训练与偏好专题</a>
|
||||||
<a class="button" href="/reasoning/">推理专题</a>
|
<a class="button" href="/reasoning/">推理专题</a>
|
||||||
<a class="button" href="/training-systems/">训练系统专题</a>
|
<a class="button" href="/training-systems/">训练系统专题</a>
|
||||||
<a class="button" href="/systems/numerics/">数值与优化专题</a>
|
<a class="button" href="/systems/numerics/">数值与优化专题</a>
|
||||||
@@ -100,7 +102,7 @@ const paths = [
|
|||||||
<div class="hero-stats">
|
<div class="hero-stats">
|
||||||
<div><b>16</b><span>核心专题</span></div>
|
<div><b>16</b><span>核心专题</span></div>
|
||||||
<div><b>151</b><span>K3 报告来源</span></div>
|
<div><b>151</b><span>K3 报告来源</span></div>
|
||||||
<div><b>258</b><span>关键论文索引</span></div>
|
<div><b>280</b><span>关键论文索引</span></div>
|
||||||
<div><b>47p</b><span>K3 技术报告</span></div>
|
<div><b>47p</b><span>K3 技术报告</span></div>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
@@ -114,6 +116,22 @@ const paths = [
|
|||||||
|
|
||||||
<section class="section compact release-section" id="new-chapters">
|
<section class="section compact release-section" id="new-chapters">
|
||||||
<div class="release-grid">
|
<div class="release-grid">
|
||||||
|
<a class="release-card alignment-release" href="/post-training/alignment/">
|
||||||
|
<div>
|
||||||
|
<p class="eyebrow"><span>NEW / CHAPTER 10</span> ALIGNMENT · PREFERENCE</p>
|
||||||
|
<h2>DPO 没有“消灭 RLHF”,RLHF 也不等于只跑一次 PPO</h2>
|
||||||
|
<p>
|
||||||
|
用目标、监督、来源、SFT、偏好、奖励、更新、分布、约束、失效与证据十二张账,
|
||||||
|
从 2017 人类偏好学习一路走到 InstructGPT、Constitutional AI、DPO、DeepSeek-R1/V4 与 Kimi K3。
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<dl>
|
||||||
|
<div><dt>LINEAGE</dt><dd>2017 → 2026</dd></div>
|
||||||
|
<div><dt>PAPERS</dt><dd>44 个一手节点</dd></div>
|
||||||
|
<div><dt>LAB</dt><dd>SFT · RM · PPO/DPO · 配方比较</dd></div>
|
||||||
|
</dl>
|
||||||
|
<span class="release-arrow" aria-hidden="true">从 Base Model 进入可协作助手 →</span>
|
||||||
|
</a>
|
||||||
<a class="release-card transformer-release" href="/foundations/">
|
<a class="release-card transformer-release" href="/foundations/">
|
||||||
<div>
|
<div>
|
||||||
<p class="eyebrow"><span>NEW / CHAPTER 02</span> ATTENTION · TRANSFORMER</p>
|
<p class="eyebrow"><span>NEW / CHAPTER 02</span> ATTENTION · TRANSFORMER</p>
|
||||||
@@ -491,6 +509,7 @@ const paths = [
|
|||||||
transition: transform 180ms ease, border-color 180ms ease;
|
transition: transform 180ms ease, border-color 180ms ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.alignment-release,
|
||||||
.transformer-release,
|
.transformer-release,
|
||||||
.foundation-release,
|
.foundation-release,
|
||||||
.numerics-release,
|
.numerics-release,
|
||||||
@@ -502,6 +521,14 @@ const paths = [
|
|||||||
min-height: 510px;
|
min-height: 510px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.alignment-release {
|
||||||
|
background:
|
||||||
|
radial-gradient(circle at 82% 18%, rgba(134, 76, 76, 0.2), transparent 30%),
|
||||||
|
radial-gradient(circle at 62% 74%, rgba(76, 118, 112, 0.11), transparent 28%),
|
||||||
|
repeating-linear-gradient(90deg, transparent 0 72px, rgba(134, 76, 76, 0.04) 72px 73px),
|
||||||
|
var(--paper-raised);
|
||||||
|
}
|
||||||
|
|
||||||
.numerics-release {
|
.numerics-release {
|
||||||
background:
|
background:
|
||||||
radial-gradient(circle at 82% 18%, rgba(113, 82, 137, 0.2), transparent 30%),
|
radial-gradient(circle at 82% 18%, rgba(113, 82, 137, 0.2), transparent 30%),
|
||||||
@@ -616,6 +643,7 @@ const paths = [
|
|||||||
padding-bottom: 76px;
|
padding-bottom: 76px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.alignment-release,
|
||||||
.transformer-release,
|
.transformer-release,
|
||||||
.foundation-release,
|
.foundation-release,
|
||||||
.numerics-release,
|
.numerics-release,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,7 @@ const workstreams = [
|
|||||||
{ label: "Scaling Laws", value: 74, next: "加入真实拟合复现、置信区间与更多模型族对照" },
|
{ label: "Scaling Laws", value: 74, next: "加入真实拟合复现、置信区间与更多模型族对照" },
|
||||||
{ label: "数据工程与预训练配方", value: 73, next: "逐图精读 FineWeb / DCLM,加入真实去重与 mixture traces" },
|
{ label: "数据工程与预训练配方", value: 73, next: "逐图精读 FineWeb / DCLM,加入真实去重与 mixture traces" },
|
||||||
{ label: "DeepSeek 专题", value: 71, next: "补 R1 / DAPO 的逐图训练轨迹与复现对照" },
|
{ label: "DeepSeek 专题", value: 71, next: "补 R1 / DAPO 的逐图训练轨迹与复现对照" },
|
||||||
|
{ label: "指令微调与人类偏好", value: 75, next: "加入真实偏好分歧样本、RM 长度偏置与 PPO/DPO 小模型复现" },
|
||||||
{ label: "推理与测试时扩展", value: 76, next: "真实模型采样曲线、PRM 案例与逐篇图表精读" },
|
{ label: "推理与测试时扩展", value: 76, next: "真实模型采样曲线、PRM 案例与逐篇图表精读" },
|
||||||
{ label: "稀疏计算与 MoE", value: 74, next: "补充真实集群 traces 与专家特化案例" },
|
{ label: "稀疏计算与 MoE", value: 74, next: "补充真实集群 traces 与专家特化案例" },
|
||||||
{ label: "长上下文专题", value: 72, next: "加入更多论文逐图笔记与真实模型配置对比" },
|
{ label: "长上下文专题", value: 72, next: "加入更多论文逐图笔记与真实模型配置对比" },
|
||||||
@@ -44,7 +45,7 @@ const workstreams = [
|
|||||||
<div><dt>OVERALL</dt><dd>专题平均 {average}%</dd></div>
|
<div><dt>OVERALL</dt><dd>专题平均 {average}%</dd></div>
|
||||||
<div><dt>READABLE</dt><dd>{published} 个首版可读专题</dd></div>
|
<div><dt>READABLE</dt><dd>{published} 个首版可读专题</dd></div>
|
||||||
<div><dt>ACTIVE</dt><dd>{researching} 个研究/写作中</dd></div>
|
<div><dt>ACTIVE</dt><dd>{researching} 个研究/写作中</dd></div>
|
||||||
<div><dt>UPDATED</dt><dd>2026-07-29 05:20 CST</dd></div>
|
<div><dt>UPDATED</dt><dd>2026-07-29 05:59 CST</dd></div>
|
||||||
<div><dt>MODE</dt><dd>持续迭代,不锁死版本</dd></div>
|
<div><dt>MODE</dt><dd>持续迭代,不锁死版本</dd></div>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
@@ -54,7 +55,7 @@ const workstreams = [
|
|||||||
<div class="section-heading">
|
<div class="section-heading">
|
||||||
<div>
|
<div>
|
||||||
<p class="eyebrow"><span>01</span> WORKSTREAMS</p>
|
<p class="eyebrow"><span>01</span> WORKSTREAMS</p>
|
||||||
<h2>十五条工作流同时推进,但不混淆“有页面”和“已核验”</h2>
|
<h2>十六条工作流同时推进,但不混淆“有页面”和“已核验”</h2>
|
||||||
</div>
|
</div>
|
||||||
<p class="section-lead">
|
<p class="section-lead">
|
||||||
内容首版优先打通全局脉络;随后每轮迭代选择一个专题推进到论文/工程层,并做独立事实复核。
|
内容首版优先打通全局脉络;随后每轮迭代选择一个专题推进到论文/工程层,并做独立事实复核。
|
||||||
@@ -91,8 +92,8 @@ const workstreams = [
|
|||||||
<article><span>✓</span><h3>K3 报告已结构化拆解</h3><p>47 页报告目录、151 条参考来源和架构/后训练/系统主线已经提取。</p></article>
|
<article><span>✓</span><h3>K3 报告已结构化拆解</h3><p>47 页报告目录、151 条参考来源和架构/后训练/系统主线已经提取。</p></article>
|
||||||
<article><span>✓</span><h3>16 专题知识图</h3><p>从语言模型基础到评测安全,包含先修依赖和三条贯穿案例。</p></article>
|
<article><span>✓</span><h3>16 专题知识图</h3><p>从语言模型基础到评测安全,包含先修依赖和三条贯穿案例。</p></article>
|
||||||
<article><span>✓</span><h3>编辑式网站系统</h3><p>响应式导航、章节模板、侧栏、进度、论文链和证据提示组件。</p></article>
|
<article><span>✓</span><h3>编辑式网站系统</h3><p>响应式导航、章节模板、侧栏、进度、论文链和证据提示组件。</p></article>
|
||||||
<article><span>✓</span><h3>三十一个原创交互视图</h3><p>K3、语言模型前史、Transformer 四联实验、DeepSeek、长上下文、MoE、推理,以及训练系统、Scaling、数据工程和数值专题。</p></article>
|
<article><span>✓</span><h3>三十五个原创交互视图</h3><p>K3、语言模型前史、Transformer、DeepSeek、长上下文、MoE、推理,以及训练系统、Scaling、数据工程、数值和 Alignment 专题。</p></article>
|
||||||
<article><span>✓</span><h3>十一篇首版长文</h3><p>K3、语言模型前史、Transformer、DeepSeek、Scaling、数据工程、长上下文、MoE、推理、训练系统与数值优化专题。</p></article>
|
<article><span>✓</span><h3>十二篇首版长文</h3><p>K3、语言模型前史、Transformer、DeepSeek、Scaling、数据工程、长上下文、MoE、后训练、推理、训练系统与数值优化专题。</p></article>
|
||||||
<article><span>✓</span><h3>语言模型前史深度专题</h3><p>八张独立问题账、33 个正式节点、20 段长文与概率—向量—记忆—对齐四联实验。</p></article>
|
<article><span>✓</span><h3>语言模型前史深度专题</h3><p>八张独立问题账、33 个正式节点、20 段长文与概率—向量—记忆—对齐四联实验。</p></article>
|
||||||
<article><span>✓</span><h3>Transformer 深度专题</h3><p>十张独立问题账、40 个正式节点、21 段正文与 QKV—Mask—多头位置—Block 成本四联实验。</p></article>
|
<article><span>✓</span><h3>Transformer 深度专题</h3><p>十张独立问题账、40 个正式节点、21 段正文与 QKV—Mask—多头位置—Block 成本四联实验。</p></article>
|
||||||
<article><span>✓</span><h3>Scaling Laws 深度专题</h3><p>九张账、29 个一手节点、DeepSeek/Kimi 双谱系与曲面—部署—复用—涌现四联实验。</p></article>
|
<article><span>✓</span><h3>Scaling Laws 深度专题</h3><p>九张账、29 个一手节点、DeepSeek/Kimi 双谱系与曲面—部署—复用—涌现四联实验。</p></article>
|
||||||
@@ -102,7 +103,8 @@ const workstreams = [
|
|||||||
<article><span>✓</span><h3>推理深度专题</h3><p>八张账、30 篇一手论文链、DeepSeek/Kimi 双主线与三页签互动实验室。</p></article>
|
<article><span>✓</span><h3>推理深度专题</h3><p>八张账、30 篇一手论文链、DeepSeek/Kimi 双主线与三页签互动实验室。</p></article>
|
||||||
<article><span>✓</span><h3>训练系统深度专题</h3><p>九张账、37 个一手节点、DeepSeek/Kimi 双谱系与显存—网格—气泡—通信实验室。</p></article>
|
<article><span>✓</span><h3>训练系统深度专题</h3><p>九张账、37 个一手节点、DeepSeek/Kimi 双谱系与显存—网格—气泡—通信实验室。</p></article>
|
||||||
<article><span>✓</span><h3>数值、优化器与稳定性深度专题</h3><p>十张账、36 个一手节点、K2/K3 与 DeepSeek-V3/V4 双谱系,以及格式—状态—更新—失稳四联实验。</p></article>
|
<article><span>✓</span><h3>数值、优化器与稳定性深度专题</h3><p>十张账、36 个一手节点、K2/K3 与 DeepSeek-V3/V4 双谱系,以及格式—状态—更新—失稳四联实验。</p></article>
|
||||||
<article><span>✓</span><h3>258 篇关键论文索引</h3><p>补齐 Residual/Norm、相对位置、UniLM、多头冗余、Attention 解释争论与 NormFormer 等 11 个节点。</p></article>
|
<article><span>✓</span><h3>指令微调与人类偏好深度专题</h3><p>十二张账、44 个一手节点、DeepSeek/Kimi 后训练双谱系,以及 SFT—RM—PPO/DPO—配方四联实验。</p></article>
|
||||||
|
<article><span>✓</span><h3>280 篇关键论文索引</h3><p>新增人类偏好学习、HH-RLHF、LIMA、RewardBench、RLAIF、KTO、ORPO、SimPO 等 22 个后训练节点。</p></article>
|
||||||
<article><span>✓</span><h3>公开仓库与自托管发布</h3><p>源码公开到 git.k1412.top,网站由不可变镜像、Compose Manager 与 HTTPS 交付。</p></article>
|
<article><span>✓</span><h3>公开仓库与自托管发布</h3><p>源码公开到 git.k1412.top,网站由不可变镜像、Compose Manager 与 HTTPS 交付。</p></article>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -126,6 +128,7 @@ const workstreams = [
|
|||||||
<div><span>P1</span><strong>长上下文二轮深化</strong><p>真实模型配置 → 内核细节 → 长上下文评测与失败案例</p><em>配置比较器 + 逐图论文笔记</em></div>
|
<div><span>P1</span><strong>长上下文二轮深化</strong><p>真实模型配置 → 内核细节 → 长上下文评测与失败案例</p><em>配置比较器 + 逐图论文笔记</em></div>
|
||||||
<div><span>P1</span><strong>MoE 二轮深化</strong><p>真实负载 traces → 专家特化可解释性 → 共享专家语义</p><em>案例库 + 集群证据</em></div>
|
<div><span>P1</span><strong>MoE 二轮深化</strong><p>真实负载 traces → 专家特化可解释性 → 共享专家语义</p><em>案例库 + 集群证据</em></div>
|
||||||
<div><span>P1</span><strong>推理二轮深化</strong><p>真实 pass@k 曲线 → PRM 失败案例 → 逐篇图表精读</p><em>案例库 + 真实 traces</em></div>
|
<div><span>P1</span><strong>推理二轮深化</strong><p>真实 pass@k 曲线 → PRM 失败案例 → 逐篇图表精读</p><em>案例库 + 真实 traces</em></div>
|
||||||
|
<div><span>P1</span><strong>Alignment 二轮深化</strong><p>真实偏好分歧 → RM 长度偏置 → PPO/DPO 小模型复现</p><em>数据案例 + 可复现实验</em></div>
|
||||||
<div><span>P2</span><strong>原生多模态</strong><p>ViT/CLIP → connector VLM → Kimi-VL/MoonViT-V2</p><em>视觉 Token 流程图</em></div>
|
<div><span>P2</span><strong>原生多模态</strong><p>ViT/CLIP → connector VLM → Kimi-VL/MoonViT-V2</p><em>视觉 Token 流程图</em></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user