Transformers
GGUF
English
llama
TheBloke commited on
Commit
ec71d0a
1 Parent(s): 8d0d7a6

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -18
README.md CHANGED
@@ -51,7 +51,7 @@ This repo contains GGUF format model files for [Allen AI's Tulu 30B](https://hug
51
  <!-- README_GGUF.md-about-gguf start -->
52
  ### About GGUF
53
 
54
- 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. GGUF offers numerous advantages over GGML, such as better tokenisation, and support for special tokens. It is also supports metadata, and is designed to be extensible.
55
 
56
  Here is an incomplate list of clients and libraries that are known to support GGUF:
57
 
@@ -91,7 +91,7 @@ Here is an incomplate list of clients and libraries that are known to support GG
91
  <!-- compatibility_gguf start -->
92
  ## Compatibility
93
 
94
- These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d36d5be95a0d9088b674dbb27354107221](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221)
95
 
96
  They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
97
 
@@ -155,7 +155,7 @@ Then click Download.
155
  I recommend using the `huggingface-hub` Python library:
156
 
157
  ```shell
158
- pip3 install huggingface-hub>=0.17.1
159
  ```
160
 
161
  Then you can download any individual model file to the current directory, at high speed, with a command like this:
@@ -184,25 +184,25 @@ pip3 install hf_transfer
184
  And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
185
 
186
  ```shell
187
- HUGGINGFACE_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/tulu-30B-GGUF tulu-30b.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
188
  ```
189
 
190
- Windows CLI users: Use `set HUGGINGFACE_HUB_ENABLE_HF_TRANSFER=1` before running the download command.
191
  </details>
192
  <!-- README_GGUF.md-how-to-download end -->
193
 
194
  <!-- README_GGUF.md-how-to-run start -->
195
  ## Example `llama.cpp` command
196
 
197
- Make sure you are using `llama.cpp` from commit [d0cee0d36d5be95a0d9088b674dbb27354107221](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
198
 
199
  ```shell
200
- ./main -ngl 32 -m tulu-30b.Q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|user|>\n{prompt}\n<|assistant|>"
201
  ```
202
 
203
  Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
204
 
205
- Change `-c 4096` 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.
206
 
207
  If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
208
 
@@ -216,22 +216,24 @@ Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://git
216
 
217
  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.
218
 
219
- ### How to load this model from Python using ctransformers
220
 
221
  #### First install the package
222
 
223
- ```bash
 
 
224
  # Base ctransformers with no GPU acceleration
225
- pip install ctransformers>=0.2.24
226
  # Or with CUDA GPU acceleration
227
- pip install ctransformers[cuda]>=0.2.24
228
- # Or with ROCm GPU acceleration
229
- CT_HIPBLAS=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
230
- # Or with Metal GPU acceleration for macOS systems
231
- CT_METAL=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
232
  ```
233
 
234
- #### Simple example code to load one of these GGUF models
235
 
236
  ```python
237
  from ctransformers import AutoModelForCausalLM
@@ -244,7 +246,7 @@ print(llm("AI is going to"))
244
 
245
  ## How to use with LangChain
246
 
247
- Here's guides on using llama-cpp-python or ctransformers with LangChain:
248
 
249
  * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
250
  * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
 
51
  <!-- README_GGUF.md-about-gguf start -->
52
  ### About GGUF
53
 
54
+ 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.
55
 
56
  Here is an incomplate list of clients and libraries that are known to support GGUF:
57
 
 
91
  <!-- compatibility_gguf start -->
92
  ## Compatibility
93
 
94
+ 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)
95
 
96
  They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
97
 
 
155
  I recommend using the `huggingface-hub` Python library:
156
 
157
  ```shell
158
+ pip3 install huggingface-hub
159
  ```
160
 
161
  Then you can download any individual model file to the current directory, at high speed, with a command like this:
 
184
  And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
185
 
186
  ```shell
187
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/tulu-30B-GGUF tulu-30b.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
188
  ```
189
 
190
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
191
  </details>
192
  <!-- README_GGUF.md-how-to-download end -->
193
 
194
  <!-- README_GGUF.md-how-to-run start -->
195
  ## Example `llama.cpp` command
196
 
197
+ Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
198
 
199
  ```shell
200
+ ./main -ngl 32 -m tulu-30b.Q4_K_M.gguf --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|user|>\n{prompt}\n<|assistant|>"
201
  ```
202
 
203
  Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
204
 
205
+ 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.
206
 
207
  If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
208
 
 
216
 
217
  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.
218
 
219
+ ### How to load this model in Python code, using ctransformers
220
 
221
  #### First install the package
222
 
223
+ Run one of the following commands, according to your system:
224
+
225
+ ```shell
226
  # Base ctransformers with no GPU acceleration
227
+ pip install ctransformers
228
  # Or with CUDA GPU acceleration
229
+ pip install ctransformers[cuda]
230
+ # Or with AMD ROCm GPU acceleration (Linux only)
231
+ CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers
232
+ # Or with Metal GPU acceleration for macOS systems only
233
+ CT_METAL=1 pip install ctransformers --no-binary ctransformers
234
  ```
235
 
236
+ #### Simple ctransformers example code
237
 
238
  ```python
239
  from ctransformers import AutoModelForCausalLM
 
246
 
247
  ## How to use with LangChain
248
 
249
+ Here are guides on using llama-cpp-python and ctransformers with LangChain:
250
 
251
  * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
252
  * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)