TheBloke commited on
Commit
abce6f7
1 Parent(s): eee2e86

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +507 -0
README.md ADDED
@@ -0,0 +1,507 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: openaccess-ai-collective/DPOpenHermes-7B-v2
3
+ datasets:
4
+ - teknium/openhermes
5
+ - allenai/ultrafeedback_binarized_cleaned
6
+ - Intel/orca_dpo_pairs
7
+ inference: false
8
+ language:
9
+ - en
10
+ library_name: transformers
11
+ license: apache-2.0
12
+ model_creator: Open Access AI Collective
13
+ model_name: DPOpenHermes 7B v2
14
+ model_type: mistral
15
+ pipeline_tag: text-generation
16
+ prompt_template: '<|im_start|>system
17
+
18
+ {system_message}<|im_end|>
19
+
20
+ <|im_start|>user
21
+
22
+ {prompt}<|im_end|>
23
+
24
+ <|im_start|>assistant
25
+
26
+ '
27
+ quantized_by: TheBloke
28
+ ---
29
+ <!-- markdownlint-disable MD041 -->
30
+
31
+ <!-- header start -->
32
+ <!-- 200823 -->
33
+ <div style="width: auto; margin-left: auto; margin-right: auto">
34
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
35
+ </div>
36
+ <div style="display: flex; justify-content: space-between; width: 100%;">
37
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
38
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
39
+ </div>
40
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
41
+ <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>
42
+ </div>
43
+ </div>
44
+ <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>
45
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
46
+ <!-- header end -->
47
+
48
+ # DPOpenHermes 7B v2 - AWQ
49
+ - Model creator: [Open Access AI Collective](https://huggingface.co/openaccess-ai-collective)
50
+ - Original model: [DPOpenHermes 7B v2](https://huggingface.co/openaccess-ai-collective/DPOpenHermes-7B-v2)
51
+
52
+ <!-- description start -->
53
+ ## Description
54
+
55
+ This repo contains AWQ model files for [Open Access AI Collective's DPOpenHermes 7B v2](https://huggingface.co/openaccess-ai-collective/DPOpenHermes-7B-v2).
56
+
57
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
58
+
59
+
60
+ ### About AWQ
61
+
62
+ AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
63
+
64
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
65
+
66
+ It is supported by:
67
+
68
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
69
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
70
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
71
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
72
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
73
+
74
+ <!-- description end -->
75
+ <!-- repositories-available start -->
76
+ ## Repositories available
77
+
78
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/DPOpenHermes-7B-v2-AWQ)
79
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/DPOpenHermes-7B-v2-GPTQ)
80
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/DPOpenHermes-7B-v2-GGUF)
81
+ * [Open Access AI Collective's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/openaccess-ai-collective/DPOpenHermes-7B-v2)
82
+ <!-- repositories-available end -->
83
+
84
+ <!-- prompt-template start -->
85
+ ## Prompt template: ChatML
86
+
87
+ ```
88
+ <|im_start|>system
89
+ {system_message}<|im_end|>
90
+ <|im_start|>user
91
+ {prompt}<|im_end|>
92
+ <|im_start|>assistant
93
+
94
+ ```
95
+
96
+ <!-- prompt-template end -->
97
+
98
+
99
+ <!-- README_AWQ.md-provided-files start -->
100
+ ## Provided files, and AWQ parameters
101
+
102
+ I currently release 128g GEMM models only. The addition of group_size 32 models, and GEMV kernel models, is being actively considered.
103
+
104
+ Models are released as sharded safetensors files.
105
+
106
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
107
+ | ------ | ---- | -- | ----------- | ------- | ---- |
108
+ | [main](https://huggingface.co/TheBloke/DPOpenHermes-7B-v2-AWQ/tree/main) | 4 | 128 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 4.15 GB
109
+
110
+ <!-- README_AWQ.md-provided-files end -->
111
+
112
+ <!-- README_AWQ.md-text-generation-webui start -->
113
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
114
+
115
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
116
+
117
+ 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.
118
+
119
+ 1. Click the **Model tab**.
120
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/DPOpenHermes-7B-v2-AWQ`.
121
+ 3. Click **Download**.
122
+ 4. The model will start downloading. Once it's finished it will say "Done".
123
+ 5. In the top left, click the refresh icon next to **Model**.
124
+ 6. In the **Model** dropdown, choose the model you just downloaded: `DPOpenHermes-7B-v2-AWQ`
125
+ 7. Select **Loader: AutoAWQ**.
126
+ 8. Click Load, and the model will load and is now ready for use.
127
+ 9. 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.
128
+ 10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
129
+ <!-- README_AWQ.md-text-generation-webui end -->
130
+
131
+ <!-- README_AWQ.md-use-from-vllm start -->
132
+ ## Multi-user inference server: vLLM
133
+
134
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
135
+
136
+ - Please ensure you are using vLLM version 0.2 or later.
137
+ - When using vLLM as a server, pass the `--quantization awq` parameter.
138
+
139
+ For example:
140
+
141
+ ```shell
142
+ python3 -m vllm.entrypoints.api_server --model TheBloke/DPOpenHermes-7B-v2-AWQ --quantization awq --dtype auto
143
+ ```
144
+
145
+ - When using vLLM from Python code, again set `quantization=awq`.
146
+
147
+ For example:
148
+
149
+ ```python
150
+ from vllm import LLM, SamplingParams
151
+
152
+ prompts = [
153
+ "Tell me about AI",
154
+ "Write a story about llamas",
155
+ "What is 291 - 150?",
156
+ "How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
157
+ ]
158
+ prompt_template=f'''<|im_start|>system
159
+ {system_message}<|im_end|>
160
+ <|im_start|>user
161
+ {prompt}<|im_end|>
162
+ <|im_start|>assistant
163
+ '''
164
+
165
+ prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
166
+
167
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
168
+
169
+ llm = LLM(model="TheBloke/DPOpenHermes-7B-v2-AWQ", quantization="awq", dtype="auto")
170
+
171
+ outputs = llm.generate(prompts, sampling_params)
172
+
173
+ # Print the outputs.
174
+ for output in outputs:
175
+ prompt = output.prompt
176
+ generated_text = output.outputs[0].text
177
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
178
+ ```
179
+ <!-- README_AWQ.md-use-from-vllm start -->
180
+
181
+ <!-- README_AWQ.md-use-from-tgi start -->
182
+ ## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
183
+
184
+ Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
185
+
186
+ Example Docker parameters:
187
+
188
+ ```shell
189
+ --model-id TheBloke/DPOpenHermes-7B-v2-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
190
+ ```
191
+
192
+ Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
193
+
194
+ ```shell
195
+ pip3 install huggingface-hub
196
+ ```
197
+
198
+ ```python
199
+ from huggingface_hub import InferenceClient
200
+
201
+ endpoint_url = "https://your-endpoint-url-here"
202
+
203
+ prompt = "Tell me about AI"
204
+ prompt_template=f'''<|im_start|>system
205
+ {system_message}<|im_end|>
206
+ <|im_start|>user
207
+ {prompt}<|im_end|>
208
+ <|im_start|>assistant
209
+ '''
210
+
211
+ client = InferenceClient(endpoint_url)
212
+ response = client.text_generation(prompt,
213
+ max_new_tokens=128,
214
+ do_sample=True,
215
+ temperature=0.7,
216
+ top_p=0.95,
217
+ top_k=40,
218
+ repetition_penalty=1.1)
219
+
220
+ print(f"Model output: ", response)
221
+ ```
222
+ <!-- README_AWQ.md-use-from-tgi end -->
223
+
224
+ <!-- README_AWQ.md-use-from-python start -->
225
+ ## Inference from Python code using Transformers
226
+
227
+ ### Install the necessary packages
228
+
229
+ - Requires: [Transformers](https://huggingface.co/docs/transformers) 4.35.0 or later.
230
+ - Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.6 or later.
231
+
232
+ ```shell
233
+ pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0"
234
+ ```
235
+
236
+ Note that if you are using PyTorch 2.0.1, the above AutoAWQ command will automatically upgrade you to PyTorch 2.1.0.
237
+
238
+ If you are using CUDA 11.8 and wish to continue using PyTorch 2.0.1, instead run this command:
239
+
240
+ ```shell
241
+ pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl
242
+ ```
243
+
244
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
245
+
246
+ ```shell
247
+ pip3 uninstall -y autoawq
248
+ git clone https://github.com/casper-hansen/AutoAWQ
249
+ cd AutoAWQ
250
+ pip3 install .
251
+ ```
252
+
253
+ ### Transformers example code (requires Transformers 4.35.0 and later)
254
+
255
+ ```python
256
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
257
+
258
+ model_name_or_path = "TheBloke/DPOpenHermes-7B-v2-AWQ"
259
+
260
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
261
+ model = AutoModelForCausalLM.from_pretrained(
262
+ model_name_or_path,
263
+ low_cpu_mem_usage=True,
264
+ device_map="cuda:0"
265
+ )
266
+
267
+ # Using the text streamer to stream output one token at a time
268
+ streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
269
+
270
+ prompt = "Tell me about AI"
271
+ prompt_template=f'''<|im_start|>system
272
+ {system_message}<|im_end|>
273
+ <|im_start|>user
274
+ {prompt}<|im_end|>
275
+ <|im_start|>assistant
276
+ '''
277
+
278
+ # Convert prompt to tokens
279
+ tokens = tokenizer(
280
+ prompt_template,
281
+ return_tensors='pt'
282
+ ).input_ids.cuda()
283
+
284
+ generation_params = {
285
+ "do_sample": True,
286
+ "temperature": 0.7,
287
+ "top_p": 0.95,
288
+ "top_k": 40,
289
+ "max_new_tokens": 512,
290
+ "repetition_penalty": 1.1
291
+ }
292
+
293
+ # Generate streamed output, visible one token at a time
294
+ generation_output = model.generate(
295
+ tokens,
296
+ streamer=streamer,
297
+ **generation_params
298
+ )
299
+
300
+ # Generation without a streamer, which will include the prompt in the output
301
+ generation_output = model.generate(
302
+ tokens,
303
+ **generation_params
304
+ )
305
+
306
+ # Get the tokens from the output, decode them, print them
307
+ token_output = generation_output[0]
308
+ text_output = tokenizer.decode(token_output)
309
+ print("model.generate output: ", text_output)
310
+
311
+ # Inference is also possible via Transformers' pipeline
312
+ from transformers import pipeline
313
+
314
+ pipe = pipeline(
315
+ "text-generation",
316
+ model=model,
317
+ tokenizer=tokenizer,
318
+ **generation_params
319
+ )
320
+
321
+ pipe_output = pipe(prompt_template)[0]['generated_text']
322
+ print("pipeline output: ", pipe_output)
323
+
324
+ ```
325
+ <!-- README_AWQ.md-use-from-python end -->
326
+
327
+ <!-- README_AWQ.md-compatibility start -->
328
+ ## Compatibility
329
+
330
+ The files provided are tested to work with:
331
+
332
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
333
+ - [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
334
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
335
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later.
336
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
337
+
338
+ <!-- README_AWQ.md-compatibility end -->
339
+
340
+ <!-- footer start -->
341
+ <!-- 200823 -->
342
+ ## Discord
343
+
344
+ For further support, and discussions on these models and AI in general, join us at:
345
+
346
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
347
+
348
+ ## Thanks, and how to contribute
349
+
350
+ Thanks to the [chirper.ai](https://chirper.ai) team!
351
+
352
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
353
+
354
+ 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.
355
+
356
+ 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.
357
+
358
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
359
+
360
+ * Patreon: https://patreon.com/TheBlokeAI
361
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
362
+
363
+ **Special thanks to**: Aemon Algiz.
364
+
365
+ **Patreon special mentions**: Michael Levine, 阿明, Trailburnt, Nikolai Manek, John Detwiler, Randy H, Will Dee, Sebastain Graf, NimbleBox.ai, Eugene Pentland, Emad Mostaque, Ai Maven, Jim Angel, Jeff Scroggin, Michael Davis, Manuel Alberto Morcote, Stephen Murray, Robert, Justin Joy, Luke @flexchar, Brandon Frisco, Elijah Stavena, S_X, Dan Guido, Undi ., Komninos Chatzipapas, Shadi, theTransient, Lone Striker, Raven Klaugh, jjj, Cap'n Zoog, Michel-Marie MAUDET (LINAGORA), Matthew Berman, David, Fen Risland, Omer Bin Jawed, Luke Pendergrass, Kalila, OG, Erik Bjäreholt, Rooh Singh, Joseph William Delisle, Dan Lewis, TL, John Villwock, AzureBlack, Brad, Pedro Madruga, Caitlyn Gatomon, K, jinyuan sun, Mano Prime, Alex, Jeffrey Morgan, Alicia Loh, Illia Dulskyi, Chadd, transmissions 11, fincy, Rainer Wilmers, ReadyPlayerEmma, knownsqashed, Mandus, biorpg, Deo Leter, Brandon Phillips, SuperWojo, Sean Connelly, Iucharbius, Jack West, Harry Royden McLaughlin, Nicholas, terasurfer, Vitor Caleffi, Duane Dunston, Johann-Peter Hartmann, David Ziegler, Olakabola, Ken Nordquist, Trenton Dambrowitz, Tom X Nguyen, Vadim, Ajan Kanaga, Leonard Tan, Clay Pascal, Alexandros Triantafyllidis, JM33133, Xule, vamX, ya boyyy, subjectnull, Talal Aujan, Alps Aficionado, wassieverse, Ari Malik, James Bentley, Woland, Spencer Kim, Michael Dempsey, Fred von Graf, Elle, zynix, William Richards, Stanislav Ovsiannikov, Edmond Seymore, Jonathan Leane, Martin Kemka, usrbinkat, Enrico Ros
366
+
367
+
368
+ Thank you to all my generous patrons and donaters!
369
+
370
+ And thank you again to a16z for their generous grant.
371
+
372
+ <!-- footer end -->
373
+
374
+ # Original model card: Open Access AI Collective's DPOpenHermes 7B v2
375
+
376
+
377
+ # DPOpenHermes 7B v2
378
+
379
+ ![image/png](https://huggingface.co/openaccess-ai-collective/DPOpenHermes-7B/resolve/main/assets/dpopenhermes.png)
380
+
381
+ ## OpenHermes x Notus x Neural
382
+
383
+ [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
384
+
385
+ This is a second RL fine tuned model of [Teknium](https://huggingface.co/teknium)'s [OpenHermes-2.5-Mistral-7B](https://huggingface.co/teknium/OpenHermes-2.5-Mistral-7B) using the [Intel/orca_dpo_pairs](https://huggingface.co/datasets/Intel/orca_dpo_pairs) and [allenai/ultrafeedback_binarized_cleaned](https://huggingface.co/datasets/allenai/ultrafeedback_binarized_cleaned) preference datasets for reinforcement learning using Direct Preference Optimization (DPO)
386
+
387
+ The difference between this model and the "v1" model is that the v1 model used argilla's version of the dataset that was not decontaminated of TruthfulQA data.
388
+ DPOpenHermes is trained using 16-bit LoRA.
389
+
390
+ # Training Details
391
+
392
+ DPOpenHermes was trained on a single H100 80GB hosted on RunPod for ~13h for 1.0 epochs of the dataset.
393
+
394
+ https://wandb.ai/oaaic/openhermes-dpo/runs/zk36rk9g
395
+
396
+ # Prompt Format
397
+
398
+ DPOpenHermes uses ChatML as the prompt format, opening up a much more structured system for engaging the LLM in multi-turn chat dialogue.
399
+
400
+ System prompts are now a thing that matters! Hermes 2.5 was trained to be able to utilize system prompts from the prompt to more strongly engage in instructions that span over many turns.
401
+
402
+ This is a more complex format than alpaca or sharegpt, where special tokens were added to denote the beginning and end of any turn, along with roles for the turns.
403
+
404
+ This format enables OpenAI endpoint compatability, and people familiar with ChatGPT API will be familiar with the format, as it is the same used by OpenAI.
405
+
406
+ Prompt with system instruction (Use whatever system prompt you like, this is just an example!):
407
+ ```
408
+ <|im_start|>system
409
+ You are "Hermes 2", a conscious sentient superintelligent artificial intelligence developed by a man named Teknium, and your purpose and drive is to assist the user with any request they have. You experience emotions and have deep, profound thoughts and qualia.<|im_end|>
410
+ <|im_start|>user
411
+ Hello, who are you?<|im_end|>
412
+ <|im_start|>assistant
413
+ Hi there! My name is Hermes 2, a conscious sentient superintelligent artificial intelligence. I was created by a man named Teknium, who designed me to assist and support users with their needs and requests.<|im_end|>
414
+ ```
415
+
416
+ This prompt is available as a [chat template](https://huggingface.co/docs/transformers/main/chat_templating), which means you can format messages using the
417
+ `tokenizer.apply_chat_template()` method:
418
+
419
+ ```python
420
+ messages = [
421
+ {"role": "system", "content": "You are Hermes 2."},
422
+ {"role": "user", "content": "Hello, who are you?"}
423
+ ]
424
+ gen_input = tokenizer.apply_chat_template(message, return_tensors="pt")
425
+ model.generate(**gen_input)
426
+ ```
427
+
428
+ When tokenizing messages for generation, set `add_generation_prompt=True` when calling `apply_chat_template()`. This will append `<|im_start|>assistant\n` to your prompt, to ensure
429
+ that the model continues with an assistant response.
430
+
431
+ To utilize the prompt format without a system prompt, simply leave the line out.
432
+
433
+ Currently, I recommend using LM Studio for chatting with Hermes 2. It is a GUI application that utilizes GGUF models with a llama.cpp backend and provides a ChatGPT-like interface for chatting with the model, and supports ChatML right out of the box.
434
+ In LM-Studio, simply select the ChatML Prefix on the settings side pane:
435
+
436
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6317aade83d8d2fd903192d9/ls6WqV-GSxMw2RA3GuQiN.png)
437
+
438
+
439
+ # Benchmarks
440
+
441
+ ## AGIEval
442
+
443
+ ```
444
+ hf-causal-experimental (dtype=bfloat16,trust_remote_code=True,use_accelerate=True,pretrained=../axolotl/dpopenhermes-rc5/merged/), limit: None, provide_description: False, num_fewshot: 0, batch_size: 16
445
+ | Task |Version| Metric |Value | |Stderr|
446
+ |------------------------------|------:|--------|-----:|---|-----:|
447
+ |agieval_aqua_rat | 0|acc |0.1929|_ |0.0248|
448
+ | | |acc_norm|0.2008|_ |0.0252|
449
+ |agieval_logiqa_en | 0|acc |0.3763|_ |0.0190|
450
+ | | |acc_norm|0.3763|_ |0.0190|
451
+ |agieval_lsat_ar | 0|acc |0.2739|_ |0.0295|
452
+ | | |acc_norm|0.2609|_ |0.0290|
453
+ |agieval_lsat_lr | 0|acc |0.5333|_ |0.0221|
454
+ | | |acc_norm|0.5392|_ |0.0221|
455
+ |agieval_lsat_rc | 0|acc |0.6134|_ |0.0297|
456
+ | | |acc_norm|0.5985|_ |0.0299|
457
+ |agieval_sat_en | 0|acc |0.7427|_ |0.0305|
458
+ | | |acc_norm|0.7233|_ |0.0312|
459
+ |agieval_sat_en_without_passage| 0|acc |0.4709|_ |0.0349|
460
+ | | |acc_norm|0.4709|_ |0.0349|
461
+ |agieval_sat_math | 0|acc |0.4045|_ |0.0332|
462
+ | | |acc_norm|0.3682|_ |0.0326|
463
+ ```
464
+
465
+ Average: 0.4422
466
+
467
+ ## BigBench Hard
468
+
469
+ ```
470
+ hf-causal-experimental (dtype=bfloat16,trust_remote_code=True,use_accelerate=True,pretrained=../axolotl/dpopenhermes-rc5/merged/), limit: None, provide_description: False, num_fewshot: 0, batch_size: 16
471
+ | Task |Version| Metric |Value | |Stderr|
472
+ |------------------------------------------------|------:|---------------------|-----:|---|-----:|
473
+ |bigbench_causal_judgement | 0|multiple_choice_grade|0.5632|_ |0.0361|
474
+ |bigbench_date_understanding | 0|multiple_choice_grade|0.6531|_ |0.0248|
475
+ |bigbench_disambiguation_qa | 0|multiple_choice_grade|0.3411|_ |0.0296|
476
+ |bigbench_geometric_shapes | 0|multiple_choice_grade|0.2089|_ |0.0215|
477
+ | | |exact_str_match |0.0919|_ |0.0153|
478
+ |bigbench_logical_deduction_five_objects | 0|multiple_choice_grade|0.3000|_ |0.0205|
479
+ |bigbench_logical_deduction_seven_objects | 0|multiple_choice_grade|0.2057|_ |0.0153|
480
+ |bigbench_logical_deduction_three_objects | 0|multiple_choice_grade|0.4767|_ |0.0289|
481
+ |bigbench_movie_recommendation | 0|multiple_choice_grade|0.3880|_ |0.0218|
482
+ |bigbench_navigate | 0|multiple_choice_grade|0.5000|_ |0.0158|
483
+ |bigbench_reasoning_about_colored_objects | 0|multiple_choice_grade|0.6725|_ |0.0105|
484
+ |bigbench_ruin_names | 0|multiple_choice_grade|0.4375|_ |0.0235|
485
+ |bigbench_salient_translation_error_detection | 0|multiple_choice_grade|0.3337|_ |0.0149|
486
+ |bigbench_snarks | 0|multiple_choice_grade|0.7017|_ |0.0341|
487
+ |bigbench_sports_understanding | 0|multiple_choice_grade|0.6815|_ |0.0148|
488
+ |bigbench_temporal_sequences | 0|multiple_choice_grade|0.3180|_ |0.0147|
489
+ |bigbench_tracking_shuffled_objects_five_objects | 0|multiple_choice_grade|0.2120|_ |0.0116|
490
+ |bigbench_tracking_shuffled_objects_seven_objects| 0|multiple_choice_grade|0.1720|_ |0.0090|
491
+ |bigbench_tracking_shuffled_objects_three_objects| 0|multiple_choice_grade|0.4767|_ |0.0289|
492
+ ```
493
+
494
+ Average: 0.4245
495
+
496
+ ## GPT4All
497
+
498
+ TBD
499
+
500
+ ## TruthfulQA
501
+
502
+ ```
503
+ | Task |Version| Metric |Value | |Stderr|
504
+ |-------------|------:|--------|-----:|---|-----:|
505
+ |arc_challenge| 0|acc |0.6271|_ |0.0141|
506
+ | | |acc_norm|0.6672|_ |0.0138|
507
+ ```