Text Generation
Transformers
GGUF
PyTorch
English
llama
facebook
meta
llama-2
text-generation-inference
TheBloke commited on
Commit
6261052
1 Parent(s): 5daf402

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -15
README.md CHANGED
@@ -1,6 +1,8 @@
1
  ---
2
  datasets:
 
3
  - garage-bAInd/Open-Platypus
 
4
  inference: false
5
  language:
6
  - en
@@ -52,7 +54,7 @@ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is
52
 
53
  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.
54
 
55
- As of August 25th, here is a list of clients and libraries that are known to support GGUF:
56
  * [llama.cpp](https://github.com/ggerganov/llama.cpp).
57
  * [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.
58
  * [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.
@@ -62,9 +64,7 @@ As of August 25th, here is a list of clients and libraries that are known to sup
62
  * [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.
63
  * [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.
64
 
65
- The clients and libraries below are expecting to add GGUF support shortly:
66
  <!-- README_GGUF.md-about-gguf end -->
67
-
68
  <!-- repositories-available start -->
69
  ## Repositories available
70
 
@@ -129,19 +129,22 @@ Refer to the Provided Files table below to see what files use which methods, and
129
  | [speechless-llama2-13b.Q8_0.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended |
130
 
131
  **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.
 
 
 
132
  <!-- README_GGUF.md-provided-files end -->
133
 
134
  <!-- README_GGUF.md-how-to-run start -->
135
- ## How to run in `llama.cpp`
136
 
137
  Make sure you are using `llama.cpp` from commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9) or later.
138
 
139
- For compatibility with older versions of llama.cpp, or for use with third-party clients and libaries, please use GGML files instead.
140
 
141
  ```
142
- ./main -t 10 -ngl 32 -m speechless-llama2-13b.q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\nWrite a story about llamas\n\n### Response:"
143
  ```
144
- 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`.
145
 
146
  Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
147
 
@@ -154,6 +157,44 @@ For other parameters and how to use them, please refer to [the llama.cpp documen
154
  ## How to run in `text-generation-webui`
155
 
156
  Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  <!-- README_GGUF.md-how-to-run end -->
158
 
159
  <!-- footer start -->
@@ -179,7 +220,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
179
 
180
  **Special thanks to**: Aemon Algiz.
181
 
182
- **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
183
 
184
 
185
  Thank you to all my generous patrons and donaters!
@@ -192,16 +233,16 @@ And thank you again to a16z for their generous grant.
192
  # Original model card: Jiangwen Su's Speechless Llama2 13B
193
 
194
 
195
- <p><h1> speechless-llama2-13b </h1></p>
196
- speechless-llama2-13b is a merge of Open-Orca/OpenOrca-Platypus2-13B and WizardLM/WizardLM-13B-V1.2.
197
 
198
  | Metric | Value |
199
  | --- | --- |
200
- | ARC | |
201
- | HellaSwag | |
202
- | MMLU | |
203
- | TruthfulQA | |
204
- | Average | |
205
 
206
  # **Llama 2**
207
  Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 13B pretrained model, converted for the Hugging Face Transformers format. Links to other models can be found in the index at the bottom.
 
1
  ---
2
  datasets:
3
+ - Open-Orca/OpenOrca
4
  - garage-bAInd/Open-Platypus
5
+ - WizardLM/WizardLM_evol_instruct_V2_196k
6
  inference: false
7
  language:
8
  - en
 
54
 
55
  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.
56
 
57
+ Here are a list of clients and libraries that are known to support GGUF:
58
  * [llama.cpp](https://github.com/ggerganov/llama.cpp).
59
  * [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.
60
  * [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.
 
64
  * [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.
65
  * [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.
66
 
 
67
  <!-- README_GGUF.md-about-gguf end -->
 
68
  <!-- repositories-available start -->
69
  ## Repositories available
70
 
 
129
  | [speechless-llama2-13b.Q8_0.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-13B-GGUF/blob/main/speechless-llama2-13b.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended |
130
 
131
  **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.
132
+
133
+
134
+
135
  <!-- README_GGUF.md-provided-files end -->
136
 
137
  <!-- README_GGUF.md-how-to-run start -->
138
+ ## Example `llama.cpp` command
139
 
140
  Make sure you are using `llama.cpp` from commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9) or later.
141
 
142
+ 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.
143
 
144
  ```
145
+ ./main -t 10 -ngl 32 -m speechless-llama2-13b.q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{prompt}\n\n### Response:"
146
  ```
147
+ 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`.
148
 
149
  Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
150
 
 
157
  ## How to run in `text-generation-webui`
158
 
159
  Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
160
+
161
+ ## How to run from Python code
162
+
163
+ 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.
164
+
165
+ ### How to load this model from Python using ctransformers
166
+
167
+ #### First install the package
168
+
169
+ ```bash
170
+ # Base ctransformers with no GPU acceleration
171
+ pip install ctransformers>=0.2.24
172
+ # Or with CUDA GPU acceleration
173
+ pip install ctransformers[cuda]>=0.2.24
174
+ # Or with ROCm GPU acceleration
175
+ CT_HIPBLAS=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
176
+ # Or with Metal GPU acceleration for macOS systems
177
+ CT_METAL=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
178
+ ```
179
+
180
+ #### Simple example code to load one of these GGUF models
181
+
182
+ ```python
183
+ from ctransformers import AutoModelForCausalLM
184
+
185
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
186
+ llm = AutoModelForCausalLM.from_pretrained("TheBloke/Speechless-Llama2-13B-GGUF", model_file="speechless-llama2-13b.q4_K_M.gguf", model_type="llama", gpu_layers=50)
187
+
188
+ print(llm("AI is going to"))
189
+ ```
190
+
191
+ ## How to use with LangChain
192
+
193
+ Here's guides on using llama-cpp-python or ctransformers with LangChain:
194
+
195
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
196
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
197
+
198
  <!-- README_GGUF.md-how-to-run end -->
199
 
200
  <!-- footer start -->
 
220
 
221
  **Special thanks to**: Aemon Algiz.
222
 
223
+ **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
224
 
225
 
226
  Thank you to all my generous patrons and donaters!
 
233
  # Original model card: Jiangwen Su's Speechless Llama2 13B
234
 
235
 
236
+ <p><h1> speechless-llama2-13b:v1.1 </h1></p>
237
+ speechless-llama2-13b:v1.1 is a merge of Open-Orca/OpenOrca-Platypus2-13B and WizardLM/WizardLM-13B-V1.2.
238
 
239
  | Metric | Value |
240
  | --- | --- |
241
+ | ARC | 62.03 |
242
+ | HellaSwag | 81.85 |
243
+ | MMLU | 58.52 |
244
+ | TruthfulQA | 55.7 |
245
+ | Average | 64.52 |
246
 
247
  # **Llama 2**
248
  Llama 2 is a collection of pretrained and fine-tuned generative text models ranging in scale from 7 billion to 70 billion parameters. This is the repository for the 13B pretrained model, converted for the Hugging Face Transformers format. Links to other models can be found in the index at the bottom.