Text Generation
Transformers
Safetensors
English
llama
text-generation-inference
4-bit precision
gptq
TheBloke commited on
Commit
fe18b4c
1 Parent(s): 45d0d72

Upload new GPTQs with varied parameters

Browse files
Files changed (1) hide show
  1. README.md +61 -37
README.md CHANGED
@@ -1,12 +1,6 @@
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,13 +19,15 @@ datasets:
25
 
26
  # Pankaj Mathur's Orca Mini v2 13B GPTQ
27
 
28
- These files are GPTQ 4bit model files for [Pankaj Mathur's Orca Mini v2 13B](https://huggingface.co/psmathur/orca_mini_v2_13b).
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_13b-GPTQ)
35
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/orca_mini_v2_13b-GGML)
36
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/psmathur/orca_mini_v2_13b)
37
 
@@ -42,21 +38,49 @@ It is the result of quantising to 4bit using [GPTQ-for-LLaMa](https://github.com
42
  You are an AI assistant that follows instruction extremely well. Help as much as you can.
43
 
44
  ### User:
45
- prompt
46
 
47
  ### Input:
48
- input, if required
49
 
50
  ### Response:
51
 
52
  ```
53
 
54
- ## How to easily download and use this model in text-generation-webui
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
- Please make sure you're using the latest version of text-generation-webui
57
 
58
  1. Click the **Model tab**.
59
  2. Under **Download custom model or LoRA**, enter `TheBloke/orca_mini_v2_13b-GPTQ`.
 
 
60
  3. Click **Download**.
61
  4. The model will start downloading. Once it's finished it will say "Done"
62
  5. In the top left, click the refresh icon next to **Model**.
@@ -77,7 +101,6 @@ Then try the following example code:
77
  ```python
78
  from transformers import AutoTokenizer, pipeline, logging
79
  from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
80
- import argparse
81
 
82
  model_name_or_path = "TheBloke/orca_mini_v2_13b-GPTQ"
83
  model_basename = "orca_mini_v2_13b-GPTQ-4bit-128g.no-act.order"
@@ -87,15 +110,26 @@ use_triton = False
87
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
88
 
89
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
90
- model_basename=model_basename,
91
  use_safetensors=True,
92
- trust_remote_code=False,
93
  device="cuda:0",
94
  use_triton=use_triton,
95
  quantize_config=None)
96
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  prompt = "Tell me about AI"
98
- input = ""
99
  prompt_template=f'''### System:
100
  You are an AI assistant that follows instruction extremely well. Help as much as you can.
101
 
@@ -106,6 +140,7 @@ You are an AI assistant that follows instruction extremely well. Help as much as
106
  {input}
107
 
108
  ### Response:
 
109
  '''
110
 
111
  print("\n\n*** Generate:")
