Natural Language Processing · 免费预览
基于指令与偏好的后训练
指令微调、使用LoRA的参数高效微调、偏好数据与「Bradley-Terry」模型、奖励模型、KL正则化对齐,以及DPO。
1. Post-Training with Instructions and Preferences
Post-Training with Instructions and Preferences
2. Learning from preferences
Learning from preferences
3. A toy reward model in NumPy
A toy reward model in NumPy
4. Bradley-Terry preference probability
Two responses have reward scores and . Compute , rounding to three decimals.
5. Reward model loss on one pair
For one preference pair the reward model scores the winner above the loser. Compute the loss , rounding to three decimals.
6. LoRA parameter count
A frozen weight matrix is , and LoRA adapts it with matrices of shapes and . How many trainable parameters does LoRA add? Answer with the number.
7. Why the KL penalty
In preference-based alignment, the optimization maximizes reward minus times the KL divergence to a reference policy. What goes wrong with reward alone?
8. What DPO eliminates
Direct Preference Optimization optimizes the same KL-regularized objective as reward-model RL. What does it skip, and why is that possible?