TheBloke commited on
Commit
6d371d7
1 Parent(s): ae650a1

Upload new GPTQs with varied parameters

Browse files
Files changed (1) hide show
  1. README.md +141 -36
README.md CHANGED
@@ -1,19 +1,22 @@
1
  ---
2
- license: other
3
  datasets:
4
  - ehartford/wizard_vicuna_70k_unfiltered
 
5
  language:
6
  - en
 
 
7
  tags:
8
  - uncensored
9
  ---
 
10
  <!-- header start -->
11
  <div style="width: 100%;">
12
  <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
13
  </div>
14
  <div style="display: flex; justify-content: space-between; width: 100%;">
15
  <div style="display: flex; flex-direction: column; align-items: flex-start;">
16
- <p><a href="https://discord.gg/Jq4vkcDakD">Chat & support: my new Discord server</a></p>
17
  </div>
18
  <div style="display: flex; flex-direction: column; align-items: flex-end;">
19
  <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
@@ -23,58 +26,155 @@ tags:
23
 
24
  # Wizard-Vicuna-7B-Uncensored GPTQ
25
 
26
- This is GPTQ format quantised 4bit models of [Eric Hartford's 'uncensored' training of Wizard-Vicuna 7B](https://huggingface.co/ehartford/Wizard-Vicuna-7B-Uncensored).
27
 
28
- It is the result of quantising to 4bit using [GPTQ-for-LLaMa](https://github.com/qwopqwop200/GPTQ-for-LLaMa).
 
 
29
 
30
  ## Repositories available
31
 
32
- * [4bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/Wizard-Vicuna-7B-Uncensored-GPTQ).
33
- * [4bit and 5bit GGML models for CPU inference](https://huggingface.co/TheBloke/Wizard-Vicuna-7B-Uncensored-GGML).
34
- * [float16 HF format model for GPU inference and further conversions](https://huggingface.co/TheBloke/Wizard-Vicuna-7B-Uncensored-HF).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
- ## How to easily download and use this model in text-generation-webui
37
 
38
- Open the text-generation-webui UI as normal.
 
 
39
 
40
  1. Click the **Model tab**.
41
  2. Under **Download custom model or LoRA**, enter `TheBloke/Wizard-Vicuna-7B-Uncensored-GPTQ`.
 
 
42
  3. Click **Download**.
43
- 4. Wait until it says it's finished downloading.
44
- 5. Click the **Refresh** icon next to **Model** in the top left.
45
- 6. In the **Model drop-down**: choose the model you just downloaded, `Wizard-Vicuna-7B-Uncensored-GPTQ`.
46
- 7. If you see an error in the bottom right, ignore it - it's temporary.
47
- 8. Fill out the `GPTQ parameters` on the right: `Bits = 4`, `Groupsize = 128`, `model_type = Llama`
48
- 9. Click **Save settings for this model** in the top right.
49
- 10. Click **Reload the Model** in the top right.
50
- 11. Once it says it's loaded, click the **Text Generation tab** and enter a prompt!
51
 
52
- ## Provided files
 
 
 
 
53
 
54
- **Compatible file - Wizard-Vicuna-7B-Uncensored-GPTQ-4bit-128g.compat.no-act-order.safetensors**
55
 
56
- In the `main` branch - the default one - you will find `Wizard-Vicuna-7B-Uncensored-GPTQ-4bit-128g.compat.no-act-order.safetensors`
 
 
57
 
58
- This will work with all versions of GPTQ-for-LLaMa. It has maximum compatibility
 
59
 
60
- It was created without the `--act-order` parameter. It may have slightly lower inference quality compared to the other file, but is guaranteed to work on all versions of GPTQ-for-LLaMa and text-generation-webui.
61
 
62
- * `Wizard-Vicuna-7B-Uncensored-GPTQ-4bit-128g.compat.no-act-order.safetensors`
63
- * Works with all versions of GPTQ-for-LLaMa code, both Triton and CUDA branches
64
- * Works with AutoGPTQ.
65
- * Works with text-generation-webui one-click-installers
66
- * Parameters: Groupsize = 128g. No act-order.
67
- * Command used to create the GPTQ:
68
- ```
69
- python llama.py ehartford_Wizard-Vicuna-7B-Uncensored wikitext2 --wbits 4 --groupsize 128 --true-sequential --save_safetensors Wizard-Vicuna-7B-Uncensored-GPTQ-4bit-128g.compat.no-act-order.safetensors
70
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
 
72
  <!-- footer start -->
73
  ## Discord
74
 
75
  For further support, and discussions on these models and AI in general, join us at:
76
 
77
- [TheBloke AI's Discord server](https://discord.gg/Jq4vkcDakD)
78
 
79
  ## Thanks, and how to contribute.
80
 
@@ -89,19 +189,24 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
89
  * Patreon: https://patreon.com/TheBlokeAI
90
  * Ko-Fi: https://ko-fi.com/TheBlokeAI
91
 
92
- **Patreon special mentions**: Aemon Algiz, Dmitriy Samsonov, Nathan LeClaire, Trenton Dambrowitz, Mano Prime, David Flickinger, vamX, Nikolai Manek, senxiiz, Khalefa Al-Ahmad, Illia Dulskyi, Jonathan Leane, Talal Aujan, V. Lukas, Joseph William Delisle, Pyrater, Oscar Rangel, Lone Striker, Luke Pendergrass, Eugene Pentland, Sebastain Graf, Johann-Peter Hartman.
 
 
93
 
94
  Thank you to all my generous patrons and donaters!
 
95
  <!-- footer end -->
96
- # Original model card
 
 
97
 
98
  This is [wizard-vicuna-13b](https://huggingface.co/junelee/wizard-vicuna-13b) trained against LLaMA-7B with a subset of the dataset - responses that contained alignment / moralizing were removed. The intent is to train a WizardLM that doesn't have alignment built-in, so that alignment (of any sort) can be added separately with for example with a RLHF LoRA.
99
 
100
  Shout out to the open source AI/ML community, and everyone who helped me out.
101
 
102
- Note:
103
 
104
- An uncensored model has no guardrails.
105
 
106
  You are responsible for anything you do with the model, just as you are responsible for anything you do with any dangerous object such as a knife, gun, lighter, or car.
107
 
 
1
  ---
 
2
  datasets:
3
  - ehartford/wizard_vicuna_70k_unfiltered
4
+ inference: false
5
  language:
6
  - en
7
+ license: other
8
+ model_type: llama
9
  tags:
10
  - uncensored
11
  ---
12
+
13
  <!-- header start -->
14
  <div style="width: 100%;">
15
  <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
16
  </div>
17
  <div style="display: flex; justify-content: space-between; width: 100%;">
18
  <div style="display: flex; flex-direction: column; align-items: flex-start;">
19
+ <p><a href="https://discord.gg/theblokeai">Chat & support: my new Discord server</a></p>
20
  </div>
21
  <div style="display: flex; flex-direction: column; align-items: flex-end;">
22
  <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
 
26
 
27
  # Wizard-Vicuna-7B-Uncensored GPTQ
28
 
29
+ These files are GPTQ model files for [Wizard-Vicuna-7B-Uncensored](https://huggingface.co/ehartford/Wizard-Vicuna-7B-Uncensored).
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/Wizard-Vicuna-7B-Uncensored-GPTQ)
38
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/Wizard-Vicuna-7B-Uncensored-GGML)
39
+ * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/ehartford/Wizard-Vicuna-7B-Uncensored)
40
+
41
+ ## Prompt template: Vicuna
42
+
43
+ ```
44
+ A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
45
+
46
+ USER: {prompt}
47
+ ASSISTANT:
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 | 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. |
59
+ | 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. |
60
+ | 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. |
61
+ | 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. |
62
+ | 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. |
63
+ | 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. |
64
+ | 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. |
65
+ | 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. |
66
+
67
+ ## How to download from branches
68
+
69
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Wizard-Vicuna-7B-Uncensored-GPTQ:gptq-4bit-32g-actorder_True`
70
+ - With Git, you can clone a branch with:
71
+ ```
72
+ git clone --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/Wizard-Vicuna-7B-Uncensored-GPTQ`
73
+ ```
74
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
75
 
76
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
77
 
78
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
79
+
80
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
81
 
82
  1. Click the **Model tab**.
83
  2. Under **Download custom model or LoRA**, enter `TheBloke/Wizard-Vicuna-7B-Uncensored-GPTQ`.
84
+ - To download from a specific branch, enter for example `TheBloke/Wizard-Vicuna-7B-Uncensored-GPTQ:gptq-4bit-32g-actorder_True`
85
+ - see Provided Files above for the list of branches for each option.
86
  3. Click **Download**.
87
+ 4. The model will start downloading. Once it's finished it will say "Done"
88
+ 5. In the top left, click the refresh icon next to **Model**.
89
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Wizard-Vicuna-7B-Uncensored-GPTQ`
90
+ 7. The model will automatically load, and is now ready for use!
91
+ 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.
92
+ * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
93
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
 
94
 
95
+ ## How to use this GPTQ model from Python code
96
+
97
+ First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
98
+
99
+ `GITHUB_ACTIONS=true pip install auto-gptq`
100
 
101
+ Then try the following example code:
102
 
103
+ ```python
104
+ from transformers import AutoTokenizer, pipeline, logging
105
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
106
 
107
+ model_name_or_path = "TheBloke/Wizard-Vicuna-7B-Uncensored-GPTQ"
108
+ model_basename = "Wizard-Vicuna-7B-Uncensored-GPTQ-4bit-128g.no-act.order"
109
 
110
+ use_triton = False
111
 
112
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
113
+
114
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
115
+ model_basename=model_basename
116
+ use_safetensors=True,
117
+ trust_remote_code=True,
118
+ device="cuda:0",
119
+ use_triton=use_triton,
120
+ quantize_config=None)
121
+
122
+ """
123
+ To download from a specific branch, use the revision parameter, as in this example:
124
+
125
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
126
+ revision="gptq-4bit-32g-actorder_True",
127
+ model_basename=model_basename,
128
+ use_safetensors=True,
129
+ trust_remote_code=True,
130
+ device="cuda:0",
131
+ quantize_config=None)
132
+ """
133
+
134
+ prompt = "Tell me about AI"
135
+ 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.
136
+
137
+ USER: {prompt}
138
+ ASSISTANT:
139
+ '''
140
+
141
+ print("\n\n*** Generate:")
142
+
143
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
144
+ output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
145
+ print(tokenizer.decode(output[0]))
146
+
147
+ # Inference can also be done using transformers' pipeline
148
+
149
+ # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
150
+ logging.set_verbosity(logging.CRITICAL)
151
+
152
+ print("*** Pipeline:")
153
+ pipe = pipeline(
154
+ "text-generation",
155
+ model=model,
156
+ tokenizer=tokenizer,
157
+ max_new_tokens=512,
158
+ temperature=0.7,
159
+ top_p=0.95,
160
+ repetition_penalty=1.15
161
+ )
162
+
163
+ print(pipe(prompt_template)[0]['generated_text'])
164
+ ```
165
+
166
+ ## Compatibility
167
+
168
+ 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.
169
+
170
+ ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
171
 
172
  <!-- footer start -->
173
  ## Discord
174
 
175
  For further support, and discussions on these models and AI in general, join us at:
176
 
177
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
178
 
179
  ## Thanks, and how to contribute.
180
 
 
189
  * Patreon: https://patreon.com/TheBlokeAI
190
  * Ko-Fi: https://ko-fi.com/TheBlokeAI
191
 
192
+ **Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
193
+
194
+ **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.
195
 
196
  Thank you to all my generous patrons and donaters!
197
+
198
  <!-- footer end -->
199
+
200
+ # Original model card: Wizard-Vicuna-7B-Uncensored
201
+
202
 
203
  This is [wizard-vicuna-13b](https://huggingface.co/junelee/wizard-vicuna-13b) trained against LLaMA-7B with a subset of the dataset - responses that contained alignment / moralizing were removed. The intent is to train a WizardLM that doesn't have alignment built-in, so that alignment (of any sort) can be added separately with for example with a RLHF LoRA.
204
 
205
  Shout out to the open source AI/ML community, and everyone who helped me out.
206
 
207
+ Note:
208
 
209
+ An uncensored model has no guardrails.
210
 
211
  You are responsible for anything you do with the model, just as you are responsible for anything you do with any dangerous object such as a knife, gun, lighter, or car.
212