Upload README.md
Browse files
README.md
CHANGED
@@ -1,13 +1,27 @@
|
|
1 |
---
|
|
|
2 |
inference: false
|
3 |
language:
|
4 |
- en
|
5 |
-
license:
|
6 |
model_creator: Meta Llama 2
|
7 |
-
model_link: https://huggingface.co/meta-llama/Llama-2-13b-chat-hf
|
8 |
model_name: Llama 2 13B Chat
|
9 |
model_type: llama
|
10 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
quantized_by: TheBloke
|
12 |
tags:
|
13 |
- facebook
|
@@ -38,34 +52,36 @@ tags:
|
|
38 |
- Model creator: [Meta Llama 2](https://huggingface.co/meta-llama)
|
39 |
- Original model: [Llama 2 13B Chat](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf)
|
40 |
|
|
|
41 |
## Description
|
42 |
|
43 |
This repo contains GGUF format model files for [Meta's Llama 2 13B-chat](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf).
|
44 |
|
|
|
45 |
<!-- README_GGUF.md-about-gguf start -->
|
46 |
### About GGUF
|
47 |
|
48 |
-
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.
|
49 |
|
50 |
-
|
51 |
|
52 |
-
|
53 |
-
* [
|
54 |
-
* [
|
55 |
-
* [
|
56 |
-
* [
|
57 |
-
* [
|
58 |
-
* [ctransformers](https://github.com/marella/ctransformers),
|
59 |
-
* [llama-cpp-python](https://github.com/abetlen/llama-cpp-python),
|
60 |
-
* [candle](https://github.com/huggingface/candle),
|
61 |
|
62 |
<!-- README_GGUF.md-about-gguf end -->
|
63 |
<!-- repositories-available start -->
|
64 |
## Repositories available
|
65 |
|
|
|
66 |
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ)
|
67 |
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Llama-2-13B-chat-GGUF)
|
68 |
-
* [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/Llama-2-13B-chat-GGML)
|
69 |
* [Meta Llama 2's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/meta-llama/Llama-2-13B-chat-hf)
|
70 |
<!-- repositories-available end -->
|
71 |
|
@@ -81,12 +97,14 @@ You are a helpful, respectful and honest assistant. Always answer as helpfully a
|
|
81 |
```
|
82 |
|
83 |
<!-- prompt-template end -->
|
|
|
|
|
84 |
<!-- compatibility_gguf start -->
|
85 |
## Compatibility
|
86 |
|
87 |
-
These quantised
|
88 |
|
89 |
-
They are
|
90 |
|
91 |
## Explanation of quantisation methods
|
92 |
<details>
|
@@ -122,23 +140,80 @@ Refer to the Provided Files table below to see what files use which methods, and
|
|
122 |
| [llama-2-13b-chat.Q8_0.gguf](https://huggingface.co/TheBloke/Llama-2-13B-chat-GGUF/blob/main/llama-2-13b-chat.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended |
|
123 |
|
124 |
**Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
|
|
|
|
|
|
|
125 |
<!-- README_GGUF.md-provided-files end -->
|
126 |
|
127 |
-
<!-- README_GGUF.md-how-to-
|
128 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
-
|
131 |
|
132 |
-
|
133 |
|
|
|
|
|
|
|
|
|
134 |
```
|
135 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
```
|
137 |
-
Change `-t 10` to the number of physical CPU cores you have. For example if your system has 8 cores/16 threads, use `-t 8`. If offloading all layers to GPU, set `-t 1`.
|
138 |
|
139 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
140 |
|
141 |
-
Change `-c 4096` to the desired sequence length
|
142 |
|
143 |
If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
|
144 |
|
@@ -173,7 +248,7 @@ CT_METAL=1 pip install ctransformers>=0.2.24 --no-binary ctransformers
|
|
173 |
from ctransformers import AutoModelForCausalLM
|
174 |
|
175 |
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
|
176 |
-
llm = AutoModelForCausalLM.from_pretrained("TheBloke/Llama-2-13B-chat-
|
177 |
|
178 |
print(llm("AI is going to"))
|
179 |
```
|
@@ -195,10 +270,12 @@ For further support, and discussions on these models and AI in general, join us
|
|
195 |
|
196 |
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
197 |
|
198 |
-
## Thanks, and how to contribute
|
199 |
|
200 |
Thanks to the [chirper.ai](https://chirper.ai) team!
|
201 |
|
|
|
|
|
202 |
I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
|
203 |
|
204 |
If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
|
@@ -210,7 +287,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
|
|
210 |
|
211 |
**Special thanks to**: Aemon Algiz.
|
212 |
|
213 |
-
**Patreon special mentions**:
|
214 |
|
215 |
|
216 |
Thank you to all my generous patrons and donaters!
|
|
|
1 |
---
|
2 |
+
base_model: https://huggingface.co/meta-llama/Llama-2-13b-chat-hf
|
3 |
inference: false
|
4 |
language:
|
5 |
- en
|
6 |
+
license: llama2
|
7 |
model_creator: Meta Llama 2
|
|
|
8 |
model_name: Llama 2 13B Chat
|
9 |
model_type: llama
|
10 |
pipeline_tag: text-generation
|
11 |
+
prompt_template: '[INST] <<SYS>>
|
12 |
+
|
13 |
+
You are a helpful, respectful and honest assistant. Always answer as helpfully as
|
14 |
+
possible, while being safe. Your answers should not include any harmful, unethical,
|
15 |
+
racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses
|
16 |
+
are socially unbiased and positive in nature. If a question does not make any sense,
|
17 |
+
or is not factually coherent, explain why instead of answering something not correct.
|
18 |
+
If you don''t know the answer to a question, please don''t share false information.
|
19 |
+
|
20 |
+
<</SYS>>
|
21 |
+
|
22 |
+
{prompt}[/INST]
|
23 |
+
|
24 |
+
'
|
25 |
quantized_by: TheBloke
|
26 |
tags:
|
27 |
- facebook
|
|
|
52 |
- Model creator: [Meta Llama 2](https://huggingface.co/meta-llama)
|
53 |
- Original model: [Llama 2 13B Chat](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf)
|
54 |
|
55 |
+
<!-- description start -->
|
56 |
## Description
|
57 |
|
58 |
This repo contains GGUF format model files for [Meta's Llama 2 13B-chat](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf).
|
59 |
|
60 |
+
<!-- description end -->
|
61 |
<!-- README_GGUF.md-about-gguf start -->
|
62 |
### About GGUF
|
63 |
|
64 |
+
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.
|
65 |
|
66 |
+
Here is an incomplate list of clients and libraries that are known to support GGUF:
|
67 |
|
68 |
+
* [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
|
69 |
+
* [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration.
|
70 |
+
* [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling.
|
71 |
+
* [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration.
|
72 |
+
* [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection.
|
73 |
+
* [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration.
|
74 |
+
* [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
|
75 |
+
* [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
|
76 |
+
* [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
|
77 |
|
78 |
<!-- README_GGUF.md-about-gguf end -->
|
79 |
<!-- repositories-available start -->
|
80 |
## Repositories available
|
81 |
|
82 |
+
* [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Llama-2-13B-chat-AWQ)
|
83 |
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ)
|
84 |
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Llama-2-13B-chat-GGUF)
|
|
|
85 |
* [Meta Llama 2's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/meta-llama/Llama-2-13B-chat-hf)
|
86 |
<!-- repositories-available end -->
|
87 |
|
|
|
97 |
```
|
98 |
|
99 |
<!-- prompt-template end -->
|
100 |
+
|
101 |
+
|
102 |
<!-- compatibility_gguf start -->
|
103 |
## Compatibility
|
104 |
|
105 |
+
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)
|
106 |
|
107 |
+
They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
|
108 |
|
109 |
## Explanation of quantisation methods
|
110 |
<details>
|
|
|
140 |
| [llama-2-13b-chat.Q8_0.gguf](https://huggingface.co/TheBloke/Llama-2-13B-chat-GGUF/blob/main/llama-2-13b-chat.Q8_0.gguf) | Q8_0 | 8 | 13.83 GB| 16.33 GB | very large, extremely low quality loss - not recommended |
|
141 |
|
142 |
**Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
|
143 |
+
|
144 |
+
|
145 |
+
|
146 |
<!-- README_GGUF.md-provided-files end -->
|
147 |
|
148 |
+
<!-- README_GGUF.md-how-to-download start -->
|
149 |
+
## How to download GGUF files
|
150 |
+
|
151 |
+
**Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single file.
|
152 |
+
|
153 |
+
The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
|
154 |
+
- LM Studio
|
155 |
+
- LoLLMS Web UI
|
156 |
+
- Faraday.dev
|
157 |
+
|
158 |
+
### In `text-generation-webui`
|
159 |
+
|
160 |
+
Under Download Model, you can enter the model repo: TheBloke/Llama-2-13B-chat-GGUF and below it, a specific filename to download, such as: llama-2-13b-chat.q4_K_M.gguf.
|
161 |
|
162 |
+
Then click Download.
|
163 |
|
164 |
+
### On the command line, including multiple files at once
|
165 |
|
166 |
+
I recommend using the `huggingface-hub` Python library:
|
167 |
+
|
168 |
+
```shell
|
169 |
+
pip3 install huggingface-hub>=0.17.1
|
170 |
```
|
171 |
+
|
172 |
+
Then you can download any individual model file to the current directory, at high speed, with a command like this:
|
173 |
+
|
174 |
+
```shell
|
175 |
+
huggingface-cli download TheBloke/Llama-2-13B-chat-GGUF llama-2-13b-chat.q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
|
176 |
+
```
|
177 |
+
|
178 |
+
<details>
|
179 |
+
<summary>More advanced huggingface-cli download usage</summary>
|
180 |
+
|
181 |
+
You can also download multiple files at once with a pattern:
|
182 |
+
|
183 |
+
```shell
|
184 |
+
huggingface-cli download TheBloke/Llama-2-13B-chat-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
|
185 |
+
```
|
186 |
+
|
187 |
+
For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
|
188 |
+
|
189 |
+
To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
|
190 |
+
|
191 |
+
```shell
|
192 |
+
pip3 install hf_transfer
|
193 |
+
```
|
194 |
+
|
195 |
+
And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
|
196 |
+
|
197 |
+
```shell
|
198 |
+
HUGGINGFACE_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/Llama-2-13B-chat-GGUF llama-2-13b-chat.q4_K_M.gguf --local-dir . --local-dir-use-symlinks False
|
199 |
+
```
|
200 |
+
|
201 |
+
Windows CLI users: Use `set HUGGINGFACE_HUB_ENABLE_HF_TRANSFER=1` before running the download command.
|
202 |
+
</details>
|
203 |
+
<!-- README_GGUF.md-how-to-download end -->
|
204 |
+
|
205 |
+
<!-- README_GGUF.md-how-to-run start -->
|
206 |
+
## Example `llama.cpp` command
|
207 |
+
|
208 |
+
Make sure you are using `llama.cpp` from commit [d0cee0d36d5be95a0d9088b674dbb27354107221](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
|
209 |
+
|
210 |
+
```shell
|
211 |
+
./main -ngl 32 -m llama-2-13b-chat.q4_K_M.gguf --color -c 4096 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "[INST] <<SYS>>\nYou are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.\n<</SYS>>\n{prompt}[/INST]"
|
212 |
```
|
|
|
213 |
|
214 |
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
215 |
|
216 |
+
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.
|
217 |
|
218 |
If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
|
219 |
|
|
|
248 |
from ctransformers import AutoModelForCausalLM
|
249 |
|
250 |
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
|
251 |
+
llm = AutoModelForCausalLM.from_pretrained("TheBloke/Llama-2-13B-chat-GGUF", model_file="llama-2-13b-chat.q4_K_M.gguf", model_type="llama", gpu_layers=50)
|
252 |
|
253 |
print(llm("AI is going to"))
|
254 |
```
|
|
|
270 |
|
271 |
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
272 |
|
273 |
+
## Thanks, and how to contribute
|
274 |
|
275 |
Thanks to the [chirper.ai](https://chirper.ai) team!
|
276 |
|
277 |
+
Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
|
278 |
+
|
279 |
I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
|
280 |
|
281 |
If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
|
|
|
287 |
|
288 |
**Special thanks to**: Aemon Algiz.
|
289 |
|
290 |
+
**Patreon special mentions**: Alicia Loh, Stephen Murray, K, Ajan Kanaga, RoA, Magnesian, Deo Leter, Olakabola, Eugene Pentland, zynix, Deep Realms, Raymond Fosdick, Elijah Stavena, Iucharbius, Erik Bjäreholt, Luis Javier Navarrete Lozano, Nicholas, theTransient, John Detwiler, alfie_i, knownsqashed, Mano Prime, Willem Michiel, Enrico Ros, LangChain4j, OG, Michael Dempsey, Pierre Kircher, Pedro Madruga, James Bentley, Thomas Belote, Luke @flexchar, Leonard Tan, Johann-Peter Hartmann, Illia Dulskyi, Fen Risland, Chadd, S_X, Jeff Scroggin, Ken Nordquist, Sean Connelly, Artur Olbinski, Swaroop Kallakuri, Jack West, Ai Maven, David Ziegler, Russ Johnson, transmissions 11, John Villwock, Alps Aficionado, Clay Pascal, Viktor Bowallius, Subspace Studios, Rainer Wilmers, Trenton Dambrowitz, vamX, Michael Levine, 준교 김, Brandon Frisco, Kalila, Trailburnt, Randy H, Talal Aujan, Nathan Dryer, Vadim, 阿明, ReadyPlayerEmma, Tiffany J. Kim, George Stoitzev, Spencer Kim, Jerry Meng, Gabriel Tamborski, Cory Kujawski, Jeffrey Morgan, Spiking Neurons AB, Edmond Seymore, Alexandros Triantafyllidis, Lone Striker, Cap'n Zoog, Nikolai Manek, danny, ya boyyy, Derek Yates, usrbinkat, Mandus, TL, Nathan LeClaire, subjectnull, Imad Khwaja, webtim, Raven Klaugh, Asp the Wyvern, Gabriel Puliatti, Caitlyn Gatomon, Joseph William Delisle, Jonathan Leane, Luke Pendergrass, SuperWojo, Sebastain Graf, Will Dee, Fred von Graf, Andrey, Dan Guido, Daniel P. Andersen, Nitin Borwankar, Elle, Vitor Caleffi, biorpg, jjj, NimbleBox.ai, Pieter, Matthew Berman, terasurfer, Michael Davis, Alex, Stanislav Ovsiannikov
|
291 |
|
292 |
|
293 |
Thank you to all my generous patrons and donaters!
|