TheBloke commited on
Commit
8160f0b
1 Parent(s): 900e26c

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +37 -18
README.md CHANGED
@@ -1,13 +1,27 @@
1
  ---
 
2
  inference: false
3
  language:
4
  - en
5
- license: other
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
@@ -49,9 +63,9 @@ Multiple GPTQ parameter permutations are provided; see Provided Files below for
49
  <!-- repositories-available start -->
50
  ## Repositories available
51
 
 
52
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ)
53
  * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Llama-2-13B-chat-GGUF)
54
- * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/Llama-2-13B-chat-GGML)
55
  * [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)
56
  <!-- repositories-available end -->
57
 
@@ -68,6 +82,7 @@ You are a helpful, respectful and honest assistant. Always answer as helpfully a
68
 
69
  <!-- prompt-template end -->
70
 
 
71
  <!-- README_GPTQ.md-provided-files start -->
72
  ## Provided files and GPTQ parameters
73
 
@@ -92,24 +107,24 @@ All recent GPTQ files are made with AutoGPTQ, and all files in non-main branches
92
 
93
  | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
94
  | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
95
- | [main](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/main) | 4 | 128 | No | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.26 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
96
- | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
97
- | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
98
- | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
99
- | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |
100
  | [gptq-8bit-64g-actorder_True](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-8bit-64g-actorder_True) | 8 | 64 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.95 GB | No | 8-bit, with group size 64g and Act Order for even higher inference quality. Poor AutoGPTQ CUDA speed. |
101
  | [gptq-8bit-128g-actorder_False](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-8bit-128g-actorder_False) | 8 | 128 | No | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
102
- | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
103
 
104
  <!-- README_GPTQ.md-provided-files end -->
105
 
106
  <!-- README_GPTQ.md-download-from-branches start -->
107
  ## How to download from branches
108
 
109
- - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Llama-2-13B-chat-GPTQ:gptq-4bit-32g-actorder_True`
110
  - With Git, you can clone a branch with:
111
  ```
112
- git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ
113
  ```
114
  - In Python Transformers code, the branch is the `revision` parameter; see below.
115
  <!-- README_GPTQ.md-download-from-branches end -->
@@ -122,7 +137,7 @@ It is strongly recommended to use the text-generation-webui one-click-installers
122
 
123
  1. Click the **Model tab**.
124
  2. Under **Download custom model or LoRA**, enter `TheBloke/Llama-2-13B-chat-GPTQ`.
125
- - To download from a specific branch, enter for example `TheBloke/Llama-2-13B-chat-GPTQ:gptq-4bit-32g-actorder_True`
126
  - see Provided Files above for the list of branches for each option.
127
  3. Click **Download**.
128
  4. The model will start downloading. Once it's finished it will say "Done".
@@ -170,10 +185,10 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
170
 
171
  model_name_or_path = "TheBloke/Llama-2-13B-chat-GPTQ"
172
  # To use a different branch, change revision
173
- # For example: revision="gptq-4bit-32g-actorder_True"
174
  model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
175
- torch_dtype=torch.float16,
176
  device_map="auto",
 
177
  revision="main")
178
 
179
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
@@ -189,7 +204,7 @@ You are a helpful, respectful and honest assistant. Always answer as helpfully a
189
  print("\n\n*** Generate:")
190
 
191
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
192
- output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
193
  print(tokenizer.decode(output[0]))
194
 
195
  # Inference can also be done using transformers' pipeline
@@ -200,9 +215,11 @@ pipe = pipeline(
200
  model=model,
201
  tokenizer=tokenizer,
202
  max_new_tokens=512,
 
203
  temperature=0.7,
204
  top_p=0.95,
205
- repetition_penalty=1.15
 
206
  )
207
 
208
  print(pipe(prompt_template)[0]['generated_text'])
@@ -227,10 +244,12 @@ For further support, and discussions on these models and AI in general, join us
227
 
228
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
229
 
230
- ## Thanks, and how to contribute.
231
 
232
  Thanks to the [chirper.ai](https://chirper.ai) team!
233
 
 
 
234
  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.
235
 
236
  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.
@@ -242,7 +261,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
242
 
243
  **Special thanks to**: Aemon Algiz.
244
 
245
- **Patreon special mentions**: Russ Johnson, J, alfie_i, Alex, NimbleBox.ai, Chadd, Mandus, Nikolai Manek, Ken Nordquist, ya boyyy, Illia Dulskyi, Viktor Bowallius, vamX, Iucharbius, zynix, Magnesian, Clay Pascal, Pierre Kircher, Enrico Ros, Tony Hughes, Elle, Andrey, knownsqashed, Deep Realms, Jerry Meng, Lone Striker, Derek Yates, Pyrater, Mesiah Bishop, James Bentley, Femi Adebogun, Brandon Frisco, SuperWojo, Alps Aficionado, Michael Dempsey, Vitor Caleffi, Will Dee, Edmond Seymore, usrbinkat, LangChain4j, Kacper Wikieł, Luke Pendergrass, John Detwiler, theTransient, Nathan LeClaire, Tiffany J. Kim, biorpg, Eugene Pentland, Stanislav Ovsiannikov, Fred von Graf, terasurfer, Kalila, Dan Guido, Nitin Borwankar, 阿明, Ai Maven, John Villwock, Gabriel Puliatti, Stephen Murray, Asp the Wyvern, danny, Chris Smitley, ReadyPlayerEmma, S_X, Daniel P. Andersen, Olakabola, Jeffrey Morgan, Imad Khwaja, Caitlyn Gatomon, webtim, Alicia Loh, Trenton Dambrowitz, Swaroop Kallakuri, Erik Bjäreholt, Leonard Tan, Spiking Neurons AB, Luke @flexchar, Ajan Kanaga, Thomas Belote, Deo Leter, RoA, Willem Michiel, transmissions 11, subjectnull, Matthew Berman, Joseph William Delisle, David Ziegler, Michael Davis, Johann-Peter Hartmann, Talal Aujan, senxiiz, Artur Olbinski, Rainer Wilmers, Spencer Kim, Fen Risland, Cap'n Zoog, Rishabh Srivastava, Michael Levine, Geoffrey Montalvo, Sean Connelly, Alexandros Triantafyllidis, Pieter, Gabriel Tamborski, Sam, Subspace Studios, Junyu Yang, Pedro Madruga, Vadim, Cory Kujawski, K, Raven Klaugh, Randy H, Mano Prime, Sebastain Graf, Space Cruiser
246
 
247
 
248
  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
 
63
  <!-- repositories-available start -->
64
  ## Repositories available
65
 
66
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Llama-2-13B-chat-AWQ)
67
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ)
68
  * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Llama-2-13B-chat-GGUF)
 
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
 
 
82
 
83
  <!-- prompt-template end -->
84
 
85
+
86
  <!-- README_GPTQ.md-provided-files start -->
87
  ## Provided files and GPTQ parameters
88
 
 
107
 
108
  | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
109
  | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
110
+ | [main](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/main) | 4 | 128 | No | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.26 GB | Yes | 4-bit, without Act Order and group size 128g. |
111
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
112
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
113
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
114
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
115
  | [gptq-8bit-64g-actorder_True](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-8bit-64g-actorder_True) | 8 | 64 | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.95 GB | No | 8-bit, with group size 64g and Act Order for even higher inference quality. Poor AutoGPTQ CUDA speed. |
116
  | [gptq-8bit-128g-actorder_False](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-8bit-128g-actorder_False) | 8 | 128 | No | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
117
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.01 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
118
 
119
  <!-- README_GPTQ.md-provided-files end -->
120
 
121
  <!-- README_GPTQ.md-download-from-branches start -->
122
  ## How to download from branches
123
 
124
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Llama-2-13B-chat-GPTQ:main`
125
  - With Git, you can clone a branch with:
