HuggingFace镜像/reward-model-deberta-v3-large
模型介绍文件和版本分析
下载使用量0

基于人类反馈训练的奖励模型

奖励模型(RM)经过训练,可在给定问题的情况下预测哪个人工生成的答案更优。

奖励模型在以下领域十分实用:

  • 问答模型评估

  • 在RLHF中用作奖励分数

所有模型均在以下数据集上训练,且跨数据集使用相同的拆分种子(若验证集不可用)

  • webgpt_comparisons

  • summarize_from_feedback

  • synthetic-instruct-gptj-pairwise

使用方法

from transformers import AutoModelForSequenceClassification, AutoTokenizer
reward_name = "OpenAssistant/reward-model-deberta-v3-large"
rank_model, tokenizer = AutoModelForSequenceClassification.from_pretrained(reward_name), AutoTokenizer.from_pretrained(reward_name)
question, answer = "Explain nuclear fusion like I am five", "Nuclear fusion is the process by which two or more protons and neutrons combine to form a single nucleus. It is a very important process in the universe, as it is the source of energy for stars and galaxies. Nuclear fusion is also a key process in the production of energy for nuclear power plants."
inputs = tokenizer(question, answer, return_tensors='pt')
score = rank_model(**inputs).logits[0].cpu().detach()
print(score)

性能

验证集拆分准确率

模型WebGPTSummarySytheticGPT
electra-large-discriminator59.3068.6699.85
deberta-v3-large61.1372.2399.94
deberta-v3-base59.0766.8499.85

SytheticGPT 的选中-拒绝样本对可能存在某种表面模式,这使得区分哪个答案更好变得非常容易。