TheBloke commited on
Commit
7f05b14
1 Parent(s): 68ad586

Upload new GPTQs with varied parameters

Browse files
Files changed (1) hide show
  1. README.md +96 -53
README.md CHANGED
@@ -1,12 +1,13 @@
1
  ---
 
 
2
  inference: false
3
- license: cc-by-nc-sa-4.0
4
  language:
5
  - en
6
  library_name: transformers
 
 
7
  pipeline_tag: text-generation
8
- datasets:
9
- - psmathur/orca_minis_uncensored_dataset
10
  ---
11
 
12
  <!-- header start -->
@@ -25,56 +26,89 @@ datasets:
25
 
26
  # Pankaj Mathur's Orca Mini v2 7B GPTQ
27
 
28
- These files are GPTQ 4bit model files for [Pankaj Mathur's Orca Mini v2 7B](https://huggingface.co/psmathur/orca_mini_v2_7b).
 
 
29
 
30
- It is the result of quantising to 4bit using [GPTQ-for-LLaMa](https://github.com/qwopqwop200/GPTQ-for-LLaMa).
31
 
32
  ## Repositories available
33
 
34
- * [4-bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/orca_mini_v2_7B-GPTQ)
35
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/orca_mini_v2_7B-GGML)
36
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/psmathur/orca_mini_v2_7b)
37
 
38
- ## Prompt template
 
39
  ```
40
  ### System:
41
  You are an AI assistant that follows instruction extremely well. Help as much as you can.
42
 
43
  ### User:
44
- prompt
45
 
46
  ### Input:
 
47
 
48
  ### Response:
49
  ```
50
 
51
- ## How to easily download and use this model in text-generation-webui
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
- Please make sure you're using the latest version of text-generation-webui
54
 
55
  1. Click the **Model tab**.
56
  2. Under **Download custom model or LoRA**, enter `TheBloke/orca_mini_v2_7B-GPTQ`.
 
 
57
  3. Click **Download**.
58
  4. The model will start downloading. Once it's finished it will say "Done"
59
  5. In the top left, click the refresh icon next to **Model**.
60
  6. In the **Model** dropdown, choose the model you just downloaded: `orca_mini_v2_7B-GPTQ`
61
  7. The model will automatically load, and is now ready for use!
62
  8. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.
63
- * Note that you do not need to and should not set manual GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
64
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
65
 
66
  ## How to use this GPTQ model from Python code
67
 
68
  First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
69
 
70
- `pip install auto-gptq`
71
 
72
  Then try the following example code:
73
 
74
  ```python
75
  from transformers import AutoTokenizer, pipeline, logging
76
  from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
77
- import argparse
78
 
79
  model_name_or_path = "TheBloke/orca_mini_v2_7B-GPTQ"
80
  model_basename = "orca-mini-v2_7b-GPTQ-4bit-128g.no-act.order"
@@ -84,17 +118,37 @@ use_triton = False
84
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
85
 
86
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
87
- model_basename=model_basename,
88
  use_safetensors=True,
89
- trust_remote_code=False,
90
  device="cuda:0",
91
  use_triton=use_triton,
92
  quantize_config=None)
93
 
94
- # Note: check the prompt template is correct for this model.
 
 
 
 
 
 
 
 
 
 
 
95
  prompt = "Tell me about AI"
96
- prompt_template=f'''USER: {prompt}
97
- ASSISTANT:'''
 
 
 
 
 
 
 
 
 
98
 
99
  print("\n\n*** Generate:")
100
 
@@ -121,20 +175,11 @@ pipe = pipeline(
121
  print(pipe(prompt_template)[0]['generated_text'])
122
  ```
123
 
124
- ## Provided files
125
-
126
- **orca-mini-v2_7b-GPTQ-4bit-128g.no-act.order.safetensors**
127
-
128
- This will work with AutoGPTQ, ExLlama, and CUDA versions of GPTQ-for-LLaMa. There are reports of issues with Triton mode of recent GPTQ-for-LLaMa. If you have issues, please use AutoGPTQ instead.
129
 
130
- It was created with group_size 128 to increase inference accuracy, but without --act-order (desc_act) to increase compatibility and improve inference speed.
131
 
