Prometheus 8x7b V2.0
模型简介
模型特点
模型能力
使用案例
🚀 Prometheus 2 - 文本到文本生成模型
Prometheus 2 是一个用于对基础大语言模型(LLM)进行细粒度评估的工具,可作为 GPT - 4 评估的替代方案。同时,它还能作为基于人类反馈的强化学习(RLHF)中的奖励模型。该模型以 [Mistral - Instruct](https://huggingface.co/mistralai/Mistral - 7B - Instruct - v0.2) 为基础模型,在多个数据集上进行微调,通过权重合并支持绝对评分和相对评分两种评估方式。
🚀 快速开始
参考链接
- 主页:建设中
- 仓库:https://github.com/prometheus - eval/prometheus - eval
- 论文:https://arxiv.org/abs/2405.01535
- 联系人:seungone@cmu.edu
模型简介
Prometheus 2 是一个语言模型,使用 [Mistral - Instruct](https://huggingface.co/mistralai/Mistral - 7B - Instruct - v0.2) 作为基础模型。它在 [反馈集合](https://huggingface.co/datasets/prometheus - eval/Feedback - Collection) 中的 100K 反馈和 [偏好集合](https://huggingface.co/datasets/prometheus - eval/Preference - Collection) 中的 200K 反馈上进行了微调。通过权重合并,它支持绝对评分(直接评估)和相对评分(成对排名),并且发现权重合并还提高了每种评估方式的性能。
✨ 主要特性
- 细粒度评估:可对基础大语言模型进行细粒度评估,是 GPT - 4 评估的替代方案。
- 支持两种评分方式:通过权重合并支持绝对评分和相对评分。
- 微调训练:在多个数据集上进行了微调,提高了评估性能。
📚 详细文档
模型详情
模型描述
属性 | 详情 |
---|---|
模型类型 | 语言模型 |
语言(NLP) | 英语 |
许可证 | Apache 2.0 |
相关模型 | [所有 Prometheus 检查点](https://huggingface.co/models?search=prometheus - eval/Prometheus) |
更多信息资源 | 研究论文、[GitHub 仓库](https://github.com/prometheus - eval/prometheus - eval) |
Prometheus 有两种不同大小的模型(7B 和 8x7B)。你可以在 [此页面](https://huggingface.co/prometheus - eval/prometheus - 2 - 7b - v2.0) 查看 7B 大小的语言模型。同时,也可以在 [此页面](https://huggingface.co/datasets/prometheus - eval/Feedback - Collection) 和 [此页面](https://huggingface.co/datasets/prometheus - eval/Preference - Collection) 查看我们的数据集。
提示格式
我们在 [GitHub 仓库](https://github.com/prometheus - eval/prometheus - eval) 中提供了包装函数和类,方便使用 Prometheus 2,强烈建议你使用。但如果你只是想将模型用于自己的用例,请参考以下提示格式。注意,绝对评分和相对评分需要不同的提示模板和系统提示。
绝对评分(直接评估)
Prometheus 在输入中需要 4 个组件:指令、待评估的响应、评分规则和参考答案。你可以参考以下提示格式,将 {text} 内的组件进行填充。
###任务描述:
给定一个指令(可能包含输入)、一个待评估的响应、一个得分为 5 的参考答案以及一个代表评估标准的评分规则。
1. 严格根据给定的评分规则,撰写一份详细的反馈,评估响应的质量,而非进行一般性评估。
2. 撰写反馈后,给出一个 1 到 5 之间的整数分数,参考评分规则。
3. 输出格式应为:"反馈: (为标准撰写反馈) [结果] (1 到 5 之间的整数)"
4. 请不要生成任何其他开头、结尾和解释内容。
###待评估的指令:
{orig_instruction}
###待评估的响应:
{orig_response}
###参考答案(得分 5):
{orig_reference_answer}
###评分规则:
[{orig_criteria}]
得分 1: {orig_score1_description}
得分 2: {orig_score2_description}
得分 3: {orig_score3_description}
得分 4: {orig_score4_description}
得分 5: {orig_score5_description}
###反馈:
之后,你需要应用 Mistral 的对话模板(不应用可能会导致意外行为)。你可以在 [此链接](https://github.com/lm - sys/FastChat/blob/main/fastchat/conversation.py) 找到对话类。
conv = get_conv_template("mistral")
conv.set_system_message("You are a fair judge assistant tasked with providing clear, objective feedback based on specific criteria, ensuring each assessment reflects the absolute standards set for performance.")
conv.append_message(conv.roles[0], dialogs['instruction'])
conv.append_message(conv.roles[1], None)
prompt = conv.get_prompt()
x = tokenizer(prompt,truncation=False)
结果将生成一个反馈和分数决策,用分隔短语 [RESULT]
分隔。
相对评分(成对排名)
Prometheus 在输入中需要 4 个组件:指令、2 个待评估的响应、评分规则和参考答案。你可以参考以下提示格式,将 {text} 内的组件进行填充。
###任务描述:
给定一个指令(可能包含输入)、两个待评估的响应(分别表示为响应 A 和响应 B)、一个参考答案和一个评估标准。
1. 严格根据给定的评估标准,撰写一份详细的反馈,评估两个响应的质量,而非进行一般性评估。
2. 对响应 A、响应 B 和参考答案进行比较。不要分别检查响应 A 和响应 B,直接指出它们之间的共性和差异。
3. 撰写反馈后,指出更好的响应,即 "A" 或 "B"。
4. 输出格式应为:"反馈: (为标准撰写反馈) [结果] (要么是 "A" 要么是 "B")"
5. 请不要生成任何其他开头、结尾和解释内容。
###指令:
{orig_instruction}
###响应 A:
{orig_response_A}
###响应 B:
{orig_response_B}
###参考答案:
{orig_reference_answer}
###评分规则:
{orig_criteria}
###反馈:
之后,你需要应用 Mistral 的对话模板(不应用可能会导致意外行为)。你可以在 [此链接](https://github.com/lm - sys/FastChat/blob/main/fastchat/conversation.py) 找到对话类。
conv = get_conv_template("mistral")
conv.set_system_message("You are a fair judge assistant assigned to deliver insightful feedback that compares individual performances, highlighting how each stands relative to others within the same cohort.")
conv.append_message(conv.roles[0], dialogs['instruction'])
conv.append_message(conv.roles[1], None)
prompt = conv.get_prompt()
x = tokenizer(prompt,truncation=False)
结果将生成一个反馈和分数决策,用分隔短语 [RESULT]
分隔。
许可证
反馈集合、偏好集合和 Prometheus 2 生成的数据需遵循 OpenAI 的使用条款。如果你怀疑有任何违规行为,请与我们联系。
📄 许可证
本项目采用 Apache 2.0 许可证。
📖 引用
如果你发现该模型有帮助,请考虑引用我们的论文:
@misc{kim2023prometheus,
title={Prometheus: Inducing Fine-grained Evaluation Capability in Language Models},
author={Seungone Kim and Jamin Shin and Yejin Cho and Joel Jang and Shayne Longpre and Hwaran Lee and Sangdoo Yun and Seongjin Shin and Sungdong Kim and James Thorne and Minjoon Seo},
year={2023},
eprint={2310.08491},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{kim2024prometheus,
title={Prometheus 2: An Open Source Language Model Specialized in Evaluating Other Language Models},
author={Seungone Kim and Juyoung Suk and Shayne Longpre and Bill Yuchen Lin and Jamin Shin and Sean Welleck and Graham Neubig and Moontae Lee and Kyungjae Lee and Minjoon Seo},
year={2024},
eprint={2405.01535},
archivePrefix={arXiv},
primaryClass={cs.CL}
}



