Upload README.md
Browse files
README.md
CHANGED
@@ -47,7 +47,7 @@ This repo contains GGUF format model files for [Eric Hartford's Wizardlm 30B Unc
|
|
47 |
<!-- README_GGUF.md-about-gguf start -->
|
48 |
### About GGUF
|
49 |
|
50 |
-
GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp.
|
51 |
|
52 |
Here is an incomplate list of clients and libraries that are known to support GGUF:
|
53 |
|
@@ -86,7 +86,7 @@ Here is an incomplate list of clients and libraries that are known to support GG
|
|
86 |
<!-- compatibility_gguf start -->
|
87 |
## Compatibility
|
88 |
|
89 |
-
These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [
|
90 |
|
91 |
They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
|
92 |
|
@@ -150,7 +150,7 @@ Then click Download.
|
|
150 |
I recommend using the `huggingface-hub` Python library:
|
151 |
|
152 |
```shell
|
153 |
-
pip3 install huggingface-hub
|
154 |
```
|
155 |
|
156 |
Then you can download any individual model file to the current directory, at high speed, with a command like this:
|
@@ -179,25 +179,25 @@ pip3 install hf_transfer
|
|
179 |
And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
|
180 |
|
181 |
```shell
|
182 |
-
|
183 |
```
|
184 |
|
185 |
-
Windows
|
186 |
</details>
|
187 |
<!-- README_GGUF.md-how-to-download end -->
|
188 |
|
189 |
<!-- README_GGUF.md-how-to-run start -->
|
190 |
## Example `llama.cpp` command
|
191 |
|
192 |
-
Make sure you are using `llama.cpp` from commit [
|
193 |
|
194 |
```shell
|
195 |
-
./main -ngl 32 -m WizardLM-30B-Uncensored.Q4_K_M.gguf --color -c
|
196 |
```
|
197 |
|
198 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
199 |
|
200 |
-
Change `-c
|
201 |
|
202 |
If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
|
203 |
|
@@ -211,22 +211,24 @@ Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://git
|
|
211 |
|
212 |
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.
|
213 |
|
214 |
-
### How to load this model
|
215 |
|
216 |
#### First install the package
|
217 |
|
218 |
-
|
|
|
|
|
219 |
# Base ctransformers with no GPU acceleration
|
220 |
-
pip install ctransformers
|
221 |
# Or with CUDA GPU acceleration
|
222 |
-
pip install ctransformers[cuda]
|
223 |
-
# Or with ROCm GPU acceleration
|
224 |
-
CT_HIPBLAS=1 pip install ctransformers
|
225 |
-
# Or with Metal GPU acceleration for macOS systems
|
226 |
-
CT_METAL=1 pip install ctransformers
|
227 |
```
|
228 |
|
229 |
-
#### Simple example code
|
230 |
|
231 |
```python
|
232 |
from ctransformers import AutoModelForCausalLM
|
@@ -239,7 +241,7 @@ print(llm("AI is going to"))
|
|
239 |
|
240 |
## How to use with LangChain
|
241 |
|
242 |
-
Here
|
243 |
|
244 |
* [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
|
245 |
* [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
|
|
|
47 |
<!-- README_GGUF.md-about-gguf start -->
|
48 |
### About GGUF
|
49 |
|
50 |
+
GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp.
|
51 |
|
52 |
Here is an incomplate list of clients and libraries that are known to support GGUF:
|
53 |
|
|
|
86 |
<!-- compatibility_gguf start -->
|
87 |
## Compatibility
|
88 |
|
89 |
+
These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221)
|
90 |
|
91 |
They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
|
92 |
|
|
|
150 |
I recommend using the `huggingface-hub` Python library:
|
151 |
|
152 |
```shell
|
153 |
+
pip3 install huggingface-hub
|
154 |
```
|
155 |
|
156 |
Then you can download any individual model file to the current directory, at high speed, with a command like this:
|
|
|
179 |
And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
|
180 |
|
181 |
```shell
|
182 |
+
HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/WizardLM-30B-uncensored-GGUF WizardLM-30B-Uncensored.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
|
183 |
```
|
184 |
|
185 |
+
Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
|
186 |
</details>
|
187 |
<!-- README_GGUF.md-how-to-download end -->
|
188 |
|
189 |
<!-- README_GGUF.md-how-to-run start -->
|
190 |
## Example `llama.cpp` command
|
191 |
|
192 |
+
Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
|
193 |
|
194 |
```shell
|
195 |
+
./main -ngl 32 -m WizardLM-30B-Uncensored.Q4_K_M.gguf --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "{prompt}\n### Response:"
|
196 |
```
|
197 |
|
198 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
199 |
|
200 |
+
Change `-c 2048` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically.
|
201 |
|
202 |
If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
|
203 |
|
|
|
211 |
|
212 |
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.
|
213 |
|
214 |
+
### How to load this model in Python code, using ctransformers
|
215 |
|
216 |
#### First install the package
|
217 |
|
218 |
+
Run one of the following commands, according to your system:
|
219 |
+
|
220 |
+
```shell
|
221 |
# Base ctransformers with no GPU acceleration
|
222 |
+
pip install ctransformers
|
223 |
# Or with CUDA GPU acceleration
|
224 |
+
pip install ctransformers[cuda]
|
225 |
+
# Or with AMD ROCm GPU acceleration (Linux only)
|
226 |
+
CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers
|
227 |
+
# Or with Metal GPU acceleration for macOS systems only
|
228 |
+
CT_METAL=1 pip install ctransformers --no-binary ctransformers
|
229 |
```
|
230 |
|
231 |
+
#### Simple ctransformers example code
|
232 |
|
233 |
```python
|
234 |
from ctransformers import AutoModelForCausalLM
|
|
|
241 |
|
242 |
## How to use with LangChain
|
243 |
|
244 |
+
Here are guides on using llama-cpp-python and ctransformers with LangChain:
|
245 |
|
246 |
* [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
|
247 |
* [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
|