TheBloke commited on
Commit
57161e4
1 Parent(s): 7fd2b25

Upload new GPTQs with varied parameters

Browse files
Files changed (1) hide show
  1. README.md +71 -33
README.md CHANGED
@@ -1,8 +1,9 @@
1
  ---
2
- inference: false
3
- license: other
4
  datasets:
5
  - ehartford/WizardLM_evol_instruct_V2_196k_unfiltered_merged_split
 
 
 
6
  ---
7
 
8
  <!-- header start -->
@@ -11,7 +12,7 @@ datasets:
11
  </div>
12
  <div style="display: flex; justify-content: space-between; width: 100%;">
13
  <div style="display: flex; flex-direction: column; align-items: flex-start;">
14
- <p><a href="https://discord.gg/Jq4vkcDakD">Chat & support: my new Discord server</a></p>
15
  </div>
16
  <div style="display: flex; flex-direction: column; align-items: flex-end;">
17
  <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
@@ -21,52 +22,83 @@ datasets:
21
 
22
  # Eric Hartford's WizardLM-7B-V1.0-Uncensored GPTQ
23
 
24
- These files are GPTQ 4bit model files for [Eric Hartford's WizardLM-7B-V1.0-Uncensored](https://huggingface.co/ehartford/WizardLM-7B-V1.0-Uncensored).
25
 
26
- It is the result of quantising to 4bit using [GPTQ-for-LLaMa](https://github.com/qwopqwop200/GPTQ-for-LLaMa).
 
 
27
 
28
  ## Repositories available
29
 
30
- * [4-bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/WizardLM-7B-V1.0-Uncensored-GPTQ)
31
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/WizardLM-7B-V1.0-Uncensored-GGML)
32
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/ehartford/WizardLM-7B-V1.0-Uncensored)
33
 
34
- ## Prompt template
35
 
36
  ```
37
- You are a helpful AI assistant.
38
 
39
- USER: <prompt>
40
  ASSISTANT:
41
  ```
42
 
43
- ## How to easily download and use this model in text-generation-webui
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
- Please make sure you're using the latest version of text-generation-webui
46
 
47
  1. Click the **Model tab**.
48
  2. Under **Download custom model or LoRA**, enter `TheBloke/WizardLM-7B-V1.0-Uncensored-GPTQ`.
 
 
49
  3. Click **Download**.
50
  4. The model will start downloading. Once it's finished it will say "Done"
51
  5. In the top left, click the refresh icon next to **Model**.
52
  6. In the **Model** dropdown, choose the model you just downloaded: `WizardLM-7B-V1.0-Uncensored-GPTQ`
53
  7. The model will automatically load, and is now ready for use!
54
  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.
55
- * 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`.
56
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
57
 
58
  ## How to use this GPTQ model from Python code
59
 
60
  First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
61
 
62
- `pip install auto-gptq`
63
 
64
  Then try the following example code:
65
 
66
  ```python
67
  from transformers import AutoTokenizer, pipeline, logging
68
  from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
69
- import argparse
70
 
71
  model_name_or_path = "TheBloke/WizardLM-7B-V1.0-Uncensored-GPTQ"
72
  model_basename = "wizardlm-7b-v1.0-uncensored-GPTQ-4bit-128g.no-act.order"
@@ -76,17 +108,31 @@ use_triton = False
76
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
77
 
78
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
79
- model_basename=model_basename,
80
  use_safetensors=True,
81
- trust_remote_code=False,
82
  device="cuda:0",
83
  use_triton=use_triton,
84
  quantize_config=None)
85
 
86
- # Note: check the prompt template is correct for this model.
 
 
 
 
 
 
 
 
 
 
 
87
  prompt = "Tell me about AI"
88
- prompt_template=f'''USER: {prompt}
89
- ASSISTANT:'''
 
 
 
90
 
91
  print("\n\n*** Generate:")
92
 
