Skip to content

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

  1. Data Collection: annotators compare pairs of responses to one prompt.
  2. Dataset Formation: creating pairs (winning, losing).
  3. Training: optimization with pairwise loss (e.g., Bradley-Terry).
  4. 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.

See Also

← All Terms