TheBloke commited on
Commit
76699a6
1 Parent(s): 5930ed9

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -7
README.md CHANGED
@@ -42,7 +42,7 @@ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is
42
 
43
  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.
44
 
45
- As of August 25th, here is a list of clients and libraries that are known to support GGUF:
46
  * [llama.cpp](https://github.com/ggerganov/llama.cpp).
47
  * [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.
48
  * [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.
@@ -52,9 +52,7 @@ As of August 25th, here is a list of clients and libraries that are known to sup
52
  * [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.
53
  * [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.
54
 
55
- The clients and libraries below are expecting to add GGUF support shortly:
56
  <!-- README_GGUF.md-about-gguf end -->
57
-
58
  <!-- repositories-available start -->
59
  ## Repositories available
60
 
@@ -119,19 +117,22 @@ Refer to the Provided Files table below to see what files use which methods, and
119
  | [stheno-inverted-l2-13b.Q8_0.gguf](https://huggingface.co/TheBloke/Stheno-Inverted-L2-13B-GGUF/blob/main/stheno-inverted-l2-13b.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended |
120
 
121
  **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.
 
 
 
122
  <!-- README_GGUF.md-provided-files end -->
123
 
124
  <!-- README_GGUF.md-how-to-run start -->
125
- ## How to run in `llama.cpp`
126
 
127
  Make sure you are using `llama.cpp` from commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9) or later.
128
 
129
- For compatibility with older versions of llama.cpp, or for use with third-party clients and libaries, please use GGML files instead.
130
 
131
  ```
132
  ./main -t 10 -ngl 32 -m stheno-inverted-l2-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:"
133
  ```
134
- 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`.
135
 
136
  Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
137
 
@@ -144,6 +145,44 @@ For other parameters and how to use them, please refer to [the llama.cpp documen
144
  ## How to run in `text-generation-webui`
145
 
146
  Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  <!-- README_GGUF.md-how-to-run end -->
148
 
149
  <!-- footer start -->
@@ -169,7 +208,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
169
 
170
  **Special thanks to**: Aemon Algiz.
171
 
172
- **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
173
 
174
 
175
  Thank you to all my generous patrons and donaters!
@@ -189,6 +228,11 @@ The sister Model of [Stheno-L2-13B](https://huggingface.co/Sao10K/Stheno-L2-13B)
189
  Stheno Inverted:
190
  <br>Gradient Merge of Stheno-P2 & Stheno-P1, Models are in Inverted Positions
191
 
 
 
 
 
 
192
  Test Checklist:
193
  <br>Censorship - Fairly Uncensored
194
  <br>Writing - Good Prose, Fairly Descriptive
 
42
 
43
  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.
44
 
45
+ Here are a list of clients and libraries that are known to support GGUF:
46
  * [llama.cpp](https://github.com/ggerganov/llama.cpp).
47
  * [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.
48
  * [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.
 
52
  * [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.
53
  * [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.
54
 
 
55
  <!-- README_GGUF.md-about-gguf end -->
 
56
  <!-- repositories-available start -->
57
  ## Repositories available
58
 
 
117
  | [stheno-inverted-l2-13b.Q8_0.gguf](https://huggingface.co/TheBloke/Stheno-Inverted-L2-13B-GGUF/blob/main/stheno-inverted-l2-13b.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended |
118
 
119
  **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.
120
+
121
+
122
+
123
  <!-- README_GGUF.md-provided-files end -->
124
 
125
  <!-- README_GGUF.md-how-to-run start -->
126
+ ## Example `llama.cpp` command
127
 
128
  Make sure you are using `llama.cpp` from commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9) or later.
129
 
130
+ 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.
131
 
132
  ```
133
  ./main -t 10 -ngl 32 -m stheno-inverted-l2-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:"
134
  ```
135
+ 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`.
136
 
137
  Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
138
 
 
145
  ## How to run in `text-generation-webui`
146
 
147
  Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
148
+
149
+ ## How to run from Python code
150
+
151
+ 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.
152
+
153
+ ### How to load this model from Python using ctransformers
154
+
155
+ #### First install the package
156
+
157
+ ```bash
158
+ # Base ctransformers with no GPU acceleration
159
+ pip install ctransformers>=0.2.24
160
+ # Or with CUDA GPU acceleration
161
+ pip install ctransformers[cuda]>=0.2.24
162
+ # Or with ROCm GPU acceleration
163
+ CT_HIPBLAS=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
164
+ # Or with Metal GPU acceleration for macOS systems
165
+ CT_METAL=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
166
+ ```
167
+
168
+ #### Simple example code to load one of these GGUF models
169
+
170
+ ```python
171
+ from ctransformers import AutoModelForCausalLM
172
+
173
+ # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
174
+ llm = AutoModelForCausalLM.from_pretrained("TheBloke/Stheno-Inverted-L2-13B-GGUF", model_file="stheno-inverted-l2-13b.q4_K_M.gguf", model_type="llama", gpu_layers=50)
175
+
176
+ print(llm("AI is going to"))
177
+ ```
178
+
179
+ ## How to use with LangChain
180
+
181
+ Here's guides on using llama-cpp-python or ctransformers with LangChain:
182
+
183
+ * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
184
+ * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
185
+
186
  <!-- README_GGUF.md-how-to-run end -->
187
 
188
  <!-- footer start -->
 
208
 
209
  **Special thanks to**: Aemon Algiz.
210
 
211
+ **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
212
 
213
 
214
  Thank you to all my generous patrons and donaters!
 
228
  Stheno Inverted:
229
  <br>Gradient Merge of Stheno-P2 & Stheno-P1, Models are in Inverted Positions
230
 
231
+ Quants courtesy of TheBloke!
232
+ <br>[GPTQ](https://huggingface.co/TheBloke/Stheno-Inverted-L2-13B-GPTQ)
233
+ <br>[GGUF](https://huggingface.co/TheBloke/Stheno-Inverted-L2-13B-GGUF)
234
+ <br>[GGML](https://huggingface.co/TheBloke/Stheno-Inverted-L2-13B-GGML)
235
+
236
  Test Checklist:
237
  <br>Censorship - Fairly Uncensored
238
  <br>Writing - Good Prose, Fairly Descriptive