Training the reward model is a binary classification problem: given two segments and a human label, maximize the probability of the label. The loss is the negative log-likelihood of that label under the preference model.
Implement reward_model_nll(y, r_a, r_b), the negative log-likelihood of the human label.
Compute p = sigmoid(r_a - r_b), then the binary cross-entropy against y.
No results yet
Run your code to check it against the examples, or submit to run every test.