Upload README.md
Browse files
README.md
CHANGED
@@ -62,7 +62,7 @@ This repo contains GGUF format model files for [digitous' 13B HyperMantis](https
|
|
62 |
<!-- README_GGUF.md-about-gguf start -->
|
63 |
### About GGUF
|
64 |
|
65 |
-
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.
|
66 |
|
67 |
Here is an incomplate list of clients and libraries that are known to support GGUF:
|
68 |
|
@@ -105,7 +105,7 @@ Below is an instruction that describes a task. Write a response that appropriate
|
|
105 |
<!-- compatibility_gguf start -->
|
106 |
## Compatibility
|
107 |
|
108 |
-
These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [
|
109 |
|
110 |
They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
|
111 |
|
@@ -169,7 +169,7 @@ Then click Download.
|
|
169 |
I recommend using the `huggingface-hub` Python library:
|
170 |
|
171 |
```shell
|
172 |
-
pip3 install huggingface-hub
|
173 |
```
|
174 |
|
175 |
Then you can download any individual model file to the current directory, at high speed, with a command like this:
|
@@ -198,25 +198,25 @@ pip3 install hf_transfer
|
|
198 |
And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
|
199 |
|
200 |
```shell
|
201 |
-
|
202 |
```
|
203 |
|
204 |
-
Windows
|
205 |
</details>
|
206 |
<!-- README_GGUF.md-how-to-download end -->
|
207 |
|
208 |
<!-- README_GGUF.md-how-to-run start -->
|
209 |
## Example `llama.cpp` command
|
210 |
|
211 |
-
Make sure you are using `llama.cpp` from commit [
|
212 |
|
213 |
```shell
|
214 |
-
./main -ngl 32 -m 13B-HyperMantis.Q4_K_M.gguf --color -c
|
215 |
```
|
216 |
|
217 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
218 |
|
219 |
-
Change `-c
|
220 |
|
221 |
If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
|
222 |
|
@@ -230,22 +230,24 @@ Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://git
|
|
230 |
|
231 |
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.
|
232 |
|
233 |
-
### How to load this model
|
234 |
|
235 |
#### First install the package
|
236 |
|
237 |
-
|
|
|
|
|
238 |
# Base ctransformers with no GPU acceleration
|
239 |
-
pip install ctransformers
|
240 |
# Or with CUDA GPU acceleration
|
241 |
-
pip install ctransformers[cuda]
|
242 |
-
# Or with ROCm GPU acceleration
|
243 |
-
CT_HIPBLAS=1 pip install ctransformers
|
244 |
-
# Or with Metal GPU acceleration for macOS systems
|
245 |
-
CT_METAL=1 pip install ctransformers
|
246 |
```
|
247 |
|
248 |
-
#### Simple example code
|
249 |
|
250 |
```python
|
251 |
from ctransformers import AutoModelForCausalLM
|
@@ -258,7 +260,7 @@ print(llm("AI is going to"))
|
|
258 |
|
259 |
## How to use with LangChain
|
260 |
|
261 |
-
Here
|
262 |
|
263 |
* [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
|
264 |
* [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
|
|
|
62 |
<!-- README_GGUF.md-about-gguf start -->
|
63 |
### About GGUF
|
64 |
|
65 |
+
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.
|
66 |
|
67 |
Here is an incomplate list of clients and libraries that are known to support GGUF:
|
68 |
|
|
|
105 |
<!-- compatibility_gguf start -->
|
106 |
## Compatibility
|
107 |
|
108 |
+
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)
|
109 |
|
110 |
They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
|
111 |
|
|
|
169 |
I recommend using the `huggingface-hub` Python library:
|
170 |
|
171 |
```shell
|
172 |
+
pip3 install huggingface-hub
|
173 |
```
|
174 |
|
175 |
Then you can download any individual model file to the current directory, at high speed, with a command like this:
|
|
|
198 |
And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
|
199 |
|
200 |
```shell
|
201 |
+
HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/13B-HyperMantis-GGUF 13B-HyperMantis.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
|
202 |
```
|
203 |
|
204 |
+
Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
|
205 |
</details>
|
206 |
<!-- README_GGUF.md-how-to-download end -->
|
207 |
|
208 |
<!-- README_GGUF.md-how-to-run start -->
|
209 |
## Example `llama.cpp` command
|
210 |
|
211 |
+
Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
|
212 |
|
213 |
```shell
|
214 |
+
./main -ngl 32 -m 13B-HyperMantis.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:"
|
215 |
```
|
216 |
|
217 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
218 |
|
219 |
+
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.
|
220 |
|
221 |
If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
|
222 |
|
|
|
230 |
|
231 |
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.
|
232 |
|
233 |
+
### How to load this model in Python code, using ctransformers
|
234 |
|
235 |
#### First install the package
|
236 |
|
237 |
+
Run one of the following commands, according to your system:
|
238 |
+
|
239 |
+
```shell
|
240 |
# Base ctransformers with no GPU acceleration
|
241 |
+
pip install ctransformers
|
242 |
# Or with CUDA GPU acceleration
|
243 |
+
pip install ctransformers[cuda]
|
244 |
+
# Or with AMD ROCm GPU acceleration (Linux only)
|
245 |
+
CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers
|
246 |
+
# Or with Metal GPU acceleration for macOS systems only
|
247 |
+
CT_METAL=1 pip install ctransformers --no-binary ctransformers
|
248 |
```
|
249 |
|
250 |
+
#### Simple ctransformers example code
|
251 |
|
252 |
```python
|
253 |
from ctransformers import AutoModelForCausalLM
|
|
|
260 |
|
261 |
## How to use with LangChain
|
262 |
|
263 |
+
Here are guides on using llama-cpp-python and ctransformers with LangChain:
|
264 |
|
265 |
* [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
|
266 |
* [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
|