Text2Text Generation
Transformers
GGUF
English
Inference Endpoints
conversational
AlekseiPravdin commited on
Commit
9663168
1 Parent(s): 5ace418

Create README.md

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