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}
}



