Upload README.md
Browse files
README.md
CHANGED
@@ -52,7 +52,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 |
-
|
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 +62,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 +127,22 @@ Refer to the Provided Files table below to see what files use which methods, and
|
|
129 |
| [speechless-llama2-hermes-orca-platypus-wizardlm-13b.Q8_0.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-Hermes-Orca-Platypus-WizardLM-13B-GGUF/blob/main/speechless-llama2-hermes-orca-platypus-wizardlm-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 |
-
##
|
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
|
140 |
|
141 |
```
|
142 |
./main -t 10 -ngl 32 -m speechless-llama2-hermes-orca-platypus-wizardlm-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 +155,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 +218,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**:
|
183 |
|
184 |
|
185 |
Thank you to all my generous patrons and donaters!
|
|
|
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 |
+
Here are 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 |
* [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 |
<!-- README_GGUF.md-about-gguf end -->
|
|
|
66 |
<!-- repositories-available start -->
|
67 |
## Repositories available
|
68 |
|
|
|
127 |
| [speechless-llama2-hermes-orca-platypus-wizardlm-13b.Q8_0.gguf](https://huggingface.co/TheBloke/Speechless-Llama2-Hermes-Orca-Platypus-WizardLM-13B-GGUF/blob/main/speechless-llama2-hermes-orca-platypus-wizardlm-13b.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended |
|
128 |
|
129 |
**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.
|
130 |
+
|
131 |
+
|
132 |
+
|
133 |
<!-- README_GGUF.md-provided-files end -->
|
134 |
|
135 |
<!-- README_GGUF.md-how-to-run start -->
|
136 |
+
## Example `llama.cpp` command
|
137 |
|
138 |
Make sure you are using `llama.cpp` from commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9) or later.
|
139 |
|
140 |
+
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.
|
141 |
|
142 |
```
|
143 |
./main -t 10 -ngl 32 -m speechless-llama2-hermes-orca-platypus-wizardlm-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:"
|
144 |
```
|
145 |
+
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`.
|
146 |
|
147 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
148 |
|
|
|
155 |
## How to run in `text-generation-webui`
|
156 |
|
157 |
Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
|
158 |
+
|
159 |
+
## How to run from Python code
|
160 |
+
|
161 |
+
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.
|
162 |
+
|
163 |
+
### How to load this model from Python using ctransformers
|
164 |
+
|
165 |
+
#### First install the package
|
166 |
+
|
167 |
+
```bash
|
168 |
+
# Base ctransformers with no GPU acceleration
|
169 |
+
pip install ctransformers>=0.2.24
|
170 |
+
# Or with CUDA GPU acceleration
|
171 |
+
pip install ctransformers[cuda]>=0.2.24
|
172 |
+
# Or with ROCm GPU acceleration
|
173 |
+
CT_HIPBLAS=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
|
174 |
+
# Or with Metal GPU acceleration for macOS systems
|
175 |
+
CT_METAL=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
|
176 |
+
```
|
177 |
+
|
178 |
+
#### Simple example code to load one of these GGUF models
|
179 |
+
|
180 |
+
```python
|
181 |
+
from ctransformers import AutoModelForCausalLM
|
182 |
+
|
183 |
+
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
|
184 |
+
llm = AutoModelForCausalLM.from_pretrained("TheBloke/Speechless-Llama2-Hermes-Orca-Platypus-WizardLM-13B-GGUF", model_file="speechless-llama2-hermes-orca-platypus-wizardlm-13b.q4_K_M.gguf", model_type="llama", gpu_layers=50)
|
185 |
+
|
186 |
+
print(llm("AI is going to"))
|
187 |
+
```
|
188 |
+
|
189 |
+
## How to use with LangChain
|
190 |
+
|
191 |
+
Here's guides on using llama-cpp-python or ctransformers with LangChain:
|
192 |
+
|
193 |
+
* [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
|
194 |
+
* [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
|
195 |
+
|
196 |
<!-- README_GGUF.md-how-to-run end -->
|
197 |
|
198 |
<!-- footer start -->
|
|
|
218 |
|
219 |
**Special thanks to**: Aemon Algiz.
|
220 |
|
221 |
+
**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
|
222 |
|
223 |
|
224 |
Thank you to all my generous patrons and donaters!
|