Text Generation
Transformers
Safetensors
English
llama
sft
text-generation-inference
4-bit precision
TheBloke commited on
Commit
3ba7dab
1 Parent(s): ef6a8d9

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +37 -22
README.md CHANGED
@@ -1,4 +1,5 @@
1
  ---
 
2
  datasets:
3
  - rombodawg/LosslessMegaCodeTrainingV2_1m_Evol_Uncensored
4
  - OpenAssistant/oasst1
@@ -10,10 +11,20 @@ language:
10
  library_name: transformers
11
  license: llama2
12
  model_creator: OpenAssistant
13
- model_link: https://huggingface.co/OpenAssistant/llama2-70b-oasst-sft-v10
14
  model_name: Llama2 70B SFT v10
15
  model_type: llama
16
  pipeline_tag: text-generation
 
 
 
 
 
 
 
 
 
 
 
17
  quantized_by: TheBloke
18
  tags:
19
  - sft
@@ -51,9 +62,9 @@ Multiple GPTQ parameter permutations are provided; see Provided Files below for
51
  <!-- repositories-available start -->
52
  ## Repositories available
53
 
 
54
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ)
55
  * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GGUF)
56
- * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference (deprecated)](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GGML)
57
  * [OpenAssistant's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/OpenAssistant/llama2-70b-oasst-sft-v10)
58
  <!-- repositories-available end -->
59
 
@@ -71,6 +82,7 @@ Multiple GPTQ parameter permutations are provided; see Provided Files below for
71
 
72
  <!-- prompt-template end -->
73
 
 
74
  <!-- README_GPTQ.md-provided-files start -->
75
  ## Provided files and GPTQ parameters
76
 
@@ -95,22 +107,22 @@ All recent GPTQ files are made with AutoGPTQ, and all files in non-main branches
95
 
96
  | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
97
  | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
98
- | [main](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ/tree/main) | 4 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 35.33 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
99
- | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 40.66 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
100
- | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 37.99 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. |
101
- | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 36.65 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. |
102
  | [gptq-3bit--1g-actorder_True](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ/tree/gptq-3bit--1g-actorder_True) | 3 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 26.78 GB | No | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
103
- | [gptq-3bit-128g-actorder_True](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ/tree/gptq-3bit-128g-actorder_True) | 3 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 28.03 GB | No | 3-bit, with group size 128g and act-order. Higher quality than 128g-False but poor AutoGPTQ CUDA speed. |
104
 
105
  <!-- README_GPTQ.md-provided-files end -->
106
 
107
  <!-- README_GPTQ.md-download-from-branches start -->
108
  ## How to download from branches
109
 
110
- - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ:gptq-4bit-32g-actorder_True`
111
  - With Git, you can clone a branch with:
112
  ```
113
- git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ
114
  ```
115
  - In Python Transformers code, the branch is the `revision` parameter; see below.
116
  <!-- README_GPTQ.md-download-from-branches end -->
@@ -123,7 +135,7 @@ It is strongly recommended to use the text-generation-webui one-click-installers
123
 
124
  1. Click the **Model tab**.
125
  2. Under **Download custom model or LoRA**, enter `TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ`.
126
- - To download from a specific branch, enter for example `TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ:gptq-4bit-32g-actorder_True`
127
  - see Provided Files above for the list of branches for each option.
128
  3. Click **Download**.
129
  4. The model will start downloading. Once it's finished it will say "Done".
@@ -171,10 +183,10 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
171
 
172
  model_name_or_path = "TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ"
173
  # To use a different branch, change revision
174
- # For example: revision="gptq-4bit-32g-actorder_True"
175
  model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
176
- torch_dtype=torch.bfloat16,
177
  device_map="auto",
 
178
  revision="main")
179
 
180
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
@@ -191,7 +203,7 @@ prompt_template=f'''<|im_start|>system
191
  print("\n\n*** Generate:")
192
 
193
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
194
- output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
195
  print(tokenizer.decode(output[0]))
196
 
197
  # Inference can also be done using transformers' pipeline
@@ -202,9 +214,11 @@ pipe = pipeline(
202
  model=model,
203
  tokenizer=tokenizer,
204
  max_new_tokens=512,
 
205
  temperature=0.7,
206
  top_p=0.95,
207
- repetition_penalty=1.15
 
208
  )
209
 
210
  print(pipe(prompt_template)[0]['generated_text'])
@@ -229,10 +243,12 @@ For further support, and discussions on these models and AI in general, join us
229
 
230
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
231
 
232
- ## Thanks, and how to contribute.
233
 
234
  Thanks to the [chirper.ai](https://chirper.ai) team!
235
 
 
 
236
  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.
237
 
238
  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.
@@ -244,7 +260,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
244
 
245
  **Special thanks to**: Aemon Algiz.
246
 
247
- **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
248
 
249
 
250
  Thank you to all my generous patrons and donaters!
@@ -335,13 +351,12 @@ perform safety testing and tuning tailored to their specific applications of the
335
 
336
  Please see Meta's [Responsible Use Guide](https://ai.meta.com/llama/responsible-use-guide/).
337
 
 
338
 
339
- ## Inference via TGI
340
-
341
- An early version of this model had an embedding count of 32,007 which was incompatible to sharding with [TGI](https://github.com/huggingface/text-generation-inference).
342
- In the current version the embeddings and the lm_head weights have been padded to a multiple of 128 (by replicating the emembeddings of the unk-token (id: 0)).
343
- Sharded inference with TGI should now work as expected.
344
-
345
 
346
  ## Configuration Details
347
 
 
1
  ---
2
+ base_model: https://huggingface.co/OpenAssistant/llama2-70b-oasst-sft-v10
3
  datasets:
4
  - rombodawg/LosslessMegaCodeTrainingV2_1m_Evol_Uncensored
5
  - OpenAssistant/oasst1
 
11
  library_name: transformers
12
  license: llama2
13
  model_creator: OpenAssistant
 
14
  model_name: Llama2 70B SFT v10
15
  model_type: llama
16
  pipeline_tag: text-generation
17
+ prompt_template: '<|im_start|>system
18
+
19
+ {system_message}<|im_end|>
20
+
21
+ <|im_start|>user
22
+
23
+ {prompt}<|im_end|>
24
+
25
+ <|im_start|>assistant
26
+
27
+ '
28
  quantized_by: TheBloke
29
  tags:
30
  - sft
 
62
  <!-- repositories-available start -->
63
  ## Repositories available
64
 
65
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-AWQ)
66
  * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ)
67
  * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GGUF)
 
68
  * [OpenAssistant's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/OpenAssistant/llama2-70b-oasst-sft-v10)
69
  <!-- repositories-available end -->
70
 
 
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/Llama2-70B-OASST-SFT-v10-GPTQ/tree/main) | 4 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 35.33 GB | Yes | 4-bit, with Act Order. No group size, to lower VRAM requirements. |
111
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 40.66 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/Llama2-70B-OASST-SFT-v10-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 37.99 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/Llama2-70B-OASST-SFT-v10-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 36.65 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
114
  | [gptq-3bit--1g-actorder_True](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ/tree/gptq-3bit--1g-actorder_True) | 3 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 26.78 GB | No | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
115
+ | [gptq-3bit-128g-actorder_True](https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ/tree/gptq-3bit-128g-actorder_True) | 3 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 28.03 GB | No | 3-bit, with group size 128g and act-order. Higher quality than 128g-False. |
116
 
117
  <!-- README_GPTQ.md-provided-files end -->
118
 
119
  <!-- README_GPTQ.md-download-from-branches start -->
120
  ## How to download from branches
121
 
122
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ:main`
123
  - With Git, you can clone a branch with:
124
  ```
125
+ git clone --single-branch --branch main https://huggingface.co/TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ
126
  ```
127
  - In Python Transformers code, the branch is the `revision` parameter; see below.
128
  <!-- README_GPTQ.md-download-from-branches end -->
 
135
 
136
  1. Click the **Model tab**.
137
  2. Under **Download custom model or LoRA**, enter `TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ`.
138
+ - To download from a specific branch, enter for example `TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ:main`
139
  - see Provided Files above for the list of branches for each option.
140
  3. Click **Download**.
141
  4. The model will start downloading. Once it's finished it will say "Done".
 
183
 
184
  model_name_or_path = "TheBloke/Llama2-70B-OASST-SFT-v10-GPTQ"
185
  # To use a different branch, change revision
186
+ # For example: revision="main"
187
  model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
 
188
  device_map="auto",
189
+ trust_remote_code=False,
190
  revision="main")