126
  ```
127
+ git clone --single-branch --branch main https://huggingface.co/TheBloke/Llama-2-13B-chat-GPTQ
128
  ```
129
  - In Python Transformers code, the branch is the `revision` parameter; see below.
130
  <!-- README_GPTQ.md-download-from-branches end -->
 
137
 
138
  1. Click the **Model tab**.
139
  2. Under **Download custom model or LoRA**, enter `TheBloke/Llama-2-13B-chat-GPTQ`.
140
+ - To download from a specific branch, enter for example `TheBloke/Llama-2-13B-chat-GPTQ:main`
141
  - see Provided Files above for the list of branches for each option.
142
  3. Click **Download**.
143
  4. The model will start downloading. Once it's finished it will say "Done".
 
185
 
186
  model_name_or_path = "TheBloke/Llama-2-13B-chat-GPTQ"
187
  # To use a different branch, change revision
188
+ # For example: revision="main"
189
  model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
 
190
  device_map="auto",
191
+ trust_remote_code=False,
192
  revision="main")
193
 
194
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
 
204
  print("\n\n*** Generate:")
205
 
206
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
207
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
208
  print(tokenizer.decode(output[0]))
209
 
210
  # Inference can also be done using transformers' pipeline
 
215
  model=model,
216
  tokenizer=tokenizer,
217
  max_new_tokens=512,
218
+ do_sample=True,
219
  temperature=0.7,
220
  top_p=0.95,
221
+ top_k=40,
222
+ repetition_penalty=1.1
223
  )
224
 
225
  print(pipe(prompt_template)[0]['generated_text'])
 
244
 
245
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
246
 
247
+ ## Thanks, and how to contribute
248
 
249
  Thanks to the [chirper.ai](https://chirper.ai) team!
250
 
251
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
252
+
253
  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.
254
 
255
  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.
 
261
 
262
  **Special thanks to**: Aemon Algiz.
263
 
264
+ **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
265
 
266
 
267
  Thank you to all my generous patrons and donaters!