Upload README.md
Browse files
README.md
CHANGED
@@ -55,25 +55,22 @@ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is
|
|
55 |
|
56 |
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.
|
57 |
|
58 |
-
|
59 |
-
* [llama.cpp](https://github.com/ggerganov/llama.cpp)
|
60 |
* [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.
|
61 |
* [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 |
* [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), should now work, choose the `c_transformers` backend. A great web UI with many interesting features. Supports CUDA GPU acceleration.
|
63 |
* [ctransformers](https://github.com/marella/ctransformers), now supports GGUF as of version 0.2.24! A Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
|
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 |
-
The clients and libraries below are expecting to add GGUF support shortly:
|
68 |
-
* [LM Studio](https://lmstudio.ai/), should be updated by end August 25th.
|
69 |
<!-- README_GGUF.md-about-gguf end -->
|
70 |
-
|
71 |
<!-- repositories-available start -->
|
72 |
## Repositories available
|
73 |
|
74 |
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GPTQ)
|
75 |
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF)
|
76 |
-
* [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGML)
|
77 |
* [Phind's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Phind/Phind-CodeLlama-34B-Python-v1)
|
78 |
<!-- repositories-available end -->
|
79 |
|
@@ -82,6 +79,7 @@ The clients and libraries below are expecting to add GGUF support shortly:
|
|
82 |
|
83 |
```
|
84 |
{prompt} \n
|
|
|
85 |
```
|
86 |
|
87 |
<!-- prompt-template end -->
|
@@ -90,9 +88,7 @@ The clients and libraries below are expecting to add GGUF support shortly:
|
|
90 |
|
91 |
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)
|
92 |
|
93 |
-
|
94 |
-
|
95 |
-
They are are not yet compatible with any other third-party UIS, libraries or utilities but this is expected to change very soon.
|
96 |
|
97 |
## Explanation of quantisation methods
|
98 |
<details>
|
@@ -118,27 +114,32 @@ Refer to the Provided Files table below to see what files use which methods, and
|
|
118 |
| [phind-codellama-34b-python-v1.Q3_K_S.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q3_K_S.gguf) | Q3_K_S | 3 | 14.61 GB| 17.11 GB | very small, high quality loss |
|
119 |
| [phind-codellama-34b-python-v1.Q3_K_M.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q3_K_M.gguf) | Q3_K_M | 3 | 16.28 GB| 18.78 GB | very small, high quality loss |
|
120 |
| [phind-codellama-34b-python-v1.Q3_K_L.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q3_K_L.gguf) | Q3_K_L | 3 | 17.77 GB| 20.27 GB | small, substantial quality loss |
|
|
|
121 |
| [phind-codellama-34b-python-v1.Q4_K_S.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q4_K_S.gguf) | Q4_K_S | 4 | 19.15 GB| 21.65 GB | small, greater quality loss |
|
122 |
| [phind-codellama-34b-python-v1.Q4_K_M.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q4_K_M.gguf) | Q4_K_M | 4 | 20.22 GB| 22.72 GB | medium, balanced quality - recommended |
|
|
|
123 |
| [phind-codellama-34b-python-v1.Q5_K_S.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q5_K_S.gguf) | Q5_K_S | 5 | 23.24 GB| 25.74 GB | large, low quality loss - recommended |
|
124 |
| [phind-codellama-34b-python-v1.Q5_K_M.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q5_K_M.gguf) | Q5_K_M | 5 | 23.84 GB| 26.34 GB | large, very low quality loss - recommended |
|
125 |
| [phind-codellama-34b-python-v1.Q6_K.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q6_K.gguf) | Q6_K | 6 | 27.68 GB| 30.18 GB | very large, extremely low quality loss |
|
126 |
-
| [phind-codellama-34b-python-v1.Q8_0.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q8_0.gguf) | Q8_0 | 8 | 35.
|
127 |
|
128 |
**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.
|
|
|
|
|
|
|
129 |
<!-- README_GGUF.md-provided-files end -->
|
130 |
|
131 |
<!-- README_GGUF.md-how-to-run start -->
|
132 |
-
##
|
133 |
|
134 |
Make sure you are using `llama.cpp` from commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9) or later.
|
135 |
|
136 |
-
For compatibility with older versions of llama.cpp, or for
|
137 |
|
138 |
```
|
139 |
-
./main -t 10 -ngl 32 -m phind-codellama-34b-python-v1.q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "
|
140 |
```
|
141 |
-
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`.
|
142 |
|
143 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
144 |
|
@@ -151,6 +152,44 @@ For other parameters and how to use them, please refer to [the llama.cpp documen
|
|
151 |
## How to run in `text-generation-webui`
|
152 |
|
153 |
Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
<!-- README_GGUF.md-how-to-run end -->
|
155 |
|
156 |
<!-- footer start -->
|
@@ -176,7 +215,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
|
|
176 |
|
177 |
**Special thanks to**: Aemon Algiz.
|
178 |
|
179 |
-
**Patreon special mentions**:
|
180 |
|
181 |
|
182 |
Thank you to all my generous patrons and donaters!
|
@@ -213,7 +252,7 @@ pip install git+https://github.com/huggingface/transformers.git
|
|
213 |
|
214 |
Do not try to use the Llama chat markup with this model. Instead, simply tell it what you want and add "\n: " at the end of your task.
|
215 |
|
216 |
-
For example:
|
217 |
|
218 |
```
|
219 |
Write me a linked list implementation: \n
|
|
|
55 |
|
56 |
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.
|
57 |
|
58 |
+
Here are a list of clients and libraries that are known to support GGUF:
|
59 |
+
* [llama.cpp](https://github.com/ggerganov/llama.cpp).
|
60 |
* [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.
|
61 |
* [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 |
+
* [LM Studio](https://lmstudio.ai/), version 0.2.2 and later support GGUF. A fully featured local GUI with GPU acceleration on both Windows (NVidia and AMD), and macOS.
|
63 |
* [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), should now work, choose the `c_transformers` backend. A great web UI with many interesting features. Supports CUDA GPU acceleration.
|
64 |
* [ctransformers](https://github.com/marella/ctransformers), now supports GGUF as of version 0.2.24! A Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
|
65 |
* [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.
|
66 |
* [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.
|
67 |
|
|
|
|
|
68 |
<!-- README_GGUF.md-about-gguf end -->
|
|
|
69 |
<!-- repositories-available start -->
|
70 |
## Repositories available
|
71 |
|
72 |
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GPTQ)
|
73 |
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF)
|
|
|
74 |
* [Phind's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Phind/Phind-CodeLlama-34B-Python-v1)
|
75 |
<!-- repositories-available end -->
|
76 |
|
|
|
79 |
|
80 |
```
|
81 |
{prompt} \n
|
82 |
+
|
83 |
```
|
84 |
|
85 |
<!-- prompt-template end -->
|
|
|
88 |
|
89 |
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)
|
90 |
|
91 |
+
They are now also compatible with many third party UIs and libraries - please see the list at the top of the README.
|
|
|
|
|
92 |
|
93 |
## Explanation of quantisation methods
|
94 |
<details>
|
|
|
114 |
| [phind-codellama-34b-python-v1.Q3_K_S.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q3_K_S.gguf) | Q3_K_S | 3 | 14.61 GB| 17.11 GB | very small, high quality loss |
|
115 |
| [phind-codellama-34b-python-v1.Q3_K_M.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q3_K_M.gguf) | Q3_K_M | 3 | 16.28 GB| 18.78 GB | very small, high quality loss |
|
116 |
| [phind-codellama-34b-python-v1.Q3_K_L.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q3_K_L.gguf) | Q3_K_L | 3 | 17.77 GB| 20.27 GB | small, substantial quality loss |
|
117 |
+
| [phind-codellama-34b-python-v1.Q4_0.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q4_0.gguf) | Q4_0 | 4 | 19.05 GB| 21.55 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
|
118 |
| [phind-codellama-34b-python-v1.Q4_K_S.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q4_K_S.gguf) | Q4_K_S | 4 | 19.15 GB| 21.65 GB | small, greater quality loss |
|
119 |
| [phind-codellama-34b-python-v1.Q4_K_M.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q4_K_M.gguf) | Q4_K_M | 4 | 20.22 GB| 22.72 GB | medium, balanced quality - recommended |
|
120 |
+
| [phind-codellama-34b-python-v1.Q5_0.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q5_0.gguf) | Q5_0 | 5 | 23.24 GB| 25.74 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
|
121 |
| [phind-codellama-34b-python-v1.Q5_K_S.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q5_K_S.gguf) | Q5_K_S | 5 | 23.24 GB| 25.74 GB | large, low quality loss - recommended |
|
122 |
| [phind-codellama-34b-python-v1.Q5_K_M.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q5_K_M.gguf) | Q5_K_M | 5 | 23.84 GB| 26.34 GB | large, very low quality loss - recommended |
|
123 |
| [phind-codellama-34b-python-v1.Q6_K.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q6_K.gguf) | Q6_K | 6 | 27.68 GB| 30.18 GB | very large, extremely low quality loss |
|
124 |
+
| [phind-codellama-34b-python-v1.Q8_0.gguf](https://huggingface.co/TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF/blob/main/phind-codellama-34b-python-v1.Q8_0.gguf) | Q8_0 | 8 | 35.86 GB| 38.36 GB | very large, extremely low quality loss - not recommended |
|
125 |
|
126 |
**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.
|
127 |
+
|
128 |
+
|
129 |
+
|
130 |
<!-- README_GGUF.md-provided-files end -->
|
131 |
|
132 |
<!-- README_GGUF.md-how-to-run start -->
|
133 |
+
## Example `llama.cpp` command
|
134 |
|
135 |
Make sure you are using `llama.cpp` from commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9) or later.
|
136 |
|
137 |
+
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.
|
138 |
|
139 |
```
|
140 |
+
./main -t 10 -ngl 32 -m phind-codellama-34b-python-v1.q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "Write a story about llamas \n"
|
141 |
```
|
142 |
+
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`.
|
143 |
|
144 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
145 |
|
|
|
152 |
## How to run in `text-generation-webui`
|
153 |
|
154 |
Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
|
155 |
+
|
156 |
+
## How to run from Python code
|
157 |
+
|
158 |
+
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.
|
159 |
+
|
160 |
+
### How to load this model from Python using ctransformers
|
161 |
+
|
162 |
+
#### First install the package
|
163 |
+
|
164 |
+
```bash
|
165 |
+
# Base ctransformers with no GPU acceleration
|
166 |
+
pip install ctransformers>=0.2.24
|
167 |
+
# Or with CUDA GPU acceleration
|
168 |
+
pip install ctransformers[cuda]>=0.2.24
|
169 |
+
# Or with ROCm GPU acceleration
|
170 |
+
CT_HIPBLAS=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
|
171 |
+
# Or with Metal GPU acceleration for macOS systems
|
172 |
+
CT_METAL=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
|
173 |
+
```
|
174 |
+
|
175 |
+
#### Simple example code to load one of these GGUF models
|
176 |
+
|
177 |
+
```python
|
178 |
+
from ctransformers import AutoModelForCausalLM
|
179 |
+
|
180 |
+
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
|
181 |
+
llm = AutoModelForCausalLM.from_pretrained("TheBloke/Phind-CodeLlama-34B-Python-v1-GGUF", model_file="phind-codellama-34b-python-v1.q4_K_M.gguf", model_type="llama", gpu_layers=50)
|
182 |
+
|
183 |
+
print(llm("AI is going to"))
|
184 |
+
```
|
185 |
+
|
186 |
+
## How to use with LangChain
|
187 |
+
|
188 |
+
Here's guides on using llama-cpp-python or ctransformers with LangChain:
|
189 |
+
|
190 |
+
* [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
|
191 |
+
* [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
|
192 |
+
|
193 |
<!-- README_GGUF.md-how-to-run end -->
|
194 |
|
195 |
<!-- footer start -->
|
|
|
215 |
|
216 |
**Special thanks to**: Aemon Algiz.
|
217 |
|
218 |
+
**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
|
219 |
|
220 |
|
221 |
Thank you to all my generous patrons and donaters!
|
|
|
252 |
|
253 |
Do not try to use the Llama chat markup with this model. Instead, simply tell it what you want and add "\n: " at the end of your task.
|
254 |
|
255 |
+
For example:
|
256 |
|
257 |
```
|
258 |
Write me a linked list implementation: \n
|