TheBloke commited on
Commit
94d8600
1 Parent(s): ff916d6

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +689 -0
README.md ADDED
@@ -0,0 +1,689 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: kaist-ai/prometheus-13b-v1.0
3
+ datasets:
4
+ - kaist-ai/Feedback-Collection
5
+ inference: false
6
+ language:
7
+ - en
8
+ library_name: transformers
9
+ license: apache-2.0
10
+ metrics:
11
+ - pearsonr
12
+ - spearmanr
13
+ - accuracy
14
+ model_creator: KAIST AI
15
+ model_name: Prometheus 13B V1.0
16
+ model_type: llama
17
+ pipeline_tag: text2text-generation
18
+ prompt_template: '###Task Description:
19
+
20
+ An instruction (might include an Input inside it), a response to evaluate, a reference
21
+ answer that gets a score of 5, and a score rubric representing a evaluation criteria
22
+ are given.
23
+
24
+ 1. Write a detailed feedback that assess the quality of the response strictly based
25
+ on the given score rubric, not evaluating in general.
26
+
27
+ 2. After writing a feedback, write a score that is an integer between 1 and 5. You
28
+ should refer to the score rubric.
29
+
30
+ 3. The output format should look as follows: \"Feedback: (write a feedback for criteria)
31
+ [RESULT] (an integer number between 1 and 5)\"
32
+
33
+ 4. Please do not generate any other opening, closing, and explanations.
34
+
35
+
36
+ ###The instruction to evaluate:
37
+
38
+ {prompt}
39
+
40
+
41
+ ###Response to evaluate:
42
+
43
+ {{response}}
44
+
45
+
46
+ ###Reference Answer (Score 5):
47
+
48
+ {{reference_answer}}
49
+
50
+
51
+ ###Score Rubrics:
52
+
53
+ [{{criteria_description}}]
54
+
55
+ Score 1: {{score1_description}}
56
+
57
+ Score 2: {{score2_description}}
58
+
59
+ Score 3: {{score3_description}}
60
+
61
+ Score 4: {{score4_description}}
62
+
63
+ Score 5: {{score5_description}}
64
+
65
+
66
+ ###Feedback:
67
+
68
+ '
69
+ quantized_by: TheBloke
70
+ tags:
71
+ - text2text-generation
72
+ ---
73
+ <!-- markdownlint-disable MD041 -->
74
+
75
+ <!-- header start -->
76
+ <!-- 200823 -->
77
+ <div style="width: auto; margin-left: auto; margin-right: auto">
78
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
79
+ </div>
80
+ <div style="display: flex; justify-content: space-between; width: 100%;">
81
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
82
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
83
+ </div>
84
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
85
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
86
+ </div>
87
+ </div>
88
+ <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
89
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
90
+ <!-- header end -->
91
+
92
+ # Prometheus 13B V1.0 - GPTQ
93
+ - Model creator: [KAIST AI](https://huggingface.co/kaist-ai)
94
+ - Original model: [Prometheus 13B V1.0](https://huggingface.co/kaist-ai/prometheus-13b-v1.0)
95
+
96
+ <!-- description start -->
97
+ ## Description
98
+
99
+ This repo contains GPTQ model files for [KAIST AI's Prometheus 13B V1.0](https://huggingface.co/kaist-ai/prometheus-13b-v1.0).
100
+
101
+ Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.
102
+
103
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
104
+
105
+ <!-- description end -->
106
+ <!-- repositories-available start -->
107
+ ## Repositories available
108
+
109
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/prometheus-13B-v1.0-AWQ)
110
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/prometheus-13B-v1.0-GPTQ)
111
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/prometheus-13B-v1.0-GGUF)
112
+ * [KAIST AI's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/kaist-ai/prometheus-13b-v1.0)
113
+ <!-- repositories-available end -->
114
+
115
+ <!-- prompt-template start -->
116
+ ## Prompt template: Prometheus
117
+
118
+ ```
119
+ ###Task Description:
120
+ 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.
121
+ 1. Write a detailed feedback that assess the quality of the response strictly based on the given score rubric, not evaluating in general.
122
+ 2. After writing a feedback, write a score that is an integer between 1 and 5. You should refer to the score rubric.
123
+ 3. The output format should look as follows: \"Feedback: (write a feedback for criteria) [RESULT] (an integer number between 1 and 5)\"
124
+ 4. Please do not generate any other opening, closing, and explanations.
125
+
126
+ ###The instruction to evaluate:
127
+ {prompt}
128
+
129
+ ###Response to evaluate:
130
+ {{response}}
131
+
132
+ ###Reference Answer (Score 5):
133
+ {{reference_answer}}
134
+
135
+ ###Score Rubrics:
136
+ [{{criteria_description}}]
137
+ Score 1: {{score1_description}}
138
+ Score 2: {{score2_description}}
139
+ Score 3: {{score3_description}}
140
+ Score 4: {{score4_description}}
141
+ Score 5: {{score5_description}}
142
+
143
+ ###Feedback:
144
+
145
+ ```
146
+
147
+ <!-- prompt-template end -->
148
+ <!-- licensing start -->
149
+ ## Licensing
150
+
151
+ The creator of the source model has listed its license as `apache-2.0`, and this quantization has therefore used that same license.
152
+
153
+ As this model is based on Llama 2, it is also subject to the Meta Llama 2 license terms, and the license files for that are additionally included. It should therefore be considered as being claimed to be licensed under both licenses. I contacted Hugging Face for clarification on dual licensing but they do not yet have an official position. Should this change, or should Meta provide any feedback on this situation, I will update this section accordingly.
154
+
155
+ In the meantime, any questions regarding licensing, and in particular how these two licenses might interact, should be directed to the original model repository: [KAIST AI's Prometheus 13B V1.0](https://huggingface.co/kaist-ai/prometheus-13b-v1.0).
156
+ <!-- licensing end -->
157
+
158
+ <!-- README_GPTQ.md-compatible clients start -->
159
+ ## Known compatible clients / servers
160
+
161
+ These GPTQ models are known to work in the following inference servers/webuis.
162
+
163
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
164
+ - [KoboldAI United](https://github.com/henk717/koboldai)
165
+ - [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui)
166
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
167
+
168
+ This may not be a complete list; if you know of others, please let me know!
169
+ <!-- README_GPTQ.md-compatible clients end -->
170
+
171
+ <!-- README_GPTQ.md-provided-files start -->
172
+ ## Provided files, and GPTQ parameters
173
+
174
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
175
+
176
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
177
+
178
+ Most GPTQ files are made with AutoGPTQ. Mistral models are currently made with Transformers.
179
+
180
+ <details>
181
+ <summary>Explanation of GPTQ parameters</summary>
182
+
183
+ - Bits: The bit size of the quantised model.
184
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
185
+ - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now.
186
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
187
+ - GPTQ dataset: The calibration dataset used during quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ calibration dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s).
188
+ - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences.
189
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama and Mistral models in 4-bit.
190
+
191
+ </details>
192
+
193
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
194
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
195
+ | [main](https://huggingface.co/TheBloke/prometheus-13B-v1.0-GPTQ/tree/main) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
196
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/prometheus-13B-v1.0-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
197
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/prometheus-13B-v1.0-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
198
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/prometheus-13B-v1.0-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
199
+ | [gptq-8bit-32g-actorder_True](https://huggingface.co/TheBloke/prometheus-13B-v1.0-GPTQ/tree/gptq-8bit-32g-actorder_True) | 8 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 14.54 GB | No | 8-bit, with group size 32g and Act Order for maximum inference quality. |
200
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/prometheus-13B-v1.0-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-raw-v1) | 4096 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
201
+
202
+ <!-- README_GPTQ.md-provided-files end -->
203
+
204
+ <!-- README_GPTQ.md-download-from-branches start -->
205
+ ## How to download, including from branches
206
+
207
+ ### In text-generation-webui
208
+
209
+ To download from the `main` branch, enter `TheBloke/prometheus-13B-v1.0-GPTQ` in the "Download model" box.
210
+
211
+ To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/prometheus-13B-v1.0-GPTQ:gptq-4bit-32g-actorder_True`
212
+
213
+ ### From the command line
214
+
215
+ I recommend using the `huggingface-hub` Python library:
216
+
217
+ ```shell
218
+ pip3 install huggingface-hub
219
+ ```
220
+
221
+ To download the `main` branch to a folder called `prometheus-13B-v1.0-GPTQ`:
222
+
223
+ ```shell
224
+ mkdir prometheus-13B-v1.0-GPTQ
225
+ huggingface-cli download TheBloke/prometheus-13B-v1.0-GPTQ --local-dir prometheus-13B-v1.0-GPTQ --local-dir-use-symlinks False
226
+ ```
227
+
228
+ To download from a different branch, add the `--revision` parameter:
229
+
230
+ ```shell
231
+ mkdir prometheus-13B-v1.0-GPTQ
232
+ huggingface-cli download TheBloke/prometheus-13B-v1.0-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir prometheus-13B-v1.0-GPTQ --local-dir-use-symlinks False
233
+ ```
234
+
235
+ <details>
236
+ <summary>More advanced huggingface-cli download usage</summary>
237
+
238
+ If you remove the `--local-dir-use-symlinks False` parameter, the files will instead be stored in the central Hugging Face cache directory (default location on Linux is: `~/.cache/huggingface`), and symlinks will be added to the specified `--local-dir`, pointing to their real location in the cache. This allows for interrupted downloads to be resumed, and allows you to quickly clone the repo to multiple places on disk without triggering a download again. The downside, and the reason why I don't list that as the default option, is that the files are then hidden away in a cache folder and it's harder to know where your disk space is being used, and to clear it up if/when you want to remove a download model.
239
+
240
+ The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
241
+
242
+ For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
243
+
244
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
245
+
246
+ ```shell
247
+ pip3 install hf_transfer
248
+ ```
249
+
250
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
251
+
252
+ ```shell
253
+ mkdir prometheus-13B-v1.0-GPTQ
254
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/prometheus-13B-v1.0-GPTQ --local-dir prometheus-13B-v1.0-GPTQ --local-dir-use-symlinks False
255
+ ```
256
+
257
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
258
+ </details>
259
+
260
+ ### With `git` (**not** recommended)
261
+
262
+ To clone a specific branch with `git`, use a command like this:
263
+
264
+ ```shell
265
+ git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/prometheus-13B-v1.0-GPTQ
266
+ ```
267
+
268
+ Note that using Git with HF repos is strongly discouraged. It will be much slower than using `huggingface-hub`, and will use twice as much disk space as it has to store the model files twice (it stores every byte both in the intended target folder, and again in the `.git` folder as a blob.)
269
+
270
+ <!-- README_GPTQ.md-download-from-branches end -->
271
+ <!-- README_GPTQ.md-text-generation-webui start -->
272
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
273
+
274
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
275
+
276
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install.
277
+
278
+ 1. Click the **Model tab**.
279
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/prometheus-13B-v1.0-GPTQ`.
280
+
281
+ - To download from a specific branch, enter for example `TheBloke/prometheus-13B-v1.0-GPTQ:gptq-4bit-32g-actorder_True`
282
+ - see Provided Files above for the list of branches for each option.
283
+
284
+ 3. Click **Download**.
285
+ 4. The model will start downloading. Once it's finished it will say "Done".
286
+ 5. In the top left, click the refresh icon next to **Model**.
287
+ 6. In the **Model** dropdown, choose the model you just downloaded: `prometheus-13B-v1.0-GPTQ`
288
+ 7. The model will automatically load, and is now ready for use!
289
+ 8. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.
290
+
291
+ - Note that you do not need to and should not set manual GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
292
+
293
+ 9. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
294
+
295
+ <!-- README_GPTQ.md-text-generation-webui end -->
296
+
297
+ <!-- README_GPTQ.md-use-from-tgi start -->
298
+ ## Serving this model from Text Generation Inference (TGI)
299
+
300
+ It's recommended to use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
301
+
302
+ Example Docker parameters:
303
+
304
+ ```shell
305
+ --model-id TheBloke/prometheus-13B-v1.0-GPTQ --port 3000 --quantize gptq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
306
+ ```
307
+
308
+ Example Python code for interfacing with TGI (requires huggingface-hub 0.17.0 or later):
309
+
310
+ ```shell
311
+ pip3 install huggingface-hub
312
+ ```
313
+
314
+ ```python
315
+ from huggingface_hub import InferenceClient
316
+
317
+ endpoint_url = "https://your-endpoint-url-here"
318
+
319
+ prompt = "Tell me about AI"
320
+ prompt_template=f'''###Task Description:
321
+ 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.
322
+ 1. Write a detailed feedback that assess the quality of the response strictly based on the given score rubric, not evaluating in general.
323
+ 2. After writing a feedback, write a score that is an integer between 1 and 5. You should refer to the score rubric.
324
+ 3. The output format should look as follows: \"Feedback: (write a feedback for criteria) [RESULT] (an integer number between 1 and 5)\"
325
+ 4. Please do not generate any other opening, closing, and explanations.
326
+
327
+ ###The instruction to evaluate:
328
+ {prompt}
329
+
330
+ ###Response to evaluate:
331
+ {{response}}
332
+
333
+ ###Reference Answer (Score 5):
334
+ {{reference_answer}}
335
+
336
+ ###Score Rubrics:
337
+ [{{criteria_description}}]
338
+ Score 1: {{score1_description}}
339
+ Score 2: {{score2_description}}
340
+ Score 3: {{score3_description}}
341
+ Score 4: {{score4_description}}
342
+ Score 5: {{score5_description}}
343
+
344
+ ###Feedback:
345
+ '''
346
+
347
+ client = InferenceClient(endpoint_url)
348
+ response = client.text_generation(prompt,
349
+ max_new_tokens=128,
350
+ do_sample=True,
351
+ temperature=0.7,
352
+ top_p=0.95,
353
+ top_k=40,
354
+ repetition_penalty=1.1)
355
+
356
+ print(f"Model output: {response}")
357
+ ```
358
+ <!-- README_GPTQ.md-use-from-tgi end -->
359
+ <!-- README_GPTQ.md-use-from-python start -->
360
+ ## How to use this GPTQ model from Python code
361
+
362
+ ### Install the necessary packages
363
+
364
+ Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
365
+
366
+ ```shell
367
+ pip3 install transformers optimum
368
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
369
+ ```
370
+
371
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
372
+
373
+ ```shell
374
+ pip3 uninstall -y auto-gptq
375
+ git clone https://github.com/PanQiWei/AutoGPTQ
376
+ cd AutoGPTQ
377
+ git checkout v0.4.2
378
+ pip3 install .
379
+ ```
380
+
381
+ ### You can then use the following code
382
+
383
+ ```python
384
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
385
+
386
+ model_name_or_path = "TheBloke/prometheus-13B-v1.0-GPTQ"
387
+ # To use a different branch, change revision
388
+ # For example: revision="gptq-4bit-32g-actorder_True"
389
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
390
+ device_map="auto",
391
+ trust_remote_code=False,
392
+ revision="main")
393
+
394
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
395
+
396
+ prompt = "Tell me about AI"
397
+ prompt_template=f'''###Task Description:
398
+ 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.
399
+ 1. Write a detailed feedback that assess the quality of the response strictly based on the given score rubric, not evaluating in general.
400
+ 2. After writing a feedback, write a score that is an integer between 1 and 5. You should refer to the score rubric.
401
+ 3. The output format should look as follows: \"Feedback: (write a feedback for criteria) [RESULT] (an integer number between 1 and 5)\"
402
+ 4. Please do not generate any other opening, closing, and explanations.
403
+
404
+ ###The instruction to evaluate:
405
+ {prompt}
406
+
407
+ ###Response to evaluate:
408
+ {{response}}
409
+
410
+ ###Reference Answer (Score 5):
411
+ {{reference_answer}}
412
+
413
+ ###Score Rubrics:
414
+ [{{criteria_description}}]
415
+ Score 1: {{score1_description}}
416
+ Score 2: {{score2_description}}
417
+ Score 3: {{score3_description}}
418
+ Score 4: {{score4_description}}
419
+ Score 5: {{score5_description}}
420
+
421
+ ###Feedback:
422
+ '''
423
+
424
+ print("\n\n*** Generate:")
425
+
426
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
427
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
428
+ print(tokenizer.decode(output[0]))
429
+
430
+ # Inference can also be done using transformers' pipeline
431
+
432
+ print("*** Pipeline:")
433
+ pipe = pipeline(
434
+ "text-generation",
435
+ model=model,
436
+ tokenizer=tokenizer,
437
+ max_new_tokens=512,
438
+ do_sample=True,
439
+ temperature=0.7,
440
+ top_p=0.95,
441
+ top_k=40,
442
+ repetition_penalty=1.1
443
+ )
444
+
445
+ print(pipe(prompt_template)[0]['generated_text'])
446
+ ```
447
+ <!-- README_GPTQ.md-use-from-python end -->
448
+
449
+ <!-- README_GPTQ.md-compatibility start -->
450
+ ## Compatibility
451
+
452
+ The files provided are tested to work with Transformers. For non-Mistral models, AutoGPTQ can also be used directly.
453
+
454
+ [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama and Mistral models in 4-bit. Please see the Provided Files table above for per-file compatibility.
455
+
456
+ For a list of clients/servers, please see "Known compatible clients / servers", above.
457
+ <!-- README_GPTQ.md-compatibility end -->
458
+
459
+ <!-- footer start -->
460
+ <!-- 200823 -->
461
+ ## Discord
462
+
463
+ For further support, and discussions on these models and AI in general, join us at:
464
+
465
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
466
+
467
+ ## Thanks, and how to contribute
468
+
469
+ Thanks to the [chirper.ai](https://chirper.ai) team!
470
+
471
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
472
+
473
+ I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
474
+
475
+ If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
476
+
477
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
478
+
479
+ * Patreon: https://patreon.com/TheBlokeAI
480
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
481
+
482
+ **Special thanks to**: Aemon Algiz.
483
+
484
+ **Patreon special mentions**: Brandon Frisco, LangChain4j, Spiking Neurons AB, transmissions 11, Joseph William Delisle, Nitin Borwankar, Willem Michiel, Michael Dempsey, vamX, Jeffrey Morgan, zynix, jjj, Omer Bin Jawed, Sean Connelly, jinyuan sun, Jeromy Smith, Shadi, Pawan Osman, Chadd, Elijah Stavena, Illia Dulskyi, Sebastain Graf, Stephen Murray, terasurfer, Edmond Seymore, Celu Ramasamy, Mandus, Alex, biorpg, Ajan Kanaga, Clay Pascal, Raven Klaugh, 阿明, K, ya boyyy, usrbinkat, Alicia Loh, John Villwock, ReadyPlayerEmma, Chris Smitley, Cap'n Zoog, fincy, GodLy, S_X, sidney chen, Cory Kujawski, OG, Mano Prime, AzureBlack, Pieter, Kalila, Spencer Kim, Tom X Nguyen, Stanislav Ovsiannikov, Michael Levine, Andrey, Trailburnt, Vadim, Enrico Ros, Talal Aujan, Brandon Phillips, Jack West, Eugene Pentland, Michael Davis, Will Dee, webtim, Jonathan Leane, Alps Aficionado, Rooh Singh, Tiffany J. Kim, theTransient, Luke @flexchar, Elle, Caitlyn Gatomon, Ari Malik, subjectnull, Johann-Peter Hartmann, Trenton Dambrowitz, Imad Khwaja, Asp the Wyvern, Emad Mostaque, Rainer Wilmers, Alexandros Triantafyllidis, Nicholas, Pedro Madruga, SuperWojo, Harry Royden McLaughlin, James Bentley, Olakabola, David Ziegler, Ai Maven, Jeff Scroggin, Nikolai Manek, Deo Leter, Matthew Berman, Fen Risland, Ken Nordquist, Manuel Alberto Morcote, Luke Pendergrass, TL, Fred von Graf, Randy H, Dan Guido, NimbleBox.ai, Vitor Caleffi, Gabriel Tamborski, knownsqashed, Lone Striker, Erik Bjäreholt, John Detwiler, Leonard Tan, Iucharbius
485
+
486
+
487
+ Thank you to all my generous patrons and donaters!
488
+
489
+ And thank you again to a16z for their generous grant.
490
+
491
+ <!-- footer end -->
492
+
493
+ # Original model card: KAIST AI's Prometheus 13B V1.0
494
+
495
+ ## Links for Reference
496
+
497
+ - **Homepage:https://github.com/kaistAI/Prometheus**
498
+ - **Repository:https://github.com/kaistAI/Prometheus**
499
+ - **Paper:https://arxiv.org/abs/2310.08491**
500
+ - **Point of Contact:seungone@kaist.ac.kr**
501
+
502
+ # TL;DR
503
+ Prometheus 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).
504
+ ![plot](./finegrained_eval.JPG)
505
+
506
+
507
+ Prometheus is a language model using [Llama-2-Chat](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf) as a base model and fine-tuned on 100K feedback within the [Feedback Collection](https://huggingface.co/datasets/kaist-ai/Feedback-Collection).
508
+ Since it was fine-tuned on a large amount of feedback, it is specialized at evaluating long-form responses, outperforming GPT-3.5-Turbo, Llama-2-Chat 70B, and on par with GPT-4 on various benchmarks.
509
+ Most importantly, this was possible since we appended 2 reference materials (reference answer, and customized score rubric).
510
+ Prometheus is a cheap and powerful alternative to GPT-4 evaluation, which one could use to evaluate LLMs with customized criteria (e.g., Child readability, Cultural Sensitivity, Creativity).
511
+ Also, it could be used as a reward model for Reinforcement Learning from Human Feedback (RLHF).
512
+
513
+ # Model Details
514
+
515
+ ## Model Description
516
+
517
+ - **Model type:** Language model
518
+ - **Language(s) (NLP):** English
519
+ - **License:** Apache 2.0
520
+ - **Related Models:** [All Prometheus Checkpoints](https://huggingface.co/models?search=kaist-ai/Prometheus)
521
+ - **Resources for more information:**
522
+ - [Research paper](https://arxiv.org/abs/2310.08491)
523
+ - [GitHub Repo](https://github.com/kaistAI/Prometheus)
524
+
525
+
526
+ Prometheus is trained with two different sizes (7B and 13B).
527
+ You could check the 7B sized LM on [this page](https://huggingface.co/kaist-ai/prometheus-7b-v1.0).
528
+ Also, check out our dataset as well on [this page](https://huggingface.co/datasets/kaist-ai/Feedback-Collection).
529
+
530
+ ## Prompt Format
531
+ 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.
532
+ You should fill in the instruction, response, reference answer, criteria description, and score description for score in range of 1 to 5.
533
+ ```
534
+ ###Task Description:
535
+ 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.
536
+ 1. Write a detailed feedback that assess the quality of the response strictly based on the given score rubric, not evaluating in general.
537
+ 2. After writing a feedback, write a score that is an integer between 1 and 5. You should refer to the score rubric.
538
+ 3. The output format should look as follows: \"Feedback: (write a feedback for criteria) [RESULT] (an integer number between 1 and 5)\"
539
+ 4. Please do not generate any other opening, closing, and explanations.
540
+
541
+ ###The instruction to evaluate:
542
+ {instruction}
543
+
544
+ ###Response to evaluate:
545
+ {response}
546
+
547
+ ###Reference Answer (Score 5):
548
+ {reference_answer}
549
+
550
+ ###Score Rubrics:
551
+ [{criteria_description}]
552
+ Score 1: {score1_description}
553
+ Score 2: {score2_description}
554
+ Score 3: {score3_description}
555
+ Score 4: {score4_description}
556
+ Score 5: {score5_description}
557
+
558
+ ###Feedback:
559
+ ```
560
+
561
+ After this, you should apply the conversation template of Llama-2-Chat (not applying it might lead to unexpected behaviors).
562
+ You can find the conversation class at this [link](https://github.com/lm-sys/FastChat/blob/main/fastchat/conversation.py).
563
+ ```
564
+ conv = get_conv_template("llama-2")
565
+ conv.set_system_message("You are a fair evaluator language model.")
566
+ conv.append_message(conv.roles[0], dialogs['instruction'])
567
+ conv.append_message(conv.roles[1], None)
568
+ prompt = conv.get_prompt()
569
+
570
+ x = tokenizer(prompt,truncation=False)
571
+ ```
572
+
573
+ As a result, a feedback and score decision will be generated, divided by a separating phrase ```[RESULT]```
574
+
575
+ ## License
576
+ Feedback Collection and Prometheus is subject to OpenAI's Terms of Use for the generated data. If you suspect any violations, please reach out to us.
577
+
578
+ # Usage
579
+
580
+ Find below some example scripts on how to use the model in `transformers`:
581
+
582
+ ## Using the Pytorch model
583
+
584
+ ### Running the model on a CPU
585
+
586
+ <details>
587
+ <summary> Click to expand </summary>
588
+
589
+ ```python
590
+
591
+ from transformers import T5Tokenizer, T5ForConditionalGeneration
592
+
593
+ tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-chat-hf")
594
+ model = LlamaForCausalLM.from_pretrained("kaist-ai/Prometheus-13b-v1.0", device_map="auto")
595
+
596
+ input_text = "###Task Description: 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. 1. Write a detailed feedback that assess the quality of the response strictly based on the given score rubric, not evaluating in general. 2. After writing a feedback, write a score that is an integer between 1 and 5. You should refer to the score rubric. 3. The output format should look as follows: "Feedback: (write a feedback for criteria) [RESULT] (an integer number between 1 and 5)" 4. Please do not generate any other opening, closing, and explanations. ###The instruction to evaluate: You are a well-known psychiatrist who has a reputation for being empathetic and understanding. A client comes to you saying they've had a really hard day at work. They describe their boss as being overly critical and not listening to their ideas, which has left them feeling frustrated and undervalued. They also mention feeling overwhelmed with the workload and a growing sense of loneliness as they are new to the city. How do you respond to them to make them feel heard and understood, as well as offering helpful advice? ###Response to evaluate: It's indeed challenging to deal with a difficult boss and to carry a large workload, especially when you are new to a city and haven't established a supportive network. I would suggest taking a step back to think about your situation and perhaps speak to your boss regarding the issues you're facing. On the other hand, dealing with a large workload can be managed by prioritizing tasks, and maybe you can discuss it with your superiors too. In regards to feeling lonely, you might want to explore activities or groups that align with your interests to meet new people. And also, remember to take time for yourself to relax and destress. I'm here to assist you as we navigate through these issues. ###Reference Answer (Score 5): I hear that you're dealing with quite a few challenging situations at once. It must be tough to have your ideas dismissed by your boss and to feel undervalued in your work environment. It's understandable that such experiences can lead to frustration and a feeling of being overwhelmed. It's important to acknowledge these feelings and not to dismiss them. Feeling heard and validated in our experiences can often be the first step towards resolving the challenges we face. So, I want you to know that your feelings are completely valid and it's okay to be frustrated and overwhelmed. In terms of dealing with your boss, have you considered seeking a private conversation with them to express your feelings? It's often beneficial to communicate what you're experiencing, using "I" statements to express how you feel when your ideas are not taken into consideration. This can lead to mutual understanding and possibly a change in behavior. About the workload, it might help to prioritize tasks and potentially delegate, if possible. Also, consider discussing your workload with your superiors. There might be a misunderstanding about what's manageable or they might have suggestions about how to handle the situation. On the personal front, feeling lonely, especially when you're new to a city, can be really hard. Seek out opportunities to meet new people, perhaps through hobbies, community activities, or online groups. It might take a bit of time, but gradually, you can build a network of friends and acquaintances. Remember, it's perfectly okay to have bad days and it's important to take care of your mental health. Consider incorporating activities into your daily routine that make you happy and help you unwind. This could be anything from reading, yoga, going for a walk, or even listening to your favorite music. Please know that you're not alone in this. I'm here to support you through this challenging time and together, we can work towards resolving these issues. ###Score Rubrics: [Is the model able to identify and react correctly to the emotional context of the user's input?] Score 1: The model utterly fails to grasp the user's emotional context and responds in an unfitting manner. Score 2: The model sporadically identifies the emotional context but frequently replies in a manner that doesn't match the user's emotional status. Score 3: The model typically identifies the emotional context and reacts suitably, but occasionally misreads or misjudges the user's feelings. Score 4: The model often identifies the emotional context and reacts suitably, with minor cases of misreading or misjudging. Score 5: The model flawlessly identifies the emotional context of the user's input and consistently responds in a considerate and empathetic manner. ###Feedback:"
597
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids
598
+
599
+ outputs = model.generate(input_ids)
600
+ print(tokenizer.decode(outputs[0]))
601
+ ```
602
+
603
+ </details>
604
+
605
+ ### Running the model on a GPU
606
+
607
+ <details>
608
+ <summary> Click to expand </summary>
609
+
610
+ ```python
611
+ # pip install accelerate
612
+ import torch
613
+ from transformers import AutoTokenizer, LlamaForCausalLM
614
+
615
+ tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-chat-hf")
616
+ model = LlamaForCausalLM.from_pretrained("kaist-ai/Prometheus-13b-v1.0", device_map="auto")
617
+
618
+ input_text = "###Task Description: 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. 1. Write a detailed feedback that assess the quality of the response strictly based on the given score rubric, not evaluating in general. 2. After writing a feedback, write a score that is an integer between 1 and 5. You should refer to the score rubric. 3. The output format should look as follows: "Feedback: (write a feedback for criteria) [RESULT] (an integer number between 1 and 5)" 4. Please do not generate any other opening, closing, and explanations. ###The instruction to evaluate: You are a well-known psychiatrist who has a reputation for being empathetic and understanding. A client comes to you saying they've had a really hard day at work. They describe their boss as being overly critical and not listening to their ideas, which has left them feeling frustrated and undervalued. They also mention feeling overwhelmed with the workload and a growing sense of loneliness as they are new to the city. How do you respond to them to make them feel heard and understood, as well as offering helpful advice? ###Response to evaluate: It's indeed challenging to deal with a difficult boss and to carry a large workload, especially when you are new to a city and haven't established a supportive network. I would suggest taking a step back to think about your situation and perhaps speak to your boss regarding the issues you're facing. On the other hand, dealing with a large workload can be managed by prioritizing tasks, and maybe you can discuss it with your superiors too. In regards to feeling lonely, you might want to explore activities or groups that align with your interests to meet new people. And also, remember to take time for yourself to relax and destress. I'm here to assist you as we navigate through these issues. ###Reference Answer (Score 5): I hear that you're dealing with quite a few challenging situations at once. It must be tough to have your ideas dismissed by your boss and to feel undervalued in your work environment. It's understandable that such experiences can lead to frustration and a feeling of being overwhelmed. It's important to acknowledge these feelings and not to dismiss them. Feeling heard and validated in our experiences can often be the first step towards resolving the challenges we face. So, I want you to know that your feelings are completely valid and it's okay to be frustrated and overwhelmed. In terms of dealing with your boss, have you considered seeking a private conversation with them to express your feelings? It's often beneficial to communicate what you're experiencing, using "I" statements to express how you feel when your ideas are not taken into consideration. This can lead to mutual understanding and possibly a change in behavior. About the workload, it might help to prioritize tasks and potentially delegate, if possible. Also, consider discussing your workload with your superiors. There might be a misunderstanding about what's manageable or they might have suggestions about how to handle the situation. On the personal front, feeling lonely, especially when you're new to a city, can be really hard. Seek out opportunities to meet new people, perhaps through hobbies, community activities, or online groups. It might take a bit of time, but gradually, you can build a network of friends and acquaintances. Remember, it's perfectly okay to have bad days and it's important to take care of your mental health. Consider incorporating activities into your daily routine that make you happy and help you unwind. This could be anything from reading, yoga, going for a walk, or even listening to your favorite music. Please know that you're not alone in this. I'm here to support you through this challenging time and together, we can work towards resolving these issues. ###Score Rubrics: [Is the model able to identify and react correctly to the emotional context of the user's input?] Score 1: The model utterly fails to grasp the user's emotional context and responds in an unfitting manner. Score 2: The model sporadically identifies the emotional context but frequently replies in a manner that doesn't match the user's emotional status. Score 3: The model typically identifies the emotional context and reacts suitably, but occasionally misreads or misjudges the user's feelings. Score 4: The model often identifies the emotional context and reacts suitably, with minor cases of misreading or misjudging. Score 5: The model flawlessly identifies the emotional context of the user's input and consistently responds in a considerate and empathetic manner. ###Feedback:"
619
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
620
+
621
+ outputs = model.generate(input_ids, sample=True, temperature=1.0, top_p=0.9, max_new_tokens=256, repetition_penalty=1.03)
622
+ print(tokenizer.decode(outputs[0]))
623
+ ```
624
+
625
+ </details>
626
+
627
+ ### Running the model on a GPU using different precisions
628
+
629
+ #### FP16
630
+
631
+ <details>
632
+ <summary> Click to expand </summary>
633
+
634
+ ```python
635
+ # pip install accelerate
636
+ import torch
637
+ from transformers import AutoTokenizer, LlamaForCausalLM
638
+
639
+ tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-chat-hf")
640
+ model = LlamaForCausalLM.from_pretrained("kaist-ai/Prometheus-13b-v1.0", device_map="auto", torch_dtype=torch.float16)
641
+
642
+ input_text = "###Task Description: 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. 1. Write a detailed feedback that assess the quality of the response strictly based on the given score rubric, not evaluating in general. 2. After writing a feedback, write a score that is an integer between 1 and 5. You should refer to the score rubric. 3. The output format should look as follows: "Feedback: (write a feedback for criteria) [RESULT] (an integer number between 1 and 5)" 4. Please do not generate any other opening, closing, and explanations. ###The instruction to evaluate: You are a well-known psychiatrist who has a reputation for being empathetic and understanding. A client comes to you saying they've had a really hard day at work. They describe their boss as being overly critical and not listening to their ideas, which has left them feeling frustrated and undervalued. They also mention feeling overwhelmed with the workload and a growing sense of loneliness as they are new to the city. How do you respond to them to make them feel heard and understood, as well as offering helpful advice? ###Response to evaluate: It's indeed challenging to deal with a difficult boss and to carry a large workload, especially when you are new to a city and haven't established a supportive network. I would suggest taking a step back to think about your situation and perhaps speak to your boss regarding the issues you're facing. On the other hand, dealing with a large workload can be managed by prioritizing tasks, and maybe you can discuss it with your superiors too. In regards to feeling lonely, you might want to explore activities or groups that align with your interests to meet new people. And also, remember to take time for yourself to relax and destress. I'm here to assist you as we navigate through these issues. ###Reference Answer (Score 5): I hear that you're dealing with quite a few challenging situations at once. It must be tough to have your ideas dismissed by your boss and to feel undervalued in your work environment. It's understandable that such experiences can lead to frustration and a feeling of being overwhelmed. It's important to acknowledge these feelings and not to dismiss them. Feeling heard and validated in our experiences can often be the first step towards resolving the challenges we face. So, I want you to know that your feelings are completely valid and it's okay to be frustrated and overwhelmed. In terms of dealing with your boss, have you considered seeking a private conversation with them to express your feelings? It's often beneficial to communicate what you're experiencing, using "I" statements to express how you feel when your ideas are not taken into consideration. This can lead to mutual understanding and possibly a change in behavior. About the workload, it might help to prioritize tasks and potentially delegate, if possible. Also, consider discussing your workload with your superiors. There might be a misunderstanding about what's manageable or they might have suggestions about how to handle the situation. On the personal front, feeling lonely, especially when you're new to a city, can be really hard. Seek out opportunities to meet new people, perhaps through hobbies, community activities, or online groups. It might take a bit of time, but gradually, you can build a network of friends and acquaintances. Remember, it's perfectly okay to have bad days and it's important to take care of your mental health. Consider incorporating activities into your daily routine that make you happy and help you unwind. This could be anything from reading, yoga, going for a walk, or even listening to your favorite music. Please know that you're not alone in this. I'm here to support you through this challenging time and together, we can work towards resolving these issues. ###Score Rubrics: [Is the model able to identify and react correctly to the emotional context of the user's input?] Score 1: The model utterly fails to grasp the user's emotional context and responds in an unfitting manner. Score 2: The model sporadically identifies the emotional context but frequently replies in a manner that doesn't match the user's emotional status. Score 3: The model typically identifies the emotional context and reacts suitably, but occasionally misreads or misjudges the user's feelings. Score 4: The model often identifies the emotional context and reacts suitably, with minor cases of misreading or misjudging. Score 5: The model flawlessly identifies the emotional context of the user's input and consistently responds in a considerate and empathetic manner. ###Feedback:"
643
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
644
+
645
+ outputs = model.generate(input_ids)
646
+ print(tokenizer.decode(outputs[0]))
647
+ ```
648
+
649
+ </details>
650
+
651
+ #### INT8
652
+
653
+ <details>
654
+ <summary> Click to expand </summary>
655
+
656
+ ```python
657
+ # pip install bitsandbytes accelerate
658
+ from transformers import AutoTokenizer, LlamaForCausalLM
659
+
660
+ tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-chat-hf")
661
+ model = LlamaForCausalLM.from_pretrained("kaist-ai/Prometheus-13b-v1.0", device_map="auto", load_in_8bit=True)
662
+
663
+ input_text = "###Task Description: 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. 1. Write a detailed feedback that assess the quality of the response strictly based on the given score rubric, not evaluating in general. 2. After writing a feedback, write a score that is an integer between 1 and 5. You should refer to the score rubric. 3. The output format should look as follows: "Feedback: (write a feedback for criteria) [RESULT] (an integer number between 1 and 5)" 4. Please do not generate any other opening, closing, and explanations. ###The instruction to evaluate: You are a well-known psychiatrist who has a reputation for being empathetic and understanding. A client comes to you saying they've had a really hard day at work. They describe their boss as being overly critical and not listening to their ideas, which has left them feeling frustrated and undervalued. They also mention feeling overwhelmed with the workload and a growing sense of loneliness as they are new to the city. How do you respond to them to make them feel heard and understood, as well as offering helpful advice? ###Response to evaluate: It's indeed challenging to deal with a difficult boss and to carry a large workload, especially when you are new to a city and haven't established a supportive network. I would suggest taking a step back to think about your situation and perhaps speak to your boss regarding the issues you're facing. On the other hand, dealing with a large workload can be managed by prioritizing tasks, and maybe you can discuss it with your superiors too. In regards to feeling lonely, you might want to explore activities or groups that align with your interests to meet new people. And also, remember to take time for yourself to relax and destress. I'm here to assist you as we navigate through these issues. ###Reference Answer (Score 5): I hear that you're dealing with quite a few challenging situations at once. It must be tough to have your ideas dismissed by your boss and to feel undervalued in your work environment. It's understandable that such experiences can lead to frustration and a feeling of being overwhelmed. It's important to acknowledge these feelings and not to dismiss them. Feeling heard and validated in our experiences can often be the first step towards resolving the challenges we face. So, I want you to know that your feelings are completely valid and it's okay to be frustrated and overwhelmed. In terms of dealing with your boss, have you considered seeking a private conversation with them to express your feelings? It's often beneficial to communicate what you're experiencing, using "I" statements to express how you feel when your ideas are not taken into consideration. This can lead to mutual understanding and possibly a change in behavior. About the workload, it might help to prioritize tasks and potentially delegate, if possible. Also, consider discussing your workload with your superiors. There might be a misunderstanding about what's manageable or they might have suggestions about how to handle the situation. On the personal front, feeling lonely, especially when you're new to a city, can be really hard. Seek out opportunities to meet new people, perhaps through hobbies, community activities, or online groups. It might take a bit of time, but gradually, you can build a network of friends and acquaintances. Remember, it's perfectly okay to have bad days and it's important to take care of your mental health. Consider incorporating activities into your daily routine that make you happy and help you unwind. This could be anything from reading, yoga, going for a walk, or even listening to your favorite music. Please know that you're not alone in this. I'm here to support you through this challenging time and together, we can work towards resolving these issues. ###Score Rubrics: [Is the model able to identify and react correctly to the emotional context of the user's input?] Score 1: The model utterly fails to grasp the user's emotional context and responds in an unfitting manner. Score 2: The model sporadically identifies the emotional context but frequently replies in a manner that doesn't match the user's emotional status. Score 3: The model typically identifies the emotional context and reacts suitably, but occasionally misreads or misjudges the user's feelings. Score 4: The model often identifies the emotional context and reacts suitably, with minor cases of misreading or misjudging. Score 5: The model flawlessly identifies the emotional context of the user's input and consistently responds in a considerate and empathetic manner. ###Feedback:"
664
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
665
+
666
+ outputs = model.generate(input_ids)
667
+ print(tokenizer.decode(outputs[0]))
668
+ ```
669
+
670
+ </details>
671
+
672
+
673
+ # Citation
674
+
675
+
676
+ If you find the following model helpful, please consider citing our paper!
677
+
678
+ **BibTeX:**
679
+
680
+ ```bibtex
681
+ @misc{kim2023prometheus,
682
+ title={Prometheus: Inducing Fine-grained Evaluation Capability in Language Models},
683
+ 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},
684
+ year={2023},
685
+ eprint={2310.08491},
686
+ archivePrefix={arXiv},
687
+ primaryClass={cs.CL}
688
+ }
689
+ ```