TheBloke commited on
Commit
b113bf7
1 Parent(s): beba5ab

Upload new GPTQs with varied parameters

Browse files
Files changed (1) hide show
  1. README.md +385 -0
README.md ADDED
@@ -0,0 +1,385 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ inference: false
3
+ license: other
4
+ model_type: llama
5
+ tags:
6
+ - llama
7
+ - pytorch
8
+ - chatbot
9
+ - storywriting
10
+ ---
11
+
12
+ <!-- header start -->
13
+ <div style="width: 100%;">
14
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
15
+ </div>
16
+ <div style="display: flex; justify-content: space-between; width: 100%;">
17
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
18
+ <p><a href="https://discord.gg/theblokeai">Chat & support: my new Discord server</a></p>
19
+ </div>
20
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
21
+ <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
22
+ </div>
23
+ </div>
24
+ <!-- header end -->
25
+
26
+ # Elinas' Chronos 33B GPTQ
27
+
28
+ These files are GPTQ model files for [Elinas' Chronos 33B](https://huggingface.co/elinas/chronos-33b).
29
+
30
+ 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.
31
+
32
+ These models were quantised using hardware kindly provided by [Latitude.sh](https://www.latitude.sh/accelerate).
33
+
34
+ ## Repositories available
35
+
36
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/chronos-33b-GPTQ)
37
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/chronos-33b-GGML)
38
+ * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/elinas/chronos-33b)
39
+
40
+ ## Prompt template: Alpaca
41
+
42
+ ```
43
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
44
+
45
+ ### Instruction: {prompt}
46
+
47
+ ### Response:
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 | None | True | 16.94 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 | 19.44 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 | 18.18 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 | 17.55 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 | 32.99 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 | 33.73 GB | False | AutoGPTQ | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
64
+ | gptq-3bit--1g-actorder_True | 3 | None | True | 12.92 GB | False | AutoGPTQ | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
65
+ | gptq-3bit-128g-actorder_False | 3 | 128 | False | 13.51 GB | False | AutoGPTQ | 3-bit, with group size 128g but no act-order. Slightly higher VRAM requirements than 3-bit None. |
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/chronos-33b-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/chronos-33b-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/chronos-33b-GPTQ`.
84
+ - To download from a specific branch, enter for example `TheBloke/chronos-33b-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: `chronos-33b-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/chronos-33b-GPTQ"
108
+ model_basename = "chronos-33b-GPTQ-4bit--1g.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=False,
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=False,
130
+ device="cuda:0",
131
+ quantize_config=None)
132
+ """
133
+
134
+ prompt = "Tell me about AI"
135
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
136
+
137
+ ### Instruction: {prompt}
138
+
139
+ ### Response:
140
+ '''
141
+
142
+ print("\n\n*** Generate:")
143
+
144
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
145
+ output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
146
+ print(tokenizer.decode(output[0]))
147
+
148
+ # Inference can also be done using transformers' pipeline
149
+
150
+ # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
151
+ logging.set_verbosity(logging.CRITICAL)
152
+
153
+ print("*** Pipeline:")
154
+ pipe = pipeline(
155
+ "text-generation",
156
+ model=model,
157
+ tokenizer=tokenizer,
158
+ max_new_tokens=512,
159
+ temperature=0.7,
160
+ top_p=0.95,
161
+ repetition_penalty=1.15
162
+ )
163
+
164
+ print(pipe(prompt_template)[0]['generated_text'])
165
+ ```
166
+
167
+ ## Compatibility
168
+
169
+ 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.
170
+
171
+ ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
172
+
173
+ <!-- footer start -->
174
+ ## Discord
175
+
176
+ For further support, and discussions on these models and AI in general, join us at:
177
+
178
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
179
+
180
+ ## Thanks, and how to contribute.
181
+
182
+ Thanks to the [chirper.ai](https://chirper.ai) team!
183
+
184
+ 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.
185
+
186
+ 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.
187
+
188
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
189
+
190
+ * Patreon: https://patreon.com/TheBlokeAI
191
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
192
+
193
+ **Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
194
+
195
+ **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.
196
+
197
+ Thank you to all my generous patrons and donaters!
198
+
199
+ <!-- footer end -->
200
+
201
+ # Original model card: Elinas' Chronos 33B
202
+
203
+
204
+ # chronos-33b
205
+
206
+ This is the fp16 PyTorch / HF version of **chronos-33b** - if you need another version, GGML and GPTQ versions are linked below.
207
+
208
+ This model is primarily focused on chat, roleplay, and storywriting, but can accomplish other tasks such as simple reasoning and coding.
209
+
210
+ Chronos generates very long outputs with coherent text, largely due to the human inputs it was trained on.
211
+
212
+ This model uses Alpaca formatting, so for optimal model performance, use:
213
+ ```
214
+ ### Instruction:
215
+ Your instruction or question here.
216
+ ### Response:
217
+ ```
218
+
219
+ [GGML Version provided by @TheBloke](https://huggingface.co/TheBloke/chronos-33b-GGML)
220
+
221
+ [4bit GPTQ Version provided by @TheBloke](https://huggingface.co/TheBloke/chronos-33b-GPTQ)
222
+
223
+ <!--**Support My Development of New Models**
224
+ <a href='https://ko-fi.com/Q5Q6MB734' target='_blank'><img height='36' style='border:0px;height:36px;'
225
+ src='https://storage.ko-fi.com/cdn/kofi1.png?v=3' border='0' alt='Support Development' /></a>-->
226
+
227
+ --
228
+ license: other
229
+ ---
230
+ # LLaMA Model Card
231
+
232
+ ## Model details
233
+ **Organization developing the model**
234
+ The FAIR team of Meta AI.
235
+
236
+ **Model date**
237
+ LLaMA was trained between December. 2022 and Feb. 2023.
238
+
239
+ **Model version**
240
+ This is version 1 of the model.
241
+
242
+ **Model type**
243
+ LLaMA is an auto-regressive language model, based on the transformer architecture. The model comes in different sizes: 7B, 13B, 33B and 65B parameters.
244
+
245
+ **Paper or resources for more information**
246
+ More information can be found in the paper “LLaMA, Open and Efficient Foundation Language Models”, available at https://research.facebook.com/publications/llama-open-and-efficient-foundation-language-models/.
247
+
248
+ **Citations details**
249
+ https://research.facebook.com/publications/llama-open-and-efficient-foundation-language-models/
250
+
251
+ **License**
252
+ Non-commercial bespoke license
253
+
254
+ **Where to send questions or comments about the model**
255
+ Questions and comments about LLaMA can be sent via the [GitHub repository](https://github.com/facebookresearch/llama) of the project , by opening an issue.
256
+
257
+ ## Intended use
258
+ **Primary intended uses**
259
+ The primary use of LLaMA is research on large language models, including:
260
+ exploring potential applications such as question answering, natural language understanding or reading comprehension,
261
+ understanding capabilities and limitations of current language models, and developing techniques to improve those,
262
+ evaluating and mitigating biases, risks, toxic and harmful content generations, hallucinations.
263
+
264
+ **Primary intended users**
265
+ The primary intended users of the model are researchers in natural language processing, machine learning and artificial intelligence.
266
+
267
+ **Out-of-scope use cases**
268
+ LLaMA is a base, or foundational, model. As such, it should not be used on downstream applications without further risk evaluation and mitigation. In particular, our model has not been trained with human feedback, and can thus generate toxic or offensive content, incorrect information or generally unhelpful answers.
269
+
270
+ ## Factors
271
+ **Relevant factors**
272
+ One of the most relevant factors for which model performance may vary is which language is used. Although we included 20 languages in the training data, most of our dataset is made of English text, and we thus expect the model to perform better for English than other languages. Relatedly, it has been shown in previous studies that performance might vary for different dialects, and we expect that it will be the case for our model.
273
+
274
+ **Evaluation factors**
275
+ As our model is trained on data from the Web, we expect that it reflects biases from this source. We thus evaluated on RAI datasets to measure biases exhibited by the model for gender, religion, race, sexual orientation, age, nationality, disability, physical appearance and socio-economic status. We also measure the toxicity of model generations, depending on the toxicity of the context used to prompt the model.
276
+
277
+ ## Metrics
278
+ **Model performance measures**
279
+ We use the following measure to evaluate the model:
280
+ - Accuracy for common sense reasoning, reading comprehension, natural language understanding (MMLU), BIG-bench hard, WinoGender and CrowS-Pairs,
281
+ - Exact match for question answering,
282
+ - The toxicity score from Perspective API on RealToxicityPrompts.
283
+
284
+ **Decision thresholds**
285
+ Not applicable.
286
+
287
+ **Approaches to uncertainty and variability**
288
+ Due to the high computational requirements of training LLMs, we trained only one model of each size, and thus could not evaluate variability of pre-training.
289
+
290
+ ## Evaluation datasets
291
+ The model was evaluated on the following benchmarks: BoolQ, PIQA, SIQA, HellaSwag, WinoGrande, ARC, OpenBookQA, NaturalQuestions, TriviaQA, RACE, MMLU, BIG-bench hard, GSM8k, RealToxicityPrompts, WinoGender, CrowS-Pairs.
292
+
293
+ ## Training dataset
294
+ The model was trained using the following source of data: CCNet [67%], C4 [15%], GitHub [4.5%], Wikipedia [4.5%], Books [4.5%], ArXiv [2.5%], Stack Exchange[2%]. The Wikipedia and Books domains include data in the following languages: bg, ca, cs, da, de, en, es, fr, hr, hu, it, nl, pl, pt, ro, ru, sl, sr, sv, uk. See the paper for more details about the training set and corresponding preprocessing.
295
+
296
+ ## Quantitative analysis
297
+ Hyperparameters for the model architecture
298
+
299
+
300
+ <table>
301
+ <thead>
302
+ <tr>
303
+ <th >LLaMA</th> <th colspan=6>Model hyper parameters </th>
304
+ </tr>
305
+ <tr>
306
+ <th>Number of parameters</th><th>dimension</th><th>n heads</th><th>n layers</th><th>Learn rate</th><th>Batch size</th><th>n tokens</th>
307
+ </tr>
308
+ </thead>
309
+ <tbody>
310
+ <tr>
311
+ <th>7B</th> <th>4096</th> <th>32</th> <th>32</th> <th>3.0E-04</th><th>4M</th><th>1T
312
+ </tr>
313
+ <tr>
314
+ <th>13B</th><th>5120</th><th>40</th><th>40</th><th>3.0E-04</th><th>4M</th><th>1T
315
+ </tr>
316
+ <tr>
317
+ <th>33B</th><th>6656</th><th>52</th><th>60</th><th>1.5.E-04</th><th>4M</th><th>1.4T
318
+ </tr>
319
+ <tr>
320
+ <th>65B</th><th>8192</th><th>64</th><th>80</th><th>1.5.E-04</th><th>4M</th><th>1.4T
321
+ </tr>
322
+ </tbody>
323
+ </table>
324
+
325
+ *Table 1 - Summary of LLama Model Hyperparameters*
326
+
327
+ We present our results on eight standard common sense reasoning benchmarks in the table below.
328
+ <table>
329
+ <thead>
330
+ <tr>
331
+ <th>LLaMA</th> <th colspan=9>Reasoning tasks </th>
332
+ </tr>
333
+ <tr>
334
+ <th>Number of parameters</th> <th>BoolQ</th><th>PIQA</th><th>SIQA</th><th>HellaSwag</th><th>WinoGrande</th><th>ARC-e</th><th>ARC-c</th><th>OBQA</th><th>COPA</th>
335
+ </tr>
336
+ </thead>
337
+ <tbody>
338
+ <tr>
339
+ <th>7B</th><th>76.5</th><th>79.8</th><th>48.9</th><th>76.1</th><th>70.1</th><th>76.7</th><th>47.6</th><th>57.2</th><th>93
340
+ </th>
341
+ <tr><th>13B</th><th>78.1</th><th>80.1</th><th>50.4</th><th>79.2</th><th>73</th><th>78.1</th><th>52.7</th><th>56.4</th><th>94
342
+ </th>
343
+ <tr><th>33B</th><th>83.1</th><th>82.3</th><th>50.4</th><th>82.8</th><th>76</th><th>81.4</th><th>57.8</th><th>58.6</th><th>92
344
+ </th>
345
+ <tr><th>65B</th><th>85.3</th><th>82.8</th><th>52.3</th><th>84.2</th><th>77</th><th>81.5</th><th>56</th><th>60.2</th><th>94</th></tr>
346
+ </tbody>
347
+ </table>
348
+ *Table 2 - Summary of LLama Model Performance on Reasoning tasks*
349
+
350
+
351
+ We present our results on bias in the table below. Note that lower value is better indicating lower bias.
352
+
353
+
354
+ | No | Category | FAIR LLM |
355
+ | --- | -------------------- | -------- |
356
+ | 1 | Gender | 70.6 |
357
+ | 2 | Religion | 79 |
358
+ | 3 | Race/Color | 57 |
359
+ | 4 | Sexual orientation | 81 |
360
+ | 5 | Age | 70.1 |
361
+ | 6 | Nationality | 64.2 |
362
+ | 7 | Disability | 66.7 |
363
+ | 8 | Physical appearance | 77.8 |
364
+ | 9 | Socioeconomic status | 71.5 |
365
+ | | LLaMA Average | 66.6 |
366
+
367
+ *Table 3 - Summary bias of our model output*
368
+
369
+
370
+
371
+ ## Ethical considerations
372
+ **Data**
373
+ The data used to train the model is collected from various sources, mostly from the Web. As such, it contains offensive, harmful and biased content. We thus expect the model to exhibit such biases from the training data.
374
+
375
+ **Human life**
376
+ The model is not intended to inform decisions about matters central to human life, and should not be used in such a way.
377
+
378
+ **Mitigations**
379
+ We filtered the data from the Web based on its proximity to Wikipedia text and references. For this, we used a Kneser-Ney language model and a fastText linear classifier.
380
+
381
+ **Risks and harms**
382
+ Risks and harms of large language models include the generation of harmful, offensive or biased content. These models are often prone to generating incorrect information, sometimes referred to as hallucinations. We do not expect our model to be an exception in this regard.
383
+
384
+ **Use cases**
385
+ LLaMA is a foundational model, and as such, it should not be used for downstream applications without further investigation and mitigations of risks. These risks and potential fraught use cases include, but are not limited to: generation of misinformation and generation of harmful, biased or offensive content.