Upload README.md
Browse files
README.md
CHANGED
@@ -47,7 +47,7 @@ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is
|
|
47 |
|
48 |
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.
|
49 |
|
50 |
-
|
51 |
* [llama.cpp](https://github.com/ggerganov/llama.cpp).
|
52 |
* [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.
|
53 |
* [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.
|
@@ -57,9 +57,7 @@ As of August 25th, here is a list of clients and libraries that are known to sup
|
|
57 |
* [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.
|
58 |
* [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.
|
59 |
|
60 |
-
The clients and libraries below are expecting to add GGUF support shortly:
|
61 |
<!-- README_GGUF.md-about-gguf end -->
|
62 |
-
|
63 |
<!-- repositories-available start -->
|
64 |
## Repositories available
|
65 |
|
@@ -96,9 +94,7 @@ Character:
|
|
96 |
|
97 |
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)
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
They are are not yet compatible with any other third-party UIS, libraries or utilities but this is expected to change very soon.
|
102 |
|
103 |
## Explanation of quantisation methods
|
104 |
<details>
|
@@ -134,19 +130,22 @@ Refer to the Provided Files table below to see what files use which methods, and
|
|
134 |
| [llama-2-13b-chat-limarp-v2-merged.Q8_0.gguf](https://huggingface.co/TheBloke/llama-2-13B-chat-limarp-v2-merged-GGUF/blob/main/llama-2-13b-chat-limarp-v2-merged.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended |
|
135 |
|
136 |
**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.
|
|
|
|
|
|
|
137 |
<!-- README_GGUF.md-provided-files end -->
|
138 |
|
139 |
<!-- README_GGUF.md-how-to-run start -->
|
140 |
-
##
|
141 |
|
142 |
Make sure you are using `llama.cpp` from commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9) or later.
|
143 |
|
144 |
-
For compatibility with older versions of llama.cpp, or for
|
145 |
|
146 |
```
|
147 |
./main -t 10 -ngl 32 -m llama-2-13b-chat-limarp-v2-merged.q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "### Instruction:\nCharacter's Persona: bot character description\n\nUser's persona: user character description\n \nScenario: what happens in the story\n\nPlay the role of Character. You must engage in a roleplaying chat with User below this line. Do not write dialogues and narration for User. Character should respond with messages of medium length.\n\n### Input:\nUser: Write a story about llamas\n\n### Response:\nCharacter:"
|
148 |
```
|
149 |
-
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`.
|
150 |
|
151 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
152 |
|
@@ -159,6 +158,44 @@ For other parameters and how to use them, please refer to [the llama.cpp documen
|
|
159 |
## How to run in `text-generation-webui`
|
160 |
|
161 |
Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
<!-- README_GGUF.md-how-to-run end -->
|
163 |
|
164 |
<!-- footer start -->
|
@@ -184,7 +221,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
|
|
184 |
|
185 |
**Special thanks to**: Aemon Algiz.
|
186 |
|
187 |
-
**Patreon special mentions**:
|
188 |
|
189 |
|
190 |
Thank you to all my generous patrons and donaters!
|
@@ -221,7 +258,7 @@ Character: {utterance}
|
|
221 |
User: {utterance}
|
222 |
```
|
223 |
## Bias, Risks, and Limitations
|
224 |
-
The model will show biases similar to those observed in niche roleplaying forums on the Internet, besides those exhibited by the base model. It is not intended for supplying factual information or advice in any form.
|
225 |
## Training Details
|
226 |
This model is a merge. Please refer to the link repositories of the base model and lora for details.
|
227 |
|
|
|
47 |
|
48 |
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.
|
49 |
|
50 |
+
Here are a list of clients and libraries that are known to support GGUF:
|
51 |
* [llama.cpp](https://github.com/ggerganov/llama.cpp).
|
52 |
* [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.
|
53 |
* [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.
|
|
|
57 |
* [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.
|
58 |
* [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.
|
59 |
|
|
|
60 |
<!-- README_GGUF.md-about-gguf end -->
|
|
|
61 |
<!-- repositories-available start -->
|
62 |
## Repositories available
|
63 |
|
|
|
94 |
|
95 |
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)
|
96 |
|
97 |
+
They are now also compatible with many third party UIs and libraries - please see the list at the top of the README.
|
|
|
|
|
98 |
|
99 |
## Explanation of quantisation methods
|
100 |
<details>
|
|
|
130 |
| [llama-2-13b-chat-limarp-v2-merged.Q8_0.gguf](https://huggingface.co/TheBloke/llama-2-13B-chat-limarp-v2-merged-GGUF/blob/main/llama-2-13b-chat-limarp-v2-merged.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended |
|
131 |
|
132 |
**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.
|
133 |
+
|
134 |
+
|
135 |
+
|
136 |
<!-- README_GGUF.md-provided-files end -->
|
137 |
|
138 |
<!-- README_GGUF.md-how-to-run start -->
|
139 |
+
## Example `llama.cpp` command
|
140 |
|
141 |
Make sure you are using `llama.cpp` from commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9) or later.
|
142 |
|
143 |
+
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.
|
144 |
|
145 |
```
|
146 |
./main -t 10 -ngl 32 -m llama-2-13b-chat-limarp-v2-merged.q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "### Instruction:\nCharacter's Persona: bot character description\n\nUser's persona: user character description\n \nScenario: what happens in the story\n\nPlay the role of Character. You must engage in a roleplaying chat with User below this line. Do not write dialogues and narration for User. Character should respond with messages of medium length.\n\n### Input:\nUser: Write a story about llamas\n\n### Response:\nCharacter:"
|
147 |
```
|
148 |
+
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`.
|
149 |
|
150 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
151 |
|
|
|
158 |
## How to run in `text-generation-webui`
|
159 |
|
160 |
Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
|
161 |
+
|
162 |
+
## How to run from Python code
|
163 |
+
|
164 |
+
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.
|
165 |
+
|
166 |
+
### How to load this model from Python using ctransformers
|
167 |
+
|
168 |
+
#### First install the package
|
169 |
+
|
170 |
+
```bash
|
171 |
+
# Base ctransformers with no GPU acceleration
|
172 |
+
pip install ctransformers>=0.2.24
|
173 |
+
# Or with CUDA GPU acceleration
|
174 |
+
pip install ctransformers[cuda]>=0.2.24
|
175 |
+
# Or with ROCm GPU acceleration
|
176 |
+
CT_HIPBLAS=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
|
177 |
+
# Or with Metal GPU acceleration for macOS systems
|
178 |
+
CT_METAL=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
|
179 |
+
```
|
180 |
+
|
181 |
+
#### Simple example code to load one of these GGUF models
|
182 |
+
|
183 |
+
```python
|
184 |
+
from ctransformers import AutoModelForCausalLM
|
185 |
+
|
186 |
+
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
|
187 |
+
llm = AutoModelForCausalLM.from_pretrained("TheBloke/llama-2-13B-chat-limarp-v2-merged-GGML", model_file="llama-2-13b-chat-limarp-v2-merged.q4_K_M.gguf", model_type="llama", gpu_layers=50)
|
188 |
+
|
189 |
+
print(llm("AI is going to"))
|
190 |
+
```
|
191 |
+
|
192 |
+
## How to use with LangChain
|
193 |
+
|
194 |
+
Here's guides on using llama-cpp-python or ctransformers with LangChain:
|
195 |
+
|
196 |
+
* [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
|
197 |
+
* [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
|
198 |
+
|
199 |
<!-- README_GGUF.md-how-to-run end -->
|
200 |
|
201 |
<!-- footer start -->
|
|
|
221 |
|
222 |
**Special thanks to**: Aemon Algiz.
|
223 |
|
224 |
+
**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
|
225 |
|
226 |
|
227 |
Thank you to all my generous patrons and donaters!
|
|
|
258 |
User: {utterance}
|
259 |
```
|
260 |
## Bias, Risks, and Limitations
|
261 |
+
The model will show biases similar to those observed in niche roleplaying forums on the Internet, besides those exhibited by the base model. It is not intended for supplying factual information or advice in any form.
|
262 |
## Training Details
|
263 |
This model is a merge. Please refer to the link repositories of the base model and lora for details.
|
264 |
|