191
 
192
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
 
203
  print("\n\n*** Generate:")
204
 
205
  input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
206
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
207
  print(tokenizer.decode(output[0]))
208
 
209
  # Inference can also be done using transformers' pipeline
 
214
  model=model,
215
  tokenizer=tokenizer,
216
  max_new_tokens=512,
217
+ do_sample=True,
218
  temperature=0.7,
219
  top_p=0.95,
220
+ top_k=40,
221
+ repetition_penalty=1.1
222
  )
223
 
224
  print(pipe(prompt_template)[0]['generated_text'])
 
243
 
244
  [TheBloke AI's Discord server](https://discord.gg/theblokeai)
245
 
246
+ ## Thanks, and how to contribute
247
 
248
  Thanks to the [chirper.ai](https://chirper.ai) team!
249
 
250
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
251
+
252
  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.
253
 
254
  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.
 
260
 
261
  **Special thanks to**: Aemon Algiz.
262
 
263
+ **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
264
 
265
 
266
  Thank you to all my generous patrons and donaters!
 
351
 
352
  Please see Meta's [Responsible Use Guide](https://ai.meta.com/llama/responsible-use-guide/).
353
 
354
+ ## Note regarding inference with TGI
355
 
356
+ During evaluation we noticed that this 70B model produced extremely poor outputs when loaded it was loaded in 16 bit precision sharded in [TGI](https://github.com/huggingface/text-generation-inference).
357
+ In contrast the model could be evaluated without problem using [vLLM](https://github.com/vllm-project/vllm).
358
+ The model also worked decently well when loaded with TGI on a single GPPU nf4 quantized via [TimDettmers/bitsandbytes](https://github.com/TimDettmers/bitsandbytes).
359
+ Will will get it touch with the TGI authors to find out why sharded 16-bit inference doesn't work as expected.
 
 
360
 
361
  ## Configuration Details
362