TheBloke commited on
Commit
ea230e5
·
1 Parent(s): df974f8

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +97 -20
README.md CHANGED
@@ -43,7 +43,7 @@ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is
43
 
44
  The key benefit of GGUF is that it is a extensible, future-proof format which stores more information about the model as metadata. It also includes significantly improved tokenization code, including for the first time full support for special tokens. This should improve performance, especially with models that use new special tokens and implement custom prompt templates.
45
 
46
- As of August 25th, here is a list of clients and libraries that are known to support GGUF:
47
  * [llama.cpp](https://github.com/ggerganov/llama.cpp).
48
  * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI. Supports GGUF with GPU acceleration via the ctransformers backend - llama-cpp-python backend should work soon too.
49
  * [KoboldCpp](https://github.com/LostRuins/koboldcpp), now supports GGUF as of release 1.41! A powerful GGML web UI, with full GPU accel. Especially good for story telling.
@@ -53,9 +53,7 @@ As of August 25th, here is a list of clients and libraries that are known to sup
53
  * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), supports GGUF as of version 0.1.79. A Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
54
  * [candle](https://github.com/huggingface/candle), added GGUF support on August 22nd. Candle is a Rust ML framework with a focus on performance, including GPU support, and ease of use.
55
 
56
- The clients and libraries below are expecting to add GGUF support shortly:
57
  <!-- README_GGUF.md-about-gguf end -->
58
-
59
  <!-- repositories-available start -->
60
  ## Repositories available
61
 
@@ -85,9 +83,7 @@ The clients and libraries below are expecting to add GGUF support shortly:
85
 
86
  These quantised GGUF files are compatible with llama.cpp from August 21st 2023 onwards, as of commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9)
87
 
88
- As of August 24th 2023 they are now compatible with KoboldCpp, release 1.41 and later.
89
-
90
- They are are not yet compatible with any other third-party UIS, libraries or utilities but this is expected to change very soon.
91
 
92
  ## Explanation of quantisation methods
93
  <details>
@@ -120,24 +116,61 @@ Refer to the Provided Files table below to see what files use which methods, and
120
  | [model_007-70b.Q4_0.gguf](https://huggingface.co/TheBloke/model_007-70B-GGUF/blob/main/model_007-70b.Q4_0.gguf) | Q4_0 | 4 | 38.87 GB| 41.37 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
121
  | [model_007-70b.Q4_K_S.gguf](https://huggingface.co/TheBloke/model_007-70B-GGUF/blob/main/model_007-70b.Q4_K_S.gguf) | Q4_K_S | 4 | 39.07 GB| 41.57 GB | small, greater quality loss |
122
  | [model_007-70b.Q4_K_M.gguf](https://huggingface.co/TheBloke/model_007-70B-GGUF/blob/main/model_007-70b.Q4_K_M.gguf) | Q4_K_M | 4 | 41.42 GB| 43.92 GB | medium, balanced quality - recommended |
123
- | [model_007-70b.Q5_K_S.gguf](https://huggingface.co/TheBloke/model_007-70B-GGUF/blob/main/model_007-70b.Q5_K_S.gguf) | Q5_K_S | 5 | 47.46 GB| 49.96 GB | large, low quality loss - recommended |
124
  | [model_007-70b.Q5_0.gguf](https://huggingface.co/TheBloke/model_007-70B-GGUF/blob/main/model_007-70b.Q5_0.gguf) | Q5_0 | 5 | 47.46 GB| 49.96 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
 
125
  | [model_007-70b.Q5_K_M.gguf](https://huggingface.co/TheBloke/model_007-70B-GGUF/blob/main/model_007-70b.Q5_K_M.gguf) | Q5_K_M | 5 | 48.75 GB| 51.25 GB | large, very low quality loss - recommended |
 
 
126
 
127
  **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.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  <!-- README_GGUF.md-provided-files end -->
129
 
130
  <!-- README_GGUF.md-how-to-run start -->
131
- ## How to run in `llama.cpp`
132
 
133
  Make sure you are using `llama.cpp` from commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9) or later.
134
 
135
- For compatibility with older versions of llama.cpp, or for use with third-party clients and libaries, please use GGML files instead.
136
 
137
  ```
138
  ./main -t 10 -ngl 32 -m model_007-70b.q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "### System:\nYou are a story writing assistant.\n\n### User:\nWrite a story about llamas\n\n### Assistant:"
139
  ```
140
- 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`.
141
 
142
  Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
143
 
@@ -150,6 +183,44 @@ For other parameters and how to use them, please refer to [the llama.cpp documen
150
  ## How to run in `text-generation-webui`
151
 
152
  Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  <!-- README_GGUF.md-how-to-run end -->
154
 
155
  <!-- footer start -->
@@ -175,7 +246,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
175
 
176
  **Special thanks to**: Aemon Algiz.
177
 
178
- **Patreon special mentions**: Kacper Wikieł, knownsqashed, Leonard Tan, Asp the Wyvern, Daniel P. Andersen, Luke Pendergrass, Stanislav Ovsiannikov, RoA, Dave, Ai Maven, Kalila, Will Dee, Imad Khwaja, Nitin Borwankar, Joseph William Delisle, Tony Hughes, Cory Kujawski, Rishabh Srivastava, Russ Johnson, Stephen Murray, Lone Striker, Johann-Peter Hartmann, Elle, J, Deep Realms, SuperWojo, Raven Klaugh, Sebastain Graf, ReadyPlayerEmma, Alps Aficionado, Mano Prime, Derek Yates, Gabriel Puliatti, Mesiah Bishop, Magnesian, Sean Connelly, biorpg, Iucharbius, Olakabola, Fen Risland, Space Cruiser, theTransient, Illia Dulskyi, Thomas Belote, Spencer Kim, Pieter, John Detwiler, Fred von Graf, Michael Davis, Swaroop Kallakuri, subjectnull, Clay Pascal, Subspace Studios, Chris Smitley, Enrico Ros, usrbinkat, Steven Wood, alfie_i, David Ziegler, Willem Michiel, Matthew Berman, Andrey, Pyrater, Jeffrey Morgan, vamX, LangChain4j, Luke @flexchar, Trenton Dambrowitz, Pierre Kircher, Alex, Sam, James Bentley, Edmond Seymore, Eugene Pentland, Pedro Madruga, Rainer Wilmers, Dan Guido, Nathan LeClaire, Spiking Neurons AB, Talal Aujan, zynix, Artur Olbinski, Michael Levine, 阿明, K, John Villwock, Nikolai Manek, Femi Adebogun, senxiiz, Deo Leter, NimbleBox.ai, Viktor Bowallius, Geoffrey Montalvo, Mandus, Ajan Kanaga, ya boyyy, Jonathan Leane, webtim, Brandon Frisco, danny, Alexandros Triantafyllidis, Gabriel Tamborski, Randy H, terasurfer, Vadim, Junyu Yang, Vitor Caleffi, Chadd, transmissions 11
179
 
180
 
181
  Thank you to all my generous patrons and donaters!
@@ -213,7 +284,13 @@ A hybrid (explain + instruct) style Llama2-70b model, Pleae check examples below
213
 
214
 
215
  ### quantized versions
 
 
 
 
 
216
 
 
217
 
218
  <br>
219
 
@@ -225,18 +302,18 @@ This model is bound by the license & usage restrictions of the original Llama-2
225
 
226
  ## Evaluation
227
 
228
- We evaluated model_007 on a wide range of tasks using [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) from EleutherAI.
229
 
230
  Here are the results on metrics used by [HuggingFaceH4 Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
231
 
232
  |||||
233
  |:------:|:--------:|:-------:|:--------:|
234
  |**Task**|**Metric**|**Value**|**Stderr**|
235
- |*arc_challenge*|acc_norm|0.6314|0.0141|
236
- |*hellaswag*|acc_norm|0.8242|0.0038|
237
- |*mmlu*|acc_norm|0.5637|0.0351|
238
- |*truthfulqa_mc*|mc2|0.5127|0.0157|
239
- |**Total Average**|-|**0.6329877193**||
240
 
241
 
242
  <br>
@@ -322,9 +399,9 @@ print(tokenizer.decode(output[0], skip_special_tokens=True))
322
 
323
  #### Limitations & Biases:
324
 
325
- While this model aims for accuracy, it can occasionally produce inaccurate or misleading results.
326
 
327
- Despite diligent efforts in refining the pretraining data, there remains a possibility for the generation of inappropriate, biased, or offensive content.
328
 
329
  Exercise caution and cross-check information when necessary.
330
 
@@ -348,7 +425,7 @@ Please kindly cite using the following BibTeX:
348
 
349
  ```
350
  @misc{mukherjee2023orca,
351
- title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
352
  author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
353
  year={2023},
354
  eprint={2306.02707},
 
43
 
44
  The key benefit of GGUF is that it is a extensible, future-proof format which stores more information about the model as metadata. It also includes significantly improved tokenization code, including for the first time full support for special tokens. This should improve performance, especially with models that use new special tokens and implement custom prompt templates.
45
 
46
+ Here are a list of clients and libraries that are known to support GGUF:
47
  * [llama.cpp](https://github.com/ggerganov/llama.cpp).
48
  * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI. Supports GGUF with GPU acceleration via the ctransformers backend - llama-cpp-python backend should work soon too.
49
  * [KoboldCpp](https://github.com/LostRuins/koboldcpp), now supports GGUF as of release 1.41! A powerful GGML web UI, with full GPU accel. Especially good for story telling.
 
53
  * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), supports GGUF as of version 0.1.79. A Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
54
  * [candle](https://github.com/huggingface/candle), added GGUF support on August 22nd. Candle is a Rust ML framework with a focus on performance, including GPU support, and ease of use.
55
 
 
56
  <!-- README_GGUF.md-about-gguf end -->
 
57
  <!-- repositories-available start -->
58
  ## Repositories available
59
 
 
83
 
84
  These quantised GGUF files are compatible with llama.cpp from August 21st 2023 onwards, as of commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9)
85
 
86
+ They are now also compatible with many third party UIs and libraries - please see the list at the top of the README.
 
 
87
 
88
  ## Explanation of quantisation methods
89
  <details>
 
116
  | [model_007-70b.Q4_0.gguf](https://huggingface.co/TheBloke/model_007-70B-GGUF/blob/main/model_007-70b.Q4_0.gguf) | Q4_0 | 4 | 38.87 GB| 41.37 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
117
  | [model_007-70b.Q4_K_S.gguf](https://huggingface.co/TheBloke/model_007-70B-GGUF/blob/main/model_007-70b.Q4_K_S.gguf) | Q4_K_S | 4 | 39.07 GB| 41.57 GB | small, greater quality loss |
118
  | [model_007-70b.Q4_K_M.gguf](https://huggingface.co/TheBloke/model_007-70B-GGUF/blob/main/model_007-70b.Q4_K_M.gguf) | Q4_K_M | 4 | 41.42 GB| 43.92 GB | medium, balanced quality - recommended |
 
119
  | [model_007-70b.Q5_0.gguf](https://huggingface.co/TheBloke/model_007-70B-GGUF/blob/main/model_007-70b.Q5_0.gguf) | Q5_0 | 5 | 47.46 GB| 49.96 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
120
+ | [model_007-70b.Q5_K_S.gguf](https://huggingface.co/TheBloke/model_007-70B-GGUF/blob/main/model_007-70b.Q5_K_S.gguf) | Q5_K_S | 5 | 47.46 GB| 49.96 GB | large, low quality loss - recommended |
121
  | [model_007-70b.Q5_K_M.gguf](https://huggingface.co/TheBloke/model_007-70B-GGUF/blob/main/model_007-70b.Q5_K_M.gguf) | Q5_K_M | 5 | 48.75 GB| 51.25 GB | large, very low quality loss - recommended |
122
+ | model_007-70b.Q6_K.gguf | Q6_K | 6 | 56.59 GB| 59.09 GB | very large, extremely low quality loss |
123
+ | model_007-70b.Q8_0.gguf | Q8_0 | 8 | 73.29 GB| 75.79 GB | very large, extremely low quality loss - not recommended |
124
 
125
  **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.
126
+
127
+ ### Q6_K and Q8_0 files are split and require joining
128
+
129
+ **Note:** HF does not support uploading files larger than 50GB. Therefore I have uploaded the Q6_K and Q8_0 files as split files.
130
+
131
+ <details>
132
+ <summary>Click for instructions regarding Q6_K and Q8_0 files</summary>
133
+
134
+ ### q6_K
135
+ Please download:
136
+ * `model_007-70b.Q6_K.gguf-split-a`
137
+ * `model_007-70b.Q6_K.gguf-split-b`
138
+
139
+ ### q8_0
140
+ Please download:
141
+ * `model_007-70b.Q8_0.gguf-split-a`
142
+ * `model_007-70b.Q8_0.gguf-split-b`
143
+
144
+ To join the files, do the following:
145
+
146
+ Linux and macOS:
147
+ ```
148
+ cat model_007-70b.Q6_K.gguf-split-* > model_007-70b.Q6_K.gguf && rm model_007-70b.Q6_K.gguf-split-*
149
+ cat model_007-70b.Q8_0.gguf-split-* > model_007-70b.Q8_0.gguf && rm model_007-70b.Q8_0.gguf-split-*
150
+ ```
151
+ Windows command line:
152
+ ```
153
+ COPY /B model_007-70b.Q6_K.gguf-split-a + model_007-70b.Q6_K.gguf-split-b model_007-70b.Q6_K.gguf
154
+ del model_007-70b.Q6_K.gguf-split-a model_007-70b.Q6_K.gguf-split-b
155
+
156
+ COPY /B model_007-70b.Q8_0.gguf-split-a + model_007-70b.Q8_0.gguf-split-b model_007-70b.Q8_0.gguf
157
+ del model_007-70b.Q8_0.gguf-split-a model_007-70b.Q8_0.gguf-split-b
158
+ ```
159
+
160
+ </details>
161
  <!-- README_GGUF.md-provided-files end -->
162
 
163
  <!-- README_GGUF.md-how-to-run start -->
164
+ ## Example `llama.cpp` command
165
 
166
  Make sure you are using `llama.cpp` from commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9) or later.
167
 
168
+ For compatibility with older versions of llama.cpp, or for any third-party libraries or clients that haven't yet updated for GGUF, please use GGML files instead.
169
 
170
  ```
171
  ./main -t 10 -ngl 32 -m model_007-70b.q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "### System:\nYou are a story writing assistant.\n\n### User:\nWrite a story about llamas\n\n### Assistant:"
172
  ```
173
+ 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`. If offloading all layers to GPU, set `-t 1`.
174
 
175
  Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
176
 
 
183
  ## How to run in `text-generation-webui`
184
 
185
  Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
186
+
187
+ ## How to run from Python code
188
+
189
+ You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries.
190
+
191
+ ### How to load this model from Python using ctransformers
192
+
193
+ #### First install the package
194
+
195
+ ```bash
196
+ # Base ctransformers with no GPU acceleration
197
+ pip install ctransformers>=0.2.24
198
+ # Or with CUDA GPU acceleration
199
+ pip install ctransformers[cuda]>=0.2.24
200
+ # Or with ROCm GPU acceleration
201
+ CT_HIPBLAS=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
202
+ # Or with Metal GPU acceleration for macOS systems
203
+ CT_METAL=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
204
+ ```
205
+
206
+ #### Simple example code to load one of these GGUF models
207
+
208
+ ```python
209
+ from ctransformers import AutoModelForCausalLM
210
+
211
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
212
+ llm = AutoModelForCausalLM.from_pretrained("TheBloke/model_007-70B-GGUF", model_file="model_007-70b.q4_K_M.gguf", model_type="llama", gpu_layers=50)
213
+
214
+ print(llm("AI is going to"))
215
+ ```
216
+
217
+ ## How to use with LangChain
218
+
219
+ Here's guides on using llama-cpp-python or ctransformers with LangChain:
220
+
221
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
222
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
223
+
224
  <!-- README_GGUF.md-how-to-run end -->
225
 
226
  <!-- footer start -->
 
246
 
247
  **Special thanks to**: Aemon Algiz.
248
 
249
+ **Patreon special mentions**: Russ Johnson, J, alfie_i, Alex, NimbleBox.ai, Chadd, Mandus, Nikolai Manek, Ken Nordquist, ya boyyy, Illia Dulskyi, Viktor Bowallius, vamX, Iucharbius, zynix, Magnesian, Clay Pascal, Pierre Kircher, Enrico Ros, Tony Hughes, Elle, Andrey, knownsqashed, Deep Realms, Jerry Meng, Lone Striker, Derek Yates, Pyrater, Mesiah Bishop, James Bentley, Femi Adebogun, Brandon Frisco, SuperWojo, Alps Aficionado, Michael Dempsey, Vitor Caleffi, Will Dee, Edmond Seymore, usrbinkat, LangChain4j, Kacper Wikieł, Luke Pendergrass, John Detwiler, theTransient, Nathan LeClaire, Tiffany J. Kim, biorpg, Eugene Pentland, Stanislav Ovsiannikov, Fred von Graf, terasurfer, Kalila, Dan Guido, Nitin Borwankar, 阿明, Ai Maven, John Villwock, Gabriel Puliatti, Stephen Murray, Asp the Wyvern, danny, Chris Smitley, ReadyPlayerEmma, S_X, Daniel P. Andersen, Olakabola, Jeffrey Morgan, Imad Khwaja, Caitlyn Gatomon, webtim, Alicia Loh, Trenton Dambrowitz, Swaroop Kallakuri, Erik Bjäreholt, Leonard Tan, Spiking Neurons AB, Luke @flexchar, Ajan Kanaga, Thomas Belote, Deo Leter, RoA, Willem Michiel, transmissions 11, subjectnull, Matthew Berman, Joseph William Delisle, David Ziegler, Michael Davis, Johann-Peter Hartmann, Talal Aujan, senxiiz, Artur Olbinski, Rainer Wilmers, Spencer Kim, Fen Risland, Cap'n Zoog, Rishabh Srivastava, Michael Levine, Geoffrey Montalvo, Sean Connelly, Alexandros Triantafyllidis, Pieter, Gabriel Tamborski, Sam, Subspace Studios, Junyu Yang, Pedro Madruga, Vadim, Cory Kujawski, K, Raven Klaugh, Randy H, Mano Prime, Sebastain Graf, Space Cruiser
250
 
251
 
252
  Thank you to all my generous patrons and donaters!
 
284
 
285
 
286
  ### quantized versions
287
+ Huge respect to man.. @TheBloke, here are the GGML/GPTQ/GGUF versions, go crazy :)
288
+
289
+ https://huggingface.co/TheBloke/model_007-70B-GGML
290
+
291
+ https://huggingface.co/TheBloke/model_007-70B-GGUF
292
 
293
+ https://huggingface.co/TheBloke/model_007-70B-GPTQ
294
 
295
  <br>
296
 
 
302
 
303
  ## Evaluation
304
 
305
+ We evaluated model_007 on a wide range of tasks using [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) from EleutherAI.
306
 
307
  Here are the results on metrics used by [HuggingFaceH4 Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
308
 
309
  |||||
310
  |:------:|:--------:|:-------:|:--------:|
311
  |**Task**|**Metric**|**Value**|**Stderr**|
312
+ |*arc_challenge*|acc_norm|0.7108|0.0141|
313
+ |*hellaswag*|acc_norm|0.8765|0.0038|
314
+ |*mmlu*|acc_norm|0.6904|0.0351|
315
+ |*truthfulqa_mc*|mc2|0.6312|0.0157|
316
+ |**Total Average**|-|**0.72729**||
317
 
318
 
319
  <br>
 
399
 
400
  #### Limitations & Biases:
401
 
402
+ While this model aims for accuracy, it can occasionally produce inaccurate or misleading results.
403
 
404
+ Despite diligent efforts in refining the pretraining data, there remains a possibility for the generation of inappropriate, biased, or offensive content.
405
 
406
  Exercise caution and cross-check information when necessary.
407
 
 
425
 
426
  ```
427
  @misc{mukherjee2023orca,
428
+ title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
429
  author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
430
  year={2023},
431
  eprint={2306.02707},