Reward Model Training
Overview
Reward Model Training is the stage of preparing a reward model that evaluates the quality of LLM responses. The model is trained on pairs of responses with human preferences and is used to optimize policy in RLHF or as a signal in DPO.
Training Steps
- Data Collection: annotators compare pairs of responses to one prompt.
- Dataset Formation: creating pairs (winning, losing).
- Training: optimization with pairwise loss (e.g., Bradley-Terry).
- Evaluation: checking consistency with human evaluations.
Loss Function
For a pair of responses \(y_w\) (preferred) and \(y_l\):
\[ \mathcal{L} = -\log \sigma(r(x, y_w) - r(x, y_l)) \]
where \(r\) is the reward model evaluation, \(\sigma\) is the sigmoid.