Step 1, SFT: fine-tune the base model on high-quality instruction and response data to get a reasonable starting policy.
Step 2, reward model: sample several responses per prompt, have humans rank them, and train a model to score responses so that preferred ones get higher rewards.
Step 3, reinforcement learning (typically PPO): generate responses, score them with the reward model, and update the policy to increase reward while a KL penalty keeps it close to the SFT reference model.
It works but is expensive and unstable: it needs several models in memory, careful tuning, and good preference data.
Loading…