Upload README.md
Browse files
README.md
CHANGED
@@ -52,7 +52,7 @@ This repo contains GGUF format model files for [Gryphe's MythoBoros 13B](https:/
|
|
52 |
<!-- README_GGUF.md-about-gguf start -->
|
53 |
### About GGUF
|
54 |
|
55 |
-
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.
|
56 |
|
57 |
Here is an incomplate list of clients and libraries that are known to support GGUF:
|
58 |
|
@@ -95,7 +95,7 @@ Below is an instruction that describes a task. Write a response that appropriate
|
|
95 |
<!-- compatibility_gguf start -->
|
96 |
## Compatibility
|
97 |
|
98 |
-
These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [
|
99 |
|
100 |
They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
|
101 |
|
@@ -159,7 +159,7 @@ Then click Download.
|
|
159 |
I recommend using the `huggingface-hub` Python library:
|
160 |
|
161 |
```shell
|
162 |
-
pip3 install huggingface-hub
|
163 |
```
|
164 |
|
165 |
Then you can download any individual model file to the current directory, at high speed, with a command like this:
|
@@ -188,25 +188,25 @@ pip3 install hf_transfer
|
|
188 |
And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
|
189 |
|
190 |
```shell
|
191 |
-
|
192 |
```
|
193 |
|
194 |
-
Windows
|
195 |
</details>
|
196 |
<!-- README_GGUF.md-how-to-download end -->
|
197 |
|
198 |
<!-- README_GGUF.md-how-to-run start -->
|
199 |
## Example `llama.cpp` command
|
200 |
|
201 |
-
Make sure you are using `llama.cpp` from commit [
|
202 |
|
203 |
```shell
|
204 |
-
./main -ngl 32 -m mythoboros-13b.Q4_K_M.gguf --color -c
|
205 |
```
|
206 |
|
207 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
208 |
|
209 |
-
Change `-c
|
210 |
|
211 |
If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
|
212 |
|
@@ -220,22 +220,24 @@ Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://git
|
|
220 |
|
221 |
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.
|
222 |
|
223 |
-
### How to load this model
|
224 |
|
225 |
#### First install the package
|
226 |
|
227 |
-
|
|
|
|
|
228 |
# Base ctransformers with no GPU acceleration
|
229 |
-
pip install ctransformers
|
230 |
# Or with CUDA GPU acceleration
|
231 |
-
pip install ctransformers[cuda]
|
232 |
-
# Or with ROCm GPU acceleration
|
233 |
-
CT_HIPBLAS=1 pip install ctransformers
|
234 |
-
# Or with Metal GPU acceleration for macOS systems
|
235 |
-
CT_METAL=1 pip install ctransformers
|
236 |
```
|
237 |
|
238 |
-
#### Simple example code
|
239 |
|
240 |
```python
|
241 |
from ctransformers import AutoModelForCausalLM
|
@@ -248,7 +250,7 @@ print(llm("AI is going to"))
|
|
248 |
|
249 |
## How to use with LangChain
|
250 |
|
251 |
-
Here
|
252 |
|
253 |
* [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
|
254 |
* [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
|
|
|
52 |
<!-- README_GGUF.md-about-gguf start -->
|
53 |
### About GGUF
|
54 |
|
55 |
+
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.
|
56 |
|
57 |
Here is an incomplate list of clients and libraries that are known to support GGUF:
|
58 |
|
|
|
95 |
<!-- compatibility_gguf start -->
|
96 |
## Compatibility
|
97 |
|
98 |
+
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)
|
99 |
|
100 |
They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
|
101 |
|
|
|
159 |
I recommend using the `huggingface-hub` Python library:
|
160 |
|
161 |
```shell
|
162 |
+
pip3 install huggingface-hub
|
163 |
```
|
164 |
|
165 |
Then you can download any individual model file to the current directory, at high speed, with a command like this:
|
|
|
188 |
And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
|
189 |
|
190 |
```shell
|
191 |
+
HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/MythoBoros-13B-GGUF mythoboros-13b.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
|
192 |
```
|
193 |
|
194 |
+
Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
|
195 |
</details>
|
196 |
<!-- README_GGUF.md-how-to-download end -->
|
197 |
|
198 |
<!-- README_GGUF.md-how-to-run start -->
|
199 |
## Example `llama.cpp` command
|
200 |
|
201 |
+
Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
|
202 |
|
203 |
```shell
|
204 |
+
./main -ngl 32 -m mythoboros-13b.Q4_K_M.gguf --color -c 2048 --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:\n{prompt}\n\n### Response:"
|
205 |
```
|
206 |
|
207 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
208 |
|
209 |
+
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.
|
210 |
|
211 |
If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
|
212 |
|
|
|
220 |
|
221 |
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.
|
222 |
|
223 |
+
### How to load this model in Python code, using ctransformers
|
224 |
|
225 |
#### First install the package
|
226 |
|
227 |
+
Run one of the following commands, according to your system:
|
228 |
+
|
229 |
+
```shell
|
230 |
# Base ctransformers with no GPU acceleration
|
231 |
+
pip install ctransformers
|
232 |
# Or with CUDA GPU acceleration
|
233 |
+
pip install ctransformers[cuda]
|
234 |
+
# Or with AMD ROCm GPU acceleration (Linux only)
|
235 |
+
CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers
|
236 |
+
# Or with Metal GPU acceleration for macOS systems only
|
237 |
+
CT_METAL=1 pip install ctransformers --no-binary ctransformers
|
238 |
```
|
239 |
|
240 |
+
#### Simple ctransformers example code
|
241 |
|
242 |
```python
|
243 |
from ctransformers import AutoModelForCausalLM
|
|
|
250 |
|
251 |
## How to use with LangChain
|
252 |
|
253 |
+
Here are guides on using llama-cpp-python and ctransformers with LangChain:
|
254 |
|
255 |
* [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
|
256 |
* [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
|