@@ -113,26 +159,18 @@ pipe = pipeline(
113
  print(pipe(prompt_template)[0]['generated_text'])
114
  ```
115
 
116
- ## Provided files
117
-
118
- **wizardlm-7b-v1.0-uncensored-GPTQ-4bit-128g.no-act.order.safetensors**
119
-
120
- 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.
121
 
122
- It was created with group_size 128 to increase inference accuracy, but without --act-order (desc_act) to increase compatibility and improve inference speed.
123
 
124
- * `wizardlm-7b-v1.0-uncensored-GPTQ-4bit-128g.no-act.order.safetensors`
125
- * Works with AutoGPTQ in CUDA or Triton modes.
126
- * Works with GPTQ-for-LLaMa in CUDA mode. May have issues with GPTQ-for-LLaMa Triton mode.
127
- * Works with text-generation-webui, including one-click-installers.
128
- * Parameters: Groupsize = 128. Act Order / desc_act = False.
129
 
130
  <!-- footer start -->
131
  ## Discord
132
 
133
  For further support, and discussions on these models and AI in general, join us at:
134
 
135
- [TheBloke AI's Discord server](https://discord.gg/Jq4vkcDakD)
136
 
137
  ## Thanks, and how to contribute.
138
 
@@ -147,9 +185,9 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
147
  * Patreon: https://patreon.com/TheBlokeAI
148
  * Ko-Fi: https://ko-fi.com/TheBlokeAI
149
 
150
- **Special thanks to**: Luke from CarbonQuill, Aemon Algiz, Dmitriy Samsonov.
151
 
152
- **Patreon special mentions**: vamX, K, Jonathan Leane, Lone Striker, Sean Connelly, Chris McCloskey, WelcomeToTheClub, Nikolai Manek, John Detwiler, Kalila, David Flickinger, Fen Risland, subjectnull, Johann-Peter Hartmann, Talal Aujan, John Villwock, senxiiz, Khalefa Al-Ahmad, Kevin Schuppel, Alps Aficionado, Derek Yates, Mano Prime, Nathan LeClaire, biorpg, trip7s trip, Asp the Wyvern, chris gileta, Iucharbius , Artur Olbinski, Ai Maven, Joseph William Delisle, Luke Pendergrass, Illia Dulskyi, Eugene Pentland, Ajan Kanaga, Willem Michiel, Space Cruiser, Pyrater, Preetika Verma, Junyu Yang, Oscar Rangel, Spiking Neurons AB, Pierre Kircher, webtim, Cory Kujawski, terasurfer , Trenton Dambrowitz, Gabriel Puliatti, Imad Khwaja, Luke.
153
 
154
  Thank you to all my generous patrons and donaters!
155
 
 
1
  ---
 
 
2
  datasets:
3
  - ehartford/WizardLM_evol_instruct_V2_196k_unfiltered_merged_split
4
+ inference: false
5
+ license: other
6
+ model_type: llama
7
  ---
8
 
9
  <!-- header start -->
 
12
  </div>
13
  <div style="display: flex; justify-content: space-between; width: 100%;">
14
  <div style="display: flex; flex-direction: column; align-items: flex-start;">
15
+ <p><a href="https://discord.gg/theblokeai">Chat & support: my new Discord server</a></p>
16
  </div>
17
  <div style="display: flex; flex-direction: column; align-items: flex-end;">
18
  <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
 
22
 
23
  # Eric Hartford's WizardLM-7B-V1.0-Uncensored GPTQ
24
 
25
+ These files are GPTQ model files for [Eric Hartford's WizardLM-7B-V1.0-Uncensored](https://huggingface.co/ehartford/WizardLM-7B-V1.0-Uncensored).
26
 
27
+ 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.
28
+
29
+ These models were quantised using hardware kindly provided by [Latitude.sh](https://www.latitude.sh/accelerate).
30
 
31
  ## Repositories available
32
 
33
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/WizardLM-7B-V1.0-Uncensored-GPTQ)
34
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/WizardLM-7B-V1.0-Uncensored-GGML)
35
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/ehartford/WizardLM-7B-V1.0-Uncensored)
36
 
37
+ ## Prompt template: Vicuna
38
 
39
  ```
40
+ A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
41
 
42
+ USER: {prompt}
43
  ASSISTANT:
44
  ```
45
 
46
+ ## Provided files
47
+
48
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
49
+
50
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
51
+
52
+ | Branch | Bits | Group Size | Act Order (desc_act) | File Size | ExLlama Compatible? | Made With | Description |
53
+ | ------ | ---- | ---------- | -------------------- | --------- | ------------------- | --------- | ----------- |
54
+ | main | 4 | 128 | False | 4.00 GB | True | GPTQ-for-LLaMa | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
55
+ | 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. |
56
+ | 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. |
57
+ | 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. |
58
+ | 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. |
59
+ | 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. |
60
+ | 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. |
61
+ | 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. |
62
+
63
+ ## How to download from branches
64
+
65
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/WizardLM-7B-V1.0-Uncensored-GPTQ:gptq-4bit-32g-actorder_True`
66
+ - With Git, you can clone a branch with:
67
+ ```
68
+ git clone --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/WizardLM-7B-V1.0-Uncensored-GPTQ`
69
+ ```
70
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
71
+
72
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
73
+
74
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
75
 
76
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
77
 
78
  1. Click the **Model tab**.
79
  2. Under **Download custom model or LoRA**, enter `TheBloke/WizardLM-7B-V1.0-Uncensored-GPTQ`.
80
+ - To download from a specific branch, enter for example `TheBloke/WizardLM-7B-V1.0-Uncensored-GPTQ:gptq-4bit-32g-actorder_True`
81
+ - see Provided Files above for the list of branches for each option.
82
  3. Click **Download**.
83
  4. The model will start downloading. Once it's finished it will say "Done"
84
  5. In the top left, click the refresh icon next to **Model**.
85
  6. In the **Model** dropdown, choose the model you just downloaded: `WizardLM-7B-V1.0-Uncensored-GPTQ`
86
  7. The model will automatically load, and is now ready for use!
87
  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.
88
+ * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
89
  9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
90
 
91
  ## How to use this GPTQ model from Python code
92
 
93
  First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
94
 
95
+ `GITHUB_ACTIONS=true pip install auto-gptq`
96
 
97
  Then try the following example code:
98
 
99
  ```python
100
  from transformers import AutoTokenizer, pipeline, logging
101
  from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
 
102
 
103
  model_name_or_path = "TheBloke/WizardLM-7B-V1.0-Uncensored-GPTQ"
104
  model_basename = "wizardlm-7b-v1.0-uncensored-GPTQ-4bit-128g.no-act.order"
 
108
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
109
 
110
  model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
111
+ model_basename=model_basename
112
  use_safetensors=True,
113
+ trust_remote_code=True,
114
  device="cuda:0",
115
  use_triton=use_triton,
116
  quantize_config=None)
