TheBloke commited on
Commit
3f116d7
1 Parent(s): dda076b

Initial GGML model commit

Browse files
Files changed (1) hide show
  1. README.md +301 -0
README.md ADDED
@@ -0,0 +1,301 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ inference: false
3
+ language:
4
+ - en
5
+ license: other
6
+ model_type: llama
7
+ tags:
8
+ - llama-2
9
+ - self-instruct
10
+ - distillation
11
+ - synthetic instruction
12
+ ---
13
+
14
+ <!-- header start -->
15
+ <div style="width: 100%;">
16
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
17
+ </div>
18
+ <div style="display: flex; justify-content: space-between; width: 100%;">
19
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
20
+ <p><a href="https://discord.gg/theblokeai">Chat & support: my new Discord server</a></p>
21
+ </div>
22
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
23
+ <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
24
+ </div>
25
+ </div>
26
+ <!-- header end -->
27
+
28
+ # Nous Research's Nous Hermes Llama 2 13B GGML
29
+
30
+ These files are GGML format model files for [Nous Research's Nous Hermes Llama 2 13B](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b).
31
+
32
+ GGML files are for CPU + GPU inference using [llama.cpp](https://github.com/ggerganov/llama.cpp) and libraries and UIs which support this format, such as:
33
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a powerful GGML web UI with full GPU acceleration out of the box. Especially good for story telling.
34
+ * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with GPU acceleration via the c_transformers backend.
35
+ * [LM Studio](https://lmstudio.ai/), a fully featured local GUI. Supports full GPU accel on macOS. Also supports Windows, without GPU accel.
36
+ * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most popular web UI. Requires extra steps to enable GPU accel via llama.cpp backend.
37
+ * [ctransformers](https://github.com/marella/ctransformers), a Python library with LangChain support and OpenAI-compatible AI server.
38
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with OpenAI-compatible API server.
39
+
40
+
41
+ ## Repositories available
42
+
43
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Nous-Hermes-Llama2-GPTQ)
44
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/Nous-Hermes-Llama2-GGML)
45
+ * [Original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b)
46
+
47
+ ## Prompt template: Alpaca
48
+
49
+ ```
50
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
51
+
52
+ ### Instruction: {prompt}
53
+
54
+ ### Response:
55
+ ```
56
+
57
+ <!-- compatibility_ggml start -->
58
+ ## Compatibility
59
+
60
+ ### Original llama.cpp quant methods: `q4_0, q4_1, q5_0, q5_1, q8_0`
61
+
62
+ These are guaranteed to be compatible with any UIs, tools and libraries released since late May. They may be phased out soon, as they are largely superseded by the new k-quant methods.
63
+
64
+ ### New k-quant methods: `q2_K, q3_K_S, q3_K_M, q3_K_L, q4_K_S, q4_K_M, q5_K_S, q6_K`
65
+
66
+ These new quantisation methods are compatible with llama.cpp as of June 6th, commit `2d43387`.
67
+
68
+ They are now also compatible with recent releases of text-generation-webui, KoboldCpp, llama-cpp-python, ctransformers, rustformers and most others. For compatibility with other tools and libraries, please check their documentation.
69
+
70
+ ## Explanation of the new k-quant methods
71
+ <details>
72
+ <summary>Click to see details</summary>
73
+
74
+ The new methods available are:
75
+ * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw)
76
+ * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw.
77
+ * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw.
78
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
79
+ * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw
80
+ * GGML_TYPE_Q8_K - "type-0" 8-bit quantization. Only used for quantizing intermediate results. The difference to the existing Q8_0 is that the block size is 256. All 2-6 bit dot products are implemented for this quantization type.
81
+
82
+ Refer to the Provided Files table below to see what files use which methods, and how.
83
+ </details>
84
+ <!-- compatibility_ggml end -->
85
+
86
+ ## Provided files
87
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
88
+ | ---- | ---- | ---- | ---- | ---- | ----- |
89
+ | nous-hermes-llama2-13b.ggmlv3.q2_K.bin | q2_K | 2 | 5.74 GB| 8.24 GB | New k-quant method. Uses GGML_TYPE_Q4_K for the attention.vw and feed_forward.w2 tensors, GGML_TYPE_Q2_K for the other tensors. |
90
+ | nous-hermes-llama2-13b.ggmlv3.q3_K_L.bin | q3_K_L | 3 | 7.14 GB| 9.64 GB | New k-quant method. Uses GGML_TYPE_Q5_K for the attention.wv, attention.wo, and feed_forward.w2 tensors, else GGML_TYPE_Q3_K |
91
+ | nous-hermes-llama2-13b.ggmlv3.q3_K_M.bin | q3_K_M | 3 | 6.53 GB| 9.03 GB | New k-quant method. Uses GGML_TYPE_Q4_K for the attention.wv, attention.wo, and feed_forward.w2 tensors, else GGML_TYPE_Q3_K |
92
+ | nous-hermes-llama2-13b.ggmlv3.q3_K_S.bin | q3_K_S | 3 | 5.87 GB| 8.37 GB | New k-quant method. Uses GGML_TYPE_Q3_K for all tensors |
93
+ | nous-hermes-llama2-13b.ggmlv3.q4_0.bin | q4_0 | 4 | 7.32 GB| 9.82 GB | Original quant method, 4-bit. |
94
+ | nous-hermes-llama2-13b.ggmlv3.q4_1.bin | q4_1 | 4 | 8.14 GB| 10.64 GB | Original quant method, 4-bit. Higher accuracy than q4_0 but not as high as q5_0. However has quicker inference than q5 models. |
95
+ | nous-hermes-llama2-13b.ggmlv3.q4_K_M.bin | q4_K_M | 4 | 8.06 GB| 10.56 GB | New k-quant method. Uses GGML_TYPE_Q6_K for half of the attention.wv and feed_forward.w2 tensors, else GGML_TYPE_Q4_K |
96
+ | nous-hermes-llama2-13b.ggmlv3.q4_K_S.bin | q4_K_S | 4 | 7.56 GB| 10.06 GB | New k-quant method. Uses GGML_TYPE_Q4_K for all tensors |
97
+ | nous-hermes-llama2-13b.ggmlv3.q5_0.bin | q5_0 | 5 | 8.95 GB| 11.45 GB | Original quant method, 5-bit. Higher accuracy, higher resource usage and slower inference. |
98
+ | nous-hermes-llama2-13b.ggmlv3.q5_1.bin | q5_1 | 5 | 9.76 GB| 12.26 GB | Original quant method, 5-bit. Even higher accuracy, resource usage and slower inference. |
99
+ | nous-hermes-llama2-13b.ggmlv3.q5_K_M.bin | q5_K_M | 5 | 9.40 GB| 11.90 GB | New k-quant method. Uses GGML_TYPE_Q6_K for half of the attention.wv and feed_forward.w2 tensors, else GGML_TYPE_Q5_K |
100
+ | nous-hermes-llama2-13b.ggmlv3.q5_K_S.bin | q5_K_S | 5 | 9.15 GB| 11.65 GB | New k-quant method. Uses GGML_TYPE_Q5_K for all tensors |
101
+ | nous-hermes-llama2-13b.ggmlv3.q6_K.bin | q6_K | 6 | 10.83 GB| 13.33 GB | New k-quant method. Uses GGML_TYPE_Q8_K for all tensors - 6-bit quantization |
102
+ | nous-hermes-llama2-13b.ggmlv3.q8_0.bin | q8_0 | 8 | 13.83 GB| 16.33 GB | Original quant method, 8-bit. Almost indistinguishable from float16. High resource use and slow. Not recommended for most users. |
103
+
104
+ **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
105
+
106
+ ## How to run in `llama.cpp`
107
+
108
+ I use the following command line; adjust for your tastes and needs:
109
+
110
+ ```
111
+ ./main -t 10 -ngl 32 -m nous-hermes-llama2-13b.ggmlv3.q4_0.bin --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "### Instruction: Write a story about llamas\n### Response:"
112
+ ```
113
+ Change `-t 10` to the number of physical CPU cores you have. For example if your system has 8 cores/16 threads, use `-t 8`.
114
+
115
+ Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
116
+
117
+ If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
118
+
119
+ ## How to run in `text-generation-webui`
120
+
121
+ Further instructions here: [text-generation-webui/docs/llama.cpp-models.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp-models.md).
122
+
123
+ <!-- footer start -->
124
+ ## Discord
125
+
126
+ For further support, and discussions on these models and AI in general, join us at:
127
+
128
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
129
+
130
+ ## Thanks, and how to contribute.
131
+
132
+ Thanks to the [chirper.ai](https://chirper.ai) team!
133
+
134
+ 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.
135
+
136
+ 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.
137
+
138
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
139
+
140
+ * Patreon: https://patreon.com/TheBlokeAI
141
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
142
+
143
+ **Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
144
+
145
+ **Patreon special mentions**: Slarti, Chadd, John Detwiler, Pieter, zynix, K, Mano Prime, ReadyPlayerEmma, Ai Maven, Leonard Tan, Edmond Seymore, Joseph William Delisle, Luke @flexchar, Fred von Graf, Viktor Bowallius, Rishabh Srivastava, Nikolai Manek, Matthew Berman, Johann-Peter Hartmann, ya boyyy, Greatston Gnanesh, Femi Adebogun, Talal Aujan, Jonathan Leane, terasurfer, David Flickinger, William Sang, Ajan Kanaga, Vadim, Artur Olbinski, Raven Klaugh, Michael Levine, Oscar Rangel, Randy H, Cory Kujawski, RoA, Dave, Alex, Alexandros Triantafyllidis, Fen Risland, Eugene Pentland, vamX, Elle, Nathan LeClaire, Khalefa Al-Ahmad, Rainer Wilmers, subjectnull, Junyu Yang, Daniel P. Andersen, SuperWojo, LangChain4j, Mandus, Kalila, Illia Dulskyi, Trenton Dambrowitz, Asp the Wyvern, Derek Yates, Jeffrey Morgan, Deep Realms, Imad Khwaja, Pyrater, Preetika Verma, biorpg, Gabriel Tamborski, Stephen Murray, Spiking Neurons AB, Iucharbius, Chris Smitley, Willem Michiel, Luke Pendergrass, Sebastain Graf, senxiiz, Will Dee, Space Cruiser, Karl Bernard, Clay Pascal, Lone Striker, transmissions 11, webtim, WelcomeToTheClub, Sam, theTransient, Pierre Kircher, chris gileta, John Villwock, Sean Connelly, Willian Hasse
146
+
147
+
148
+ Thank you to all my generous patrons and donaters!
149
+
150
+ <!-- footer end -->
151
+
152
+ # Original model card: Nous Research's Nous Hermes Llama 2 13B
153
+
154
+
155
+ # Model Card: Nous-Hermes-Llama2-13b
156
+
157
+ Compute provided by our project sponsor Redmond AI, thank you! Follow RedmondAI on Twitter @RedmondAI.
158
+
159
+ ## Model Description
160
+
161
+ Nous-Hermes-Llama2-13b is a state-of-the-art language model fine-tuned on over 300,000 instructions. This model was fine-tuned by Nous Research, with Teknium and Emozilla leading the fine tuning process and dataset curation, Redmond AI sponsoring the compute, and several other contributors.
162
+
163
+ This Hermes model uses the exact same dataset as Hermes on Llama-1. This is to ensure consistency between the old Hermes and new, for anyone who wanted to keep Hermes as similar to the old one, just more capable.
164
+
165
+ This model stands out for its long responses, lower hallucination rate, and absence of OpenAI censorship mechanisms. The fine-tuning process was performed with a 4096 sequence length on an 8x a100 80GB DGX machine.
166
+
167
+ ## Example Outputs:
168
+ ![Example4](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b/resolve/main/example5.png "Example 4")
169
+ ![Example1](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b/resolve/main/Example1.png "Example 1")
170
+ ![Example2](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b/resolve/main/example2.png "Example 2")
171
+ ![Example3](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b/resolve/main/example3.png "Example 3")
172
+
173
+ ## Model Training
174
+
175
+ The model was trained almost entirely on synthetic GPT-4 outputs. Curating high quality GPT-4 datasets enables incredibly high quality in knowledge, task completion, and style.
176
+
177
+ This includes data from diverse sources such as GPTeacher, the general, roleplay v1&2, code instruct datasets, Nous Instruct & PDACTL (unpublished), and several others, detailed further below
178
+
179
+ ## Collaborators
180
+ The model fine-tuning and the datasets were a collaboration of efforts and resources between Teknium, Karan4D, Emozilla, Huemin Art, and Redmond AI.
181
+
182
+ Special mention goes to @winglian for assisting in some of the training issues.
183
+
184
+ Huge shoutout and acknowledgement is deserved for all the dataset creators who generously share their datasets openly.
185
+
186
+ Among the contributors of datasets:
187
+ - GPTeacher was made available by Teknium
188
+ - Wizard LM by nlpxucan
189
+ - Nous Research Instruct Dataset was provided by Karan4D and HueminArt.
190
+ - GPT4-LLM and Unnatural Instructions were provided by Microsoft
191
+ - Airoboros dataset by jondurbin
192
+ - Camel-AI's domain expert datasets are from Camel-AI
193
+ - CodeAlpaca dataset by Sahil 2801.
194
+
195
+ If anyone was left out, please open a thread in the community tab.
196
+
197
+ ## Prompt Format
198
+
199
+ The model follows the Alpaca prompt format:
200
+ ```
201
+ ### Instruction:
202
+ <prompt>
203
+
204
+ ### Response:
205
+ <leave a newline blank for model to respond>
206
+
207
+ ```
208
+
209
+ or
210
+
211
+ ```
212
+ ### Instruction:
213
+ <prompt>
214
+
215
+ ### Input:
216
+ <additional context>
217
+
218
+ ### Response:
219
+ <leave a newline blank for model to respond>
220
+
221
+ ```
222
+
223
+ ## Benchmark Results
224
+ AGI-Eval
225
+ ```
226
+ | Task |Version| Metric |Value | |Stderr|
227
+ |agieval_aqua_rat | 0|acc |0.2362|± |0.0267|
228
+ | | |acc_norm|0.2480|± |0.0272|
229
+ |agieval_logiqa_en | 0|acc |0.3425|± |0.0186|
230
+ | | |acc_norm|0.3472|± |0.0187|
231
+ |agieval_lsat_ar | 0|acc |0.2522|± |0.0287|
232
+ | | |acc_norm|0.2087|± |0.0269|
233
+ |agieval_lsat_lr | 0|acc |0.3510|± |0.0212|
234
+ | | |acc_norm|0.3627|± |0.0213|
235
+ |agieval_lsat_rc | 0|acc |0.4647|± |0.0305|
236
+ | | |acc_norm|0.4424|± |0.0303|
237
+ |agieval_sat_en | 0|acc |0.6602|± |0.0331|
238
+ | | |acc_norm|0.6165|± |0.0340|
239
+ |agieval_sat_en_without_passage| 0|acc |0.4320|± |0.0346|
240
+ | | |acc_norm|0.4272|± |0.0345|
241
+ |agieval_sat_math | 0|acc |0.2909|± |0.0307|
242
+ | | |acc_norm|0.2727|± |0.0301|
243
+ ```
244
+ GPT-4All Benchmark Set
245
+ ```
246
+ | Task |Version| Metric |Value | |Stderr|
247
+ |arc_challenge| 0|acc |0.5102|± |0.0146|
248
+ | | |acc_norm|0.5213|± |0.0146|
249
+ |arc_easy | 0|acc |0.7959|± |0.0083|
250
+ | | |acc_norm|0.7567|± |0.0088|
251
+ |boolq | 1|acc |0.8394|± |0.0064|
252
+ |hellaswag | 0|acc |0.6164|± |0.0049|
253
+ | | |acc_norm|0.8009|± |0.0040|
254
+ |openbookqa | 0|acc |0.3580|± |0.0215|
255
+ | | |acc_norm|0.4620|± |0.0223|
256
+ |piqa | 0|acc |0.7992|± |0.0093|
257
+ | | |acc_norm|0.8069|± |0.0092|
258
+ |winogrande | 0|acc |0.7127|± |0.0127|
259
+ ```
260
+ BigBench Reasoning Test
261
+ ```
262
+ | Task |Version| Metric |Value | |Stderr|
263
+
264
+ |bigbench_causal_judgement | 0|multiple_choice_grade|0.5526|± |0.0362|
265
+ |bigbench_date_understanding | 0|multiple_choice_grade|0.7344|± |0.0230|
266
+ |bigbench_disambiguation_qa | 0|multiple_choice_grade|0.2636|± |0.0275|
267
+ |bigbench_geometric_shapes | 0|multiple_choice_grade|0.0195|± |0.0073|
268
+ | | |exact_str_match |0.0000|± |0.0000|
269
+ |bigbench_logical_deduction_five_objects | 0|multiple_choice_grade|0.2760|± |0.0200|
270
+ |bigbench_logical_deduction_seven_objects | 0|multiple_choice_grade|0.2100|± |0.0154|
271
+ |bigbench_logical_deduction_three_objects | 0|multiple_choice_grade|0.4400|± |0.0287|
272
+ |bigbench_movie_recommendation | 0|multiple_choice_grade|0.2440|± |0.0192|
273
+ |bigbench_navigate | 0|multiple_choice_grade|0.4950|± |0.0158|
274
+ |bigbench_reasoning_about_colored_objects | 0|multiple_choice_grade|0.5570|± |0.0111|
275
+ |bigbench_ruin_names | 0|multiple_choice_grade|0.3728|± |0.0229|
276
+ |bigbench_salient_translation_error_detection | 0|multiple_choice_grade|0.1854|± |0.0123|
277
+ |bigbench_snarks | 0|multiple_choice_grade|0.6298|± |0.0360|
278
+ |bigbench_sports_understanding | 0|multiple_choice_grade|0.6156|± |0.0155|
279
+ |bigbench_temporal_sequences | 0|multiple_choice_grade|0.3140|± |0.0147|
280
+ |bigbench_tracking_shuffled_objects_five_objects | 0|multiple_choice_grade|0.2032|± |0.0114|
281
+ |bigbench_tracking_shuffled_objects_seven_objects| 0|multiple_choice_grade|0.1406|± |0.0083|
282
+ |bigbench_tracking_shuffled_objects_three_objects| 0|multiple_choice_grade|0.4400|± |0.0287|
283
+ ```
284
+
285
+ These are the highest benchmarks Hermes has seen on every metric, achieving the following average scores:
286
+ - GPT4All benchmark average is now 70.0 - from 68.8 in Hermes-Llama1
287
+ - 0.3657 on BigBench, up from 0.328 on hermes-llama1
288
+ - 0.372 on AGIEval, up from 0.354 on Hermes-llama1
289
+
290
+ These benchmarks currently have us at #1 on ARC-c, ARC-e, Hellaswag, and OpenBookQA, and 2nd place on Winogrande, comparing to GPT4all's benchmarking list, supplanting Hermes 1 for the new top position.
291
+
292
+ ## Resources for Applied Use Cases:
293
+ For an example of a back and forth chatbot using huggingface transformers and discord, check out: https://github.com/teknium1/alpaca-discord
294
+ For an example of a roleplaying discord chatbot, check out this: https://github.com/teknium1/alpaca-roleplay-discordbot
295
+
296
+ ## Future Plans
297
+ We plan to continue to iterate on both more high quality data, and new data filtering techniques to eliminate lower quality data going forward.
298
+
299
+ ## Model Usage
300
+ The model is available for download on Hugging Face. It is suitable for a wide range of language tasks, from generating creative text to understanding and following complex instructions.
301
+