RichardErkhov commited on
Commit
c23aa6b
1 Parent(s): d1d1bd4

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +199 -0
README.md ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ prometheus-7b-v2.0 - bnb 4bits
11
+ - Model creator: https://huggingface.co/prometheus-eval/
12
+ - Original model: https://huggingface.co/prometheus-eval/prometheus-7b-v2.0/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ tags:
20
+ - text2text-generation
21
+ datasets:
22
+ - prometheus-eval/Feedback-Collection
23
+ - prometheus-eval/Preference-Collection
24
+ license: apache-2.0
25
+ language:
26
+ - en
27
+ pipeline_tag: text2text-generation
28
+ library_name: transformers
29
+ metrics:
30
+ - pearsonr
31
+ - spearmanr
32
+ - kendall-tau
33
+ - accuracy
34
+ ---
35
+ ## Links for Reference
36
+
37
+ - **Homepage: In Progress**
38
+ - **Repository:https://github.com/prometheus-eval/prometheus-eval**
39
+ - **Paper:https://arxiv.org/abs/2405.01535**
40
+ - **Point of Contact:[email protected]**
41
+
42
+ # TL;DR
43
+ Prometheus 2 is an alternative of GPT-4 evaluation when doing fine-grained evaluation of an underlying LLM & a Reward model for Reinforcement Learning from Human Feedback (RLHF).
44
+ ![plot](./finegrained_eval.JPG)
45
+
46
+ Prometheus 2 is a language model using [Mistral-Instruct](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) as a base model.
47
+ It is fine-tuned on 100K feedback within the [Feedback Collection](https://huggingface.co/datasets/prometheus-eval/Feedback-Collection) and 200K feedback within the [Preference Collection](https://huggingface.co/datasets/prometheus-eval/Preference-Collection).
48
+ It is also made by weight merging to support both absolute grading (direct assessment) and relative grading (pairwise ranking).
49
+ The surprising thing is that we find weight merging also improves performance on each format.
50
+
51
+ # Model Details
52
+
53
+ ## Model Description
54
+
55
+ - **Model type:** Language model
56
+ - **Language(s) (NLP):** English
57
+ - **License:** Apache 2.0
58
+ - **Related Models:** [All Prometheus Checkpoints](https://huggingface.co/models?search=prometheus-eval/Prometheus)
59
+ - **Resources for more information:**
60
+ - [Research paper](https://arxiv.org/abs/2405.01535)
61
+ - [GitHub Repo](https://github.com/prometheus-eval/prometheus-eval)
62
+
63
+
64
+ Prometheus is trained with two different sizes (7B and 8x7B).
65
+ You could check the 8x7B sized LM on [this page](https://huggingface.co/prometheus-eval/prometheus-2-8x7b-v2.0).
66
+ Also, check out our dataset as well on [this page](https://huggingface.co/datasets/prometheus-eval/Feedback-Collection) and [this page](https://huggingface.co/datasets/prometheus-eval/Preference-Collection).
67
+
68
+ ## Prompt Format
69
+
70
+ We have made wrapper functions and classes to conveniently use Prometheus 2 at [our github repository](https://github.com/prometheus-eval/prometheus-eval).
71
+ We highly recommend you use it!
72
+
73
+ However, if you just want to use the model for your use case, please refer to the prompt format below.
74
+ Note that absolute grading and relative grading requires different prompt templates and system prompts.
75
+
76
+ ### Absolute Grading (Direct Assessment)
77
+ Prometheus requires 4 components in the input: An instruction, a response to evaluate, a score rubric, and a reference answer. You could refer to the prompt format below.
78
+ You should fill in the instruction, response, reference answer, criteria description, and score description for score in range of 1 to 5.
79
+
80
+ Fix the components with \{text\} inside.
81
+ ```
82
+ ###Task Description:
83
+ An instruction (might include an Input inside it), a response to evaluate, a reference answer that gets a score of 5, and a score rubric representing a evaluation criteria are given.
84
+ 1. Write a detailed feedback that assess the quality of the response strictly based on the given score rubric, not evaluating in general.
85
+ 2. After writing a feedback, write a score that is an integer between 1 and 5. You should refer to the score rubric.
86
+ 3. The output format should look as follows: \"Feedback: (write a feedback for criteria) [RESULT] (an integer number between 1 and 5)\"
87
+ 4. Please do not generate any other opening, closing, and explanations.
88
+
89
+ ###The instruction to evaluate:
90
+ {orig_instruction}
91
+
92
+ ###Response to evaluate:
93
+ {orig_response}
94
+
95
+ ###Reference Answer (Score 5):
96
+ {orig_reference_answer}
97
+
98
+ ###Score Rubrics:
99
+ [{orig_criteria}]
100
+ Score 1: {orig_score1_description}
101
+ Score 2: {orig_score2_description}
102
+ Score 3: {orig_score3_description}
103
+ Score 4: {orig_score4_description}
104
+ Score 5: {orig_score5_description}
105
+
106
+ ###Feedback:
107
+ ```
108
+
109
+ After this, you should apply the conversation template of Mistral (not applying it might lead to unexpected behaviors).
110
+ You can find the conversation class at this [link](https://github.com/lm-sys/FastChat/blob/main/fastchat/conversation.py).
111
+ ```
112
+ conv = get_conv_template("mistral")
113
+ 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.")
114
+ conv.append_message(conv.roles[0], dialogs['instruction'])
115
+ conv.append_message(conv.roles[1], None)
116
+ prompt = conv.get_prompt()
117
+
118
+ x = tokenizer(prompt,truncation=False)
119
+ ```
120
+
121
+ As a result, a feedback and score decision will be generated, divided by a separating phrase ```[RESULT]```
122
+
123
+ ### Relative Grading (Pairwise Ranking)
124
+ Prometheus requires 4 components in the input: An instruction, 2 responses to evaluate, a score rubric, and a reference answer. You could refer to the prompt format below.
125
+ You should fill in the instruction, 2 responses, reference answer, and criteria description.
126
+
127
+ Fix the components with \{text\} inside.
128
+ ```
129
+ ###Task Description:
130
+ An instruction (might include an Input inside it), a response to evaluate, and a score rubric representing a evaluation criteria are given.
131
+ 1. Write a detailed feedback that assess the quality of two responses strictly based on the given score rubric, not evaluating in general.
132
+ 2. After writing a feedback, choose a better response between Response A and Response B. You should refer to the score rubric.
133
+ 3. The output format should look as follows: "Feedback: (write a feedback for criteria) [RESULT] (A or B)"
134
+ 4. Please do not generate any other opening, closing, and explanations.
135
+
136
+ ###Instruction:
137
+ {orig_instruction}
138
+
139
+ ###Response A:
140
+ {orig_response_A}
141
+
142
+ ###Response B:
143
+ {orig_response_B}
144
+
145
+ ###Reference Answer:
146
+ {orig_reference_answer}
147
+
148
+ ###Score Rubric:
149
+ {orig_criteria}
150
+
151
+ ###Feedback:
152
+ ```
153
+
154
+ After this, you should apply the conversation template of Mistral (not applying it might lead to unexpected behaviors).
155
+ You can find the conversation class at this [link](https://github.com/lm-sys/FastChat/blob/main/fastchat/conversation.py).
156
+ ```
157
+ conv = get_conv_template("mistral")
158
+ 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.")
159
+ conv.append_message(conv.roles[0], dialogs['instruction'])
160
+ conv.append_message(conv.roles[1], None)
161
+ prompt = conv.get_prompt()
162
+
163
+ x = tokenizer(prompt,truncation=False)
164
+ ```
165
+
166
+ As a result, a feedback and score decision will be generated, divided by a separating phrase ```[RESULT]```
167
+
168
+ ## License
169
+ Feedback Collection, Preference Collection, and Prometheus 2 are subject to OpenAI's Terms of Use for the generated data. If you suspect any violations, please reach out to us.
170
+
171
+
172
+ # Citation
173
+
174
+
175
+ If you find the following model helpful, please consider citing our paper!
176
+
177
+ **BibTeX:**
178
+
179
+ ```bibtex
180
+ @misc{kim2023prometheus,
181
+ title={Prometheus: Inducing Fine-grained Evaluation Capability in Language Models},
182
+ 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},
183
+ year={2023},
184
+ eprint={2310.08491},
185
+ archivePrefix={arXiv},
186
+ primaryClass={cs.CL}
187
+ }
188
+ ```
189
+ ```bibtex
190
+ @misc{kim2024prometheus,
191
+ title={Prometheus 2: An Open Source Language Model Specialized in Evaluating Other Language Models},
192
+ 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},
193
+ year={2024},
194
+ eprint={2405.01535},
195
+ archivePrefix={arXiv},
196
+ primaryClass={cs.CL}
197
+ }
198
+ ```
199
+