TheBloke commited on
Commit
dfc085f
1 Parent(s): 656180f

Initial GPTQ model commit

Browse files
Files changed (1) hide show
  1. README.md +345 -0
README.md ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ inference: false
3
+ license: other
4
+ ---
5
+
6
+ <!-- header start -->
7
+ <div style="width: 100%;">
8
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
9
+ </div>
10
+ <div style="display: flex; justify-content: space-between; width: 100%;">
11
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
12
+ <p><a href="https://discord.gg/Jq4vkcDakD">Chat & support: my new Discord server</a></p>
13
+ </div>
14
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
15
+ <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
16
+ </div>
17
+ </div>
18
+ <!-- header end -->
19
+
20
+ # Kevin Pro's Vicuna 13B CoT GPTQ
21
+
22
+ These files are GPTQ 4bit model files for [Kevin Pro's Vicuna 13B CoT](https://huggingface.co/kevinpro/Vicuna-13B-CoT).
23
+
24
+ It is the result of quantising to 4bit using [GPTQ-for-LLaMa](https://github.com/qwopqwop200/GPTQ-for-LLaMa).
25
+
26
+ ## Repositories available
27
+
28
+ * [4-bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/Vicuna-13B-CoT-GPTQ)
29
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/Vicuna-13B-CoT-GGML)
30
+ * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/TheBloke/Vicuna-13B-CoT-fp16)
31
+
32
+ ## How to easily download and use this model in text-generation-webui
33
+
34
+ Please make sure you're using the latest version of text-generation-webui
35
+
36
+ 1. Click the **Model tab**.
37
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Vicuna-13B-CoT-GPTQ`.
38
+ 3. Click **Download**.
39
+ 4. The model will start downloading. Once it's finished it will say "Done"
40
+ 5. In the top left, click the refresh icon next to **Model**.
41
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Vicuna-13B-CoT-GPTQ`
42
+ 7. The model will automatically load, and is now ready for use!
43
+ 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.
44
+ * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
45
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
46
+
47
+ ## How to use this GPTQ model from Python code
48
+
49
+ First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
50
+
51
+ `pip install auto-gptq`
52
+
53
+ Then try the following example code:
54
+
55
+ ```python
56
+ from transformers import AutoTokenizer, pipeline, logging
57
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
58
+ import argparse
59
+
60
+ model_name_or_path = "TheBloke/Vicuna-13B-CoT-GPTQ"
61
+ model_basename = "vicuna-13b-cot-GPTQ-4bit-128g.no-act.order"
62
+
63
+ use_triton = False
64
+
65
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
66
+
67
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
68
+ model_basename=model_basename,
69
+ use_safetensors=True,
70
+ trust_remote_code=True,
71
+ device="cuda:0",
72
+ use_triton=use_triton,
73
+ quantize_config=None)
74
+
75
+ print("\n\n*** Generate:")
76
+
77
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
78
+ output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
79
+ print(tokenizer.decode(output[0]))
80
+
81
+ # Inference can also be done using transformers' pipeline
82
+
83
+ # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
84
+ logging.set_verbosity(logging.CRITICAL)
85
+
86
+ prompt = "Tell me about AI"
87
+ prompt_template=f'''### Human: {prompt}
88
+ ### Assistant:'''
89
+
90
+ print("*** Pipeline:")
91
+ pipe = pipeline(
92
+ "text-generation",
93
+ model=model,
94
+ tokenizer=tokenizer,
95
+ max_new_tokens=512,
96
+ temperature=0.7,
97
+ top_p=0.95,
98
+ repetition_penalty=1.15
99
+ )
100
+
101
+ print(pipe(prompt_template)[0]['generated_text'])
102
+ ```
103
+
104
+ ## Provided files
105
+
106
+ **vicuna-13b-cot-GPTQ-4bit-128g.no-act.order.safetensors**
107
+
108
+ 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.
109
+
110
+ It was created with group_size 128 to increase inference accuracy, but without --act-order (desc_act) to increase compatibility and improve inference speed.
111
+
112
+ * `vicuna-13b-cot-GPTQ-4bit-128g.no-act.order.safetensors`
113
+ * Works with AutoGPTQ in CUDA or Triton modes.
114
+ * Works with GPTQ-for-LLaMa in CUDA mode. May have issues with GPTQ-for-LLaMa Triton mode.
115
+ * Works with text-generation-webui, including one-click-installers.
116
+ * Parameters: Groupsize = 128. Act Order / desc_act = False.
117
+
118
+ <!-- footer start -->
119
+ ## Discord
120
+
121
+ For further support, and discussions on these models and AI in general, join us at:
122
+
123
+ [TheBloke AI's Discord server](https://discord.gg/Jq4vkcDakD)
124
+
125
+ ## Thanks, and how to contribute.
126
+
127
+ Thanks to the [chirper.ai](https://chirper.ai) team!
128
+
129
+ 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.
130
+
131
+ 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.
132
+
133
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
134
+
135
+ * Patreon: https://patreon.com/TheBlokeAI
136
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
137
+
138
+ **Special thanks to**: Luke from CarbonQuill, Aemon Algiz, Dmitriy Samsonov.
139
+
140
+ **Patreon special mentions**: Ajan Kanaga, Kalila, Derek Yates, Sean Connelly, Luke, Nathan LeClaire, Trenton Dambrowitz, Mano Prime, David Flickinger, vamX, Nikolai Manek, senxiiz, Khalefa Al-Ahmad, Illia Dulskyi, trip7s trip, Jonathan Leane, Talal Aujan, Artur Olbinski, Cory Kujawski, Joseph William Delisle, Pyrater, Oscar Rangel, Lone Striker, Luke Pendergrass, Eugene Pentland, Johann-Peter Hartmann.
141
+
142
+ Thank you to all my generous patrons and donaters!
143
+
144
+ <!-- footer end -->
145
+
146
+ # Original model card: Kevin Pro's Vicuna 13B CoT
147
+
148
+ # Model Card for Model ID
149
+ SFT to enhance the CoT capabiliy of Vicuna
150
+
151
+ If you find the model helpful, please click "like" to support us.
152
+ We also welcome feedback on your usage experience and any issues you encounter in the issues section.
153
+
154
+ Another 7B version: https://huggingface.co/kevinpro/Vicuna-7B-CoT
155
+
156
+
157
+ ## Model Details
158
+
159
+ ### Model Description
160
+
161
+ <!-- Provide a longer summary of what this model is. -->
162
+
163
+
164
+
165
+ - **Developed by:** [More Information Needed]
166
+ - **Shared by [optional]:** [More Information Needed]
167
+ - **Model type:** [More Information Needed]
168
+ - **Language(s) (NLP):** [More Information Needed]
169
+ - **License:** [More Information Needed]
170
+ - **Finetuned from model [optional]:** [More Information Needed]
171
+
172
+ ### Model Sources [optional]
173
+
174
+ <!-- Provide the basic links for the model. -->
175
+
176
+ - **Repository:** [More Information Needed]
177
+ - **Paper [optional]:** [More Information Needed]
178
+ - **Demo [optional]:** [More Information Needed]
179
+
180
+ ## Uses
181
+
182
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
183
+
184
+ ### Direct Use
185
+
186
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
187
+
188
+ [More Information Needed]
189
+
190
+ ### Downstream Use [optional]
191
+
192
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
193
+
194
+ [More Information Needed]
195
+
196
+ ### Out-of-Scope Use
197
+
198
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
199
+
200
+ [More Information Needed]
201
+
202
+ ## Bias, Risks, and Limitations
203
+
204
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
205
+
206
+ [More Information Needed]
207
+
208
+ ### Recommendations
209
+
210
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
211
+
212
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
213
+
214
+ ## How to Get Started with the Model
215
+
216
+ Use the code below to get started with the model.
217
+
218
+ [More Information Needed]
219
+
220
+ ## Training Details
221
+
222
+ ### Training Data
223
+
224
+ <!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
225
+
226
+ [More Information Needed]
227
+
228
+ ### Training Procedure
229
+
230
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
231
+
232
+ #### Preprocessing [optional]
233
+
234
+ [More Information Needed]
235
+
236
+
237
+ #### Training Hyperparameters
238
+
239
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
240
+
241
+ #### Speeds, Sizes, Times [optional]
242
+
243
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
244
+
245
+ [More Information Needed]
246
+
247
+ ## Evaluation
248
+
249
+ <!-- This section describes the evaluation protocols and provides the results. -->
250
+
251
+ ### Testing Data, Factors & Metrics
252
+
253
+ #### Testing Data
254
+
255
+ <!-- This should link to a Data Card if possible. -->
256
+
257
+ [More Information Needed]
258
+
259
+ #### Factors
260
+
261
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
262
+
263
+ [More Information Needed]
264
+
265
+ #### Metrics
266
+
267
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
268
+
269
+ [More Information Needed]
270
+
271
+ ### Results
272
+
273
+ [More Information Needed]
274
+
275
+ #### Summary
276
+
277
+
278
+
279
+ ## Model Examination [optional]
280
+
281
+ <!-- Relevant interpretability work for the model goes here -->
282
+
283
+ [More Information Needed]
284
+
285
+ ## Environmental Impact
286
+
287
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
288
+
289
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
290
+
291
+ - **Hardware Type:** [More Information Needed]
292
+ - **Hours used:** [More Information Needed]
293
+ - **Cloud Provider:** [More Information Needed]
294
+ - **Compute Region:** [More Information Needed]
295
+ - **Carbon Emitted:** [More Information Needed]
296
+
297
+ ## Technical Specifications [optional]
298
+
299
+ ### Model Architecture and Objective
300
+
301
+ [More Information Needed]
302
+
303
+ ### Compute Infrastructure
304
+
305
+ [More Information Needed]
306
+
307
+ #### Hardware
308
+
309
+ [More Information Needed]
310
+
311
+ #### Software
312
+
313
+ [More Information Needed]
314
+
315
+ ## Citation [optional]
316
+
317
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
318
+
319
+ **BibTeX:**
320
+
321
+ [More Information Needed]
322
+
323
+ **APA:**
324
+
325
+ [More Information Needed]
326
+
327
+ ## Glossary [optional]
328
+
329
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
330
+
331
+ [More Information Needed]
332
+
333
+ ## More Information [optional]
334
+
335
+ [More Information Needed]
336
+
337
+ ## Model Card Authors [optional]
338
+
339
+ [More Information Needed]
340
+
341
+ ## Model Card Contact
342
+
343
+ [More Information Needed]
344
+
345
+