132
- * `orca-mini-v2_7b-GPTQ-4bit-128g.no-act.order.safetensors`
133
- * Works with AutoGPTQ in CUDA or Triton modes.
134
- * LLaMa models also work with [ExLlama](https://github.com/turboderp/exllama}, which usually provides much higher performance, and uses less VRAM, than AutoGPTQ.
135
- * Works with GPTQ-for-LLaMa in CUDA mode. May have issues with GPTQ-for-LLaMa Triton mode.
136
- * Works with text-generation-webui, including one-click-installers.
137
- * Parameters: Groupsize = 128. Act Order / desc_act = False.
138
 
139
  <!-- footer start -->
140
  ## Discord
@@ -158,7 +203,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
158
 
159
  **Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
160
 
161
- **Patreon special mentions**: Spiking Neurons AB, Kevin Schuppel, Cory Kujawski, senxiiz, Luke Pendergrass, John Villwock, Ghost , Alex , Sean Connelly, Space Cruiser, Eugene Pentland, Pyrater, Matthew Berman, Dave, Derek Yates, Jonathan Leane, Viktor Bowallius, Michael Levine, Joseph William Delisle, Fred von Graf, Asp the Wyvern, Nikolai Manek, Pierre Kircher, webtim, K, RoA, Karl Bernard, Artur Olbinski, Rainer Wilmers, Ai Maven, Nathan LeClaire, Ajan Kanaga, Stephen Murray, Edmond Seymore, zynix , Imad Khwaja, John Detwiler, Randy H, subjectnull, Alps Aficionado, Greatston Gnanesh, Trenton Dambrowitz, Junyu Yang, Raven Klaugh, biorpg, Deep Realms, vamX, Talal Aujan, Johann-Peter Hartmann, WelcomeToTheClub, Chris McCloskey, Luke, chris gileta, terasurfer , Iucharbius , Preetika Verma, Willem Michiel, Fen Risland, SuperWojo, Khalefa Al-Ahmad, Daniel P. Andersen, Gabriel Puliatti, Illia Dulskyi, Willian Hasse, Oscar Rangel, ya boyyy, Mano Prime, Lone Striker, Kalila.
162
 
163
  Thank you to all my generous patrons and donaters!
164
 
@@ -179,31 +224,17 @@ Please note this model has *better code generation capabilities* compare to our
179
 
180
  I evaluated orca_mini_v2_7b on a wide range of tasks using [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) from EleutherAI.
181
 
182
- Here are the zero shot metrics results.
183
-
184
- |||||||
185
- |:------:|:-------------:|:---------:|:--------:|:-------:|:--------:|
186
- |**Task**|**num_fewshot**|**Version**|**Metric**|**Value**|**Stderr**|
187
- |*arc_easy*|0|0|acc|0.7386|0.0090|
188
- |*arc_easy*|0|0|acc_norm|0.7066|0.0093|
189
- |*hellaswag*|0|0|acc|0.5591|0.0050|
190
- |*hellaswag*|0|0|acc_norm|0.7394|0.0044|
191
- |*truthfulqa_mc*|0|1|mc1|0.2938|0.0159|
192
- |*truthfulqa_mc*|0|1|mc2|0.4399|0.0153|
193
- |*mmlu avg*|0|1|acc|0.4108|0.0153|
194
- |*mmlu avg*|0|1|acc_norm|0.4108|0.0153|
195
- |*Total Zero Shot Average*|0|-|-|0.5373|0.011|
196
-
197
-
198
  Here are the results on metrics used by [HuggingFaceH4 Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
199
 
200
- please note num_fewshots varies for each below task as used by HuggingFaceH4 Open LLM Leaderboard
 
 
 
 
 
 
 
201
 
202
- |||||||
203
- |:------:|:-------------:|:---------:|:--------:|:-------:|:--------:|
204
- |**Task**|**num_fewshot**|**Version**|**Metric**|**Value**|**Stderr**|
205
- |*arc_challenge*|25|0|acc|0.4846|0.0146|
206
- |*arc_challenge*|25|0|acc_norm|0.5077|0.0146|
207
 
208
 
209
 
@@ -374,6 +405,18 @@ If you found wizardlm_alpaca_dolly_orca_open_llama_7b useful in your research or
374
  howpublished = {\url{https://https://huggingface.co/psmathur/orca_mini_v2_7b},
375
  }
376
  ```
 
 
 
 
 
 
 
 
 
 
 
 
377
  ```
378
  @software{touvron2023llama,
379
  title={LLaMA: Open and Efficient Foundation Language Models},
 
1
  ---
2
+ datasets:
3
+ - psmathur/orca_minis_uncensored_dataset
4
  inference: false
 
5
  language:
6
  - en
7
  library_name: transformers
8
+ license: other
9
+ model_type: llama
10
  pipeline_tag: text-generation
 
 
11
  ---
12
 
13
  <!-- header start -->
 
26
 
27
  # Pankaj Mathur's Orca Mini v2 7B GPTQ
28
 
29
+ These files are GPTQ model files for [Pankaj Mathur's Orca Mini v2 7B](https://huggingface.co/psmathur/orca_mini_v2_7b).
30
+
31
+ Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.
32
 
33
+ These models were quantised using hardware kindly provided by [Latitude.sh](https://www.latitude.sh/accelerate).
34
 
35
  ## Repositories available
36
 
37
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/orca_mini_v2_7B-GPTQ)
38
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/orca_mini_v2_7B-GGML)
39
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/psmathur/orca_mini_v2_7b)
40
 
41
+ ## Prompt template: orca_mini
42
+
43
  ```
44
  ### System:
45
  You are an AI assistant that follows instruction extremely well. Help as much as you can.
46
 
47
  ### User:
48
+ {prompt}
49
 
50
  ### Input:
51
+ {input}
52
 
53
  ### Response:
54
  ```
55
 
56
+ ## Provided files
57
+
58
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
59
+
60
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
61
+
62
+ | Branch | Bits | Group Size | Act Order (desc_act) | File Size | ExLlama Compatible? | Made With | Description |
63
+ | ------ | ---- | ---------- | -------------------- | --------- | ------------------- | --------- | ----------- |
64
+ | main | 4 | 128 | False | 4.52 GB | True | GPTQ-for-LLaMa | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
65
+ | gptq-4bit-32g-actorder_True | 4 | 32 | True | 4.28 GB | True | AutoGPTQ | 4-bit, with Act Order and group size. 32g gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
66
+ | gptq-4bit-64g-actorder_True | 4 | 64 | True | 4.02 GB | True | AutoGPTQ | 4-bit, with Act Order and group size. 64g uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
67
+ | gptq-4bit-128g-actorder_True | 4 | 128 | True | 3.90 GB | True | AutoGPTQ | 4-bit, with Act Order and group size. 128g uses even less VRAM, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
68
+ | gptq-8bit--1g-actorder_True | 8 | None | True | 7.01 GB | False | AutoGPTQ | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
69
+ | gptq-8bit-128g-actorder_False | 8 | 128 | False | 7.16 GB | False | AutoGPTQ | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
70
+ | gptq-8bit-128g-actorder_True | 8 | 128 | True | 7.16 GB | False | AutoGPTQ | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |
71
+ | gptq-8bit-64g-actorder_True | 8 | 64 | True | 7.31 GB | False | AutoGPTQ | 8-bit, with group size 64g and Act Order for maximum inference quality. Poor AutoGPTQ CUDA speed. |
72
+
73
+ ## How to download from branches
74
+
75
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/orca_mini_v2_7B-GPTQ:gptq-4bit-32g-actorder_True`
76
+ - With Git, you can clone a branch with:
77
+ ```
78
+ git clone --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/orca_mini_v2_7B-GPTQ`
79
+ ```
80
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
81
+
82
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
83
+
84
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
85
 
86
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
87
 
88
  1. Click the **Model tab**.
89
  2. Under **Download custom model or LoRA**, enter `TheBloke/orca_mini_v2_7B-GPTQ`.
90
+ - To download from a specific branch, enter for example `TheBloke/orca_mini_v2_7B-GPTQ:gptq-4bit-32g-actorder_True`
91
+ - see Provided Files above for the list of branches for each option.
92
  3. Click **Download**.
93
  4. The model will start downloading. Once it's finished it will say "Done"
94
  5. In the top left, click the refresh icon next to **Model**.
95
  6. In the **Model** dropdown, choose the model you just downloaded: `orca_mini_v2_7B-GPTQ`
96
  7. The model will automatically load, and is now ready for use!
97
  8. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.
98
+ * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
99
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
100
 
101
  ## How to use this GPTQ model from Python code
102
 
103
  First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
104
 
105
+ `GITHUB_ACTIONS=true pip install auto-gptq`
106
 
107
  Then try the following example code:
108
 
109
  ```python
110
  from transformers import AutoTokenizer, pipeline, logging
111
  from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
 
112
 
113
  model_name_or_path = "TheBloke/orca_mini_v2_7B-GPTQ"
114
  model_basename = "orca-mini-v2_7b-GPTQ-4bit-128g.no-act.order"
 
118
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
119
 
120
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
121
+ model_basename=model_basename
122
  use_safetensors=True,
123
+ trust_remote_code=True,
124
  device="cuda:0",
125
  use_triton=use_triton,
126
  quantize_config=None)
127
 
128
+ """
129
+ To download from a specific branch, use the revision parameter, as in this example:
130
+
131
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
132
+ revision="gptq-4bit-32g-actorder_True",
133
+ model_basename=model_basename,
134
+ use_safetensors=True,
135
+ trust_remote_code=True,
136
+ device="cuda:0",
137
+ quantize_config=None)
138
+ """
139
+
140
  prompt = "Tell me about AI"
141
+ prompt_template=f'''### System:
142
+ You are an AI assistant that follows instruction extremely well. Help as much as you can.
143
+
144
+ ### User:
145
+ {prompt}
146
+
147
+ ### Input:
148
+ {input}
149
+
150
+ ### Response:
151
+ '''
152
 
153
  print("\n\n*** Generate:")
154
 
 
175
  print(pipe(prompt_template)[0]['generated_text'])
176
  ```
177
 
178
+ ## Compatibility
 
 
 
 
179
 
180
+ The files provided will work with AutoGPTQ (CUDA and Triton modes), GPTQ-for-LLaMa (only CUDA has been tested), and Occ4m's GPTQ-for-LLaMa fork.
181
 
182
+ ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
 
 
 
 
 
183
 
184
  <!-- footer start -->
185
  ## Discord
 
203
 
204
  **Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
205
 
206
+ **Patreon special mentions**: Space Cruiser, Nikolai Manek, Sam, Chris McCloskey, Rishabh Srivastava, Kalila, Spiking Neurons AB, Khalefa Al-Ahmad, WelcomeToTheClub, Chadd, Lone Striker, Viktor Bowallius, Edmond Seymore, Ai Maven, Chris Smitley, Dave, Alexandros Triantafyllidis, Luke @flexchar, Elle, ya boyyy, Talal Aujan, Alex , Jonathan Leane, Deep Realms, Randy H, subjectnull, Preetika Verma, Joseph William Delisle, Michael Levine, chris gileta, K, Oscar Rangel, LangChain4j, Trenton Dambrowitz, Eugene Pentland, Johann-Peter Hartmann, Femi Adebogun, Illia Dulskyi, senxiiz, Daniel P. Andersen, Sean Connelly, Artur Olbinski, RoA, Mano Prime, Derek Yates, Raven Klaugh, David Flickinger, Willem Michiel, Pieter, Willian Hasse, vamX, Luke Pendergrass, webtim, Ghost , Rainer Wilmers, Nathan LeClaire, Will Dee, Cory Kujawski, John Detwiler, Fred von Graf, biorpg, Iucharbius , Imad Khwaja, Pierre Kircher, terasurfer , Asp the Wyvern, John Villwock, theTransient, zynix , Gabriel Tamborski, Fen Risland, Gabriel Puliatti, Matthew Berman, Pyrater, SuperWojo, Stephen Murray, Karl Bernard, Ajan Kanaga, Greatston Gnanesh, Junyu Yang.
207
 
208
  Thank you to all my generous patrons and donaters!
209
 
 
224
 
225
  I evaluated orca_mini_v2_7b on a wide range of tasks using [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) from EleutherAI.
226
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  Here are the results on metrics used by [HuggingFaceH4 Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
228
 
229
+ |||||
230
+ |:------:|:--------:|:-------:|:--------:|
231
+ |**Task**|**Metric**|**Value**|**Stderr**|
232
+ |*arc_challenge*|acc_norm|0.5077|0.0146|
233
+ |*hellaswag*|acc_norm|0.7617|0.0043|
234
+ |*mmlu*|acc_norm|0.3955|0.035|
235
+ |*truthfulqa_mc*|mc2|0.4399|0.0153|
236
+ |*Total Average*|-|0.5262|0.0173|
237
 
 
 
 
 
 
238
 
239
 
240
 
 
405
  howpublished = {\url{https://https://huggingface.co/psmathur/orca_mini_v2_7b},
406
  }
407
  ```
408
+
409
+ ```
410
+ @misc{mukherjee2023orca,
411
+ title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
412
+ author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
413
+ year={2023},
414
+ eprint={2306.02707},
415
+ archivePrefix={arXiv},
416
+ primaryClass={cs.CL}
417
+ }
418
+ ```
419
+
420
  ```
421
  @software{touvron2023llama,
422
  title={LLaMA: Open and Efficient Foundation Language Models},