@@ -133,22 +168,11 @@ pipe = pipeline(
133
  print(pipe(prompt_template)[0]['generated_text'])
134
  ```
135
 
136
- ## Provided files
137
-
138
- **orca_mini_v2_13b-GPTQ-4bit-128g.no-act.order.safetensors**
139
-
140
- This will work with AutoGPTQ 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.
141
-
142
- If a Llama model, it will also be supported by ExLlama, which will provide 2x speedup over AutoGPTQ and GPTQ-for-LLaMa.
143
 
144
- It was created with group_size 128 to increase inference accuracy, but without --act-order (desc_act) to increase compatibility and improve inference speed.
145
 
146
- * `orca_mini_v2_13b-GPTQ-4bit-128g.no-act.order.safetensors`
147
- * Works with AutoGPTQ in CUDA or Triton modes.
148
- * [ExLlama](https://github.com/turboderp/exllama) supports Llama 4-bit GPTQs, and will provide 2x speedup over AutoGPTQ and GPTQ-for-LLaMa.
149
- * Works with GPTQ-for-LLaMa in CUDA mode. May have issues with GPTQ-for-LLaMa Triton mode.
150
- * Works with text-generation-webui, including one-click-installers.
151
- * Parameters: Groupsize = 128. Act Order / desc_act = False.
152
 
153
  <!-- footer start -->
154
  ## Discord
@@ -172,7 +196,7 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
172
 
173
  **Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
174
 
175
- **Patreon special mentions**: RoA, Lone Striker, Gabriel Puliatti, Derek Yates, Randy H, Jonathan Leane, Eugene Pentland, Karl Bernard, Viktor Bowallius, senxiiz, Daniel P. Andersen, Pierre Kircher, Deep Realms, Cory Kujawski, Oscar Rangel, Fen Risland, Ajan Kanaga, LangChain4j, webtim, Nikolai Manek, Trenton Dambrowitz, Raven Klaugh, Kalila, Khalefa Al-Ahmad, Chris McCloskey, Luke @flexchar, Ai Maven, Dave, Asp the Wyvern, Sean Connelly, Imad Khwaja, Space Cruiser, Rainer Wilmers, subjectnull, Alps Aficionado, Willian Hasse, Fred von Graf, Artur Olbinski, Johann-Peter Hartmann, WelcomeToTheClub, Willem Michiel, Michael Levine, Iucharbius , Spiking Neurons AB, K, biorpg, John Villwock, Pyrater, Greatston Gnanesh, Mano Prime, Junyu Yang, Stephen Murray, John Detwiler, Luke Pendergrass, terasurfer , Pieter, zynix , Edmond Seymore, theTransient, Nathan LeClaire, vamX, Kevin Schuppel, Preetika Verma, ya boyyy, Alex , SuperWojo, Ghost , Joseph William Delisle, Matthew Berman, Talal Aujan, chris gileta, Illia Dulskyi.
176
 
177
  Thank you to all my generous patrons and donaters!
178
 
@@ -199,11 +223,11 @@ Here are the results on metrics used by [HuggingFaceH4 Open LLM Leaderboard](htt
199
  ||||
200
  |:------:|:-------------:|:---------:|
201
  |**Task**|**Value**|**Stderr**|
202
- |*arc_challenge*|0.5572|0.0145|
203
- |*hellaswag*|0.7964|0.0040|
204
  |*mmlu*|0.4969|0.035|
205
- |*truthfulqa_mc*|0.5231|0.0158|
206
- |*Total Average*|0.5933|0.0114|
207
 
208
 
209
 
 
1
  ---
2
  inference: false
3
+ license: other
 
 
 
 
 
 
4
  ---
5
 
6
  <!-- header start -->
 
19
 
20
  # Pankaj Mathur's Orca Mini v2 13B GPTQ
21
 
22
+ These files are GPTQ model files for [Pankaj Mathur's Orca Mini v2 13B](https://huggingface.co/psmathur/orca_mini_v2_13b).
23
 
24
+ 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.
25
+
26
+ These models were quantised using hardware kindly provided by [Latitude.sh](https://www.latitude.sh/accelerate).
27
 
28
  ## Repositories available
29
 
30
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/orca_mini_v2_13b-GPTQ)
31
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/orca_mini_v2_13b-GGML)
32
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/psmathur/orca_mini_v2_13b)
33
 
 
38
  You are an AI assistant that follows instruction extremely well. Help as much as you can.
39
 
40
  ### User:
41
+ {prompt}
42
 
43
  ### Input:
44
+ {input}
45
 
46
  ### Response:
47
 
48
  ```
49
 
50
+ ## Provided files
51
+
52
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
53
+
54
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
55
+
56
+ | Branch | Bits | Group Size | Act Order (desc_act) | File Size | ExLlama Compatible? | Made With | Description |
57
+ | ------ | ---- | ---------- | -------------------- | --------- | ------------------- | --------- | ----------- |
58
+ | main | 4 | 128 | False | 7.45 GB | True | GPTQ-for-LLaMa | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
59
+ | gptq-4bit-32g-actorder_True | 4 | 32 | 1 | 8.00 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. |
60
+ | gptq-4bit-64g-actorder_True | 4 | 64 | 1 | 7.51 GB | True | AutoGPTQ | 4-bit, with Act Order and group size. 64g uses less VRAM, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
61
+ | gptq-4bit-128g-actorder_True | 4 | 128 | 1 | 7.26 GB | True | AutoGPTQ | 4-bit, with Act Order androup size. 128g uses even less VRAM, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
62
+ | gptq-8bit--1g-actorder_True | 8 | None | 1 | 13.36 GB | False | AutoGPTQ | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
63
+ | gptq-8bit-128g-actorder_False | 8 | 128 | 0 | 13.65 GB | False | AutoGPTQ | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
64
+
65
+ ## How to download from branches
66
+
67
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/orca_mini_v2_13b-GPTQ:gptq-4bit-32g-actorder_True`
68
+ - With Git, you can clone a branch with:
69
+ ```
70
+ git clone --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/orca_mini_v2_13b-GPTQ`
71
+ ```
72
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
73
+
74
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
75
+
76
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
77
 
78
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
79
 
80
  1. Click the **Model tab**.
81
  2. Under **Download custom model or LoRA**, enter `TheBloke/orca_mini_v2_13b-GPTQ`.
82
+ - To download from a specific branch, enter for example `TheBloke/orca_mini_v2_13b-GPTQ:gptq-4bit-32g-actorder_True`
83
+ - see Provided Files above for the list of branches for each option.
84
  3. Click **Download**.
85
  4. The model will start downloading. Once it's finished it will say "Done"
86
  5. In the top left, click the refresh icon next to **Model**.
 
101
  ```python
102
  from transformers import AutoTokenizer, pipeline, logging
103
  from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
 
104
 
105
  model_name_or_path = "TheBloke/orca_mini_v2_13b-GPTQ"
106
  model_basename = "orca_mini_v2_13b-GPTQ-4bit-128g.no-act.order"
 
110
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
111
 
112
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
113
+ model_basename=model_basename
114
  use_safetensors=True,
115
+ trust_remote_code=True,
116
  device="cuda:0",
117
  use_triton=use_triton,
118
  quantize_config=None)
119
 
120
+ """
121
+ To download from a specific branch, use the revision parameter, as in this example:
122
+
123
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
124
+ revision="gptq-4bit-32g-actorder_True",
125
+ model_basename=model_basename,
126
+ use_safetensors=True,
127
+ trust_remote_code=True,
128
+ device="cuda:0",
129
+ quantize_config=None)
130
+ """
131
+
132
  prompt = "Tell me about AI"
 
133
  prompt_template=f'''### System:
134
  You are an AI assistant that follows instruction extremely well. Help as much as you can.
135
 
 
140
  {input}
141
 
142
  ### Response:
143
+
144
  '''
145
 
146
  print("\n\n*** Generate:")
 
168
  print(pipe(prompt_template)[0]['generated_text'])
169
  ```
170
 
171
+ ## Compatibility
 
 
 
 
 
 
172
 
173
+ 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.
174
 
175
+ ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
 
 
 
 
 
176
 
177
  <!-- footer start -->
178
  ## Discord
 
196
 
197
  **Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
198
 
199
+ **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.
200
 
201
  Thank you to all my generous patrons and donaters!
202
 
 
223
  ||||
224
  |:------:|:-------------:|:---------:|
225
  |**Task**|**Value**|**Stderr**|
226
+ |*arc_challenge*|0.5478|0.0145|
227
+ |*hellaswag*|0.7023|0.0040|
228
  |*mmlu*|0.4969|0.035|
229
+ |*truthfulqa_mc*|0.44|0.0158|
230
+ |*Total Average*|0.54675|0.0114|
231
 
232
 
233