Upload new GPTQs with varied parameters
Browse files
README.md
ADDED
@@ -0,0 +1,215 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
<!-- header end -->
|
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 |
+
|
181 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
182 |
+
|
183 |
+
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.
|
184 |
+
|
185 |
+
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.
|
186 |
+
|
187 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
188 |
+
|
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 |
+
|
213 |
+
Publishing anything this model generates is the same as publishing it yourself.
|
214 |
+
|
215 |
+
You are responsible for the content you publish, and you cannot blame the model any more than you can blame the knife, gun, lighter, or car for what you do with it.
|