模型介绍
中文整理InternLM
InternLM2-7B-Reward
💻Github Repo • 🤔Reporting Issues • 📜Technical Report
👋 join us on Discord and WeChat
Introduction
InternLM2-7B-Reward** is a reward model trained on the foundation of InternLM2-Chat-7B-SFT. This model has been trained using over 2.4 million preference samples, both human-annotated and AI-synthesized, achieving outstanding performance while ensuring a balance between helpful and harmless.
Key Features:
- *Variety of Sizes Available**: Our open-sourced reward models are available in sizes of **1.8B, 7B, and 20B**, each demonstrating exceptional performance across various metrics. We aim for these different-sized models to facilitate research on the scaling laws of reward models, providing valuable insights to the community.
- *Comprehensive Coverage of Preference**: Trained with **2.4 million** preference pairs derived from both human annotations and AI synthesis, covering diverse areas such as dialogue, writing, poetry, summarization, coding, mathematics, etc. It also maintains a balance between helpful and harmless.
- *Multilingual Support**: InternLM2-Reward was trained on high-quality **English and Chinese** preference data, delivering robust performance in both languages.
This model was applied to the RLHF training process of InternLM2-Chat. The reward model training techniques from the InternLM2 Technical Report have been open-sourced in XTuner, try it out here!
Performance Evaluation on RewardBench
Models Score Chat Chat Hard Safety Reasoning
- -- --- --- --- --- ---
InternLM2-20B-Reward 89.5 98.6 74.1 89.4 95.7
InternLM2-7B-Reward 86.6 98.6 66.7 88.3 92.8
InternLM2-1.8B-Reward 80.6 95.0 58.1 81.8 87.4
The evaluation is conducted on the RewardBench dataset.
For a fair comparison, conditional system prompts proposed in our technical report were not included during testing.
Demo Code
Basic Usage
We provide some user-friendly APIs for you to use the model. Here is an example of how to use the model to get the reward score of a chat, compare two chats, or rank multiple chats.
Best of N Sampling
Here is an example of how to use the reward model to perform best of N sampling.
The code below demonstrates how to select the best response from the candidates generated by the language model.
Open Source License
The code is licensed under Apache-2.0, while model weights are fully open for academic research and also allow **free** commercial usage. To apply for a commercial license, please fill in the application form (English)/申请表(中文). For other questions or collaborations, please contact .
Citation
简介
InternLM2-7B-Reward** 是基于 **InternLM2-Chat-7B-SFT** 训练的奖励模型。该模型使用超过 240 万条人工标注和 AI 合成的偏好样本,覆盖了包括对话、写作、诗歌、总结、编码和数学等多个领域。在取得了出色性能的同时也兼顾了实用性和安全性偏好的平衡。
InternLM2-Reward 的主要特点:
- *多种尺寸可供选择**:我们开源的奖励模型有 **1.8B、7B 和 20B** 三种尺寸,每种尺寸都展示出了卓越的性能。我们希望这些不同大小的模型能够促进社区关于 Reward Model 缩放定律的研究。
- *全面覆盖偏好**:模型训练了 **240 万**条来自人工标注和AI合成的偏好样本,涉及对话、写作、诗歌、总结、编码和数学等多个领域,同时确保了实用性和安全性偏好的平衡。
- *多语言支持**:InternLM2-Reward 在高质量的**英文和中文**偏好数据上进行训练,确保了在这两种语言上都有稳健的表现。
该模型运用在了 InternLM2-Chat 的 PPO 训练过程中。我们的技术报告中提出的 Reward Model 训练技巧已在 XTuner 中公开。欢迎点击链接进行尝试!
RewardBench 上的性能评估
Models Score Chat Chat Hard Safety Reasoning
- -- --- --- --- --- ---
InternLM2-20B-Reward 89.5 98.6 74.1 89.4 95.7
InternLM2-7B-Reward 86.6 98.6 66.7 88.3 92.8
InternLM2-1.8B-Reward 80.6 95.0 58.1 81.8 87.4
评估使用了 RewardBench 数据集进行。
为了公平比较,测试期间没有使用我们技术报告中提出的"条件系统提示"。
示例代码
基本用法
我们为您提供了一些用户友好的 API 以便使用该模型。以下是一些示例,展示如何使用 InternLM2-Reward 获取对话的奖励分数、比较两组对话或对多个对话进行排名。
Best of N 采样
以下是如何使用 InternLM2-Reward 执行Best of N 采样的示例。
以下代码演示了如何从语言模型生成的候选回答中选择最佳回答。
开源许可证
本仓库的代码依照 Apache-2.0 协议开源。模型权重对学术研究完全开放,也可申请免费的商业使用授权(申请表)。其他问题与合作请联系 。
Quote
优先采用原作者提供的中文模型卡片;仅有英文说明时由闲社AI翻译整理。重要参数、许可证和商用范围请以原文为准。
你将获得什么
完整仓库方式包含该固定版本中的权重、配置、分词器及说明文件;指定版本方式只下载所选文件或整组分片。多模态模型的投影文件、配置等依赖,请按作者说明配齐。
完整仓库可能包含多个权重格式,因此需要的磁盘空间可能大于单一格式的模型大小。下载文件不等于完成模型部署。
使用前须知
运行模型需要的设备、工具与依赖,以原作者说明为准。
是否允许商用、修改和分发,请查看模型许可证。
闲社提供资料与镜像下载方法,不代表已运行模型或完成安全审计。下载的代码应先检查,再执行。
Problem with the information or download?
Sign in to submit feedback.
