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