117
 
118
+ """
119
+ To download from a specific branch, use the revision parameter, as in this example:
120
+
121
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
122
+ revision="gptq-4bit-32g-actorder_True",
123
+ model_basename=model_basename,
124
+ use_safetensors=True,
125
+ trust_remote_code=True,
126
+ device="cuda:0",
127
+ quantize_config=None)
128
+ """
129
+
130
  prompt = "Tell me about AI"
131
+ prompt_template=f'''A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
132
+
133
+ USER: {prompt}
134
+ ASSISTANT:
135
+ '''
136
 
137
  print("\n\n*** Generate:")
138
 
 
159
  print(pipe(prompt_template)[0]['generated_text'])
160
  ```
161
 
162
+ ## Compatibility
 
 
 
 
163
 
164
+ 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.
165
 
166
+ ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
 
 
 
 
167
 
168
  <!-- footer start -->
169
  ## Discord
170
 
171
  For further support, and discussions on these models and AI in general, join us at:
172
 
173
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
174
 
175
  ## Thanks, and how to contribute.
176
 
 
185
  * Patreon: https://patreon.com/TheBlokeAI
186
  * Ko-Fi: https://ko-fi.com/TheBlokeAI
187
 
188
+ **Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
189
 
190
+ **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.
191
 
192
  Thank you to all my generous patrons and donaters!
193