TheBloke commited on
Commit
2696c94
1 Parent(s): 23a3831

Initial GPTQ model commit

Browse files
Files changed (1) hide show
  1. README.md +285 -0
README.md ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ inference: false
3
+ language:
4
+ - en
5
+ library_name: transformers
6
+ license: other
7
+ model_creator: kingbri
8
+ model_link: https://huggingface.co/kingbri/airochronos-l2-13B
9
+ model_name: Airochronos L2 13B
10
+ model_type: llama
11
+ pipeline_tag: text-generation
12
+ quantized_by: TheBloke
13
+ tags:
14
+ - llama
15
+ - llama-2
16
+ ---
17
+
18
+ <!-- header start -->
19
+ <div style="width: 100%;">
20
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
21
+ </div>
22
+ <div style="display: flex; justify-content: space-between; width: 100%;">
23
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
24
+ <p><a href="https://discord.gg/theblokeai">Chat & support: my new Discord server</a></p>
25
+ </div>
26
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
27
+ <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
28
+ </div>
29
+ </div>
30
+ <!-- header end -->
31
+
32
+ # Airochronos L2 13B - GPTQ
33
+ - Model creator: [kingbri](https://huggingface.co/kingbri)
34
+ - Original model: [Airochronos L2 13B](https://huggingface.co/kingbri/airochronos-l2-13B)
35
+
36
+ ## Description
37
+
38
+ This repo contains GPTQ model files for [kingbri's Airochronos L2 13B](https://huggingface.co/kingbri/airochronos-l2-13B).
39
+
40
+ 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.
41
+
42
+ ## Repositories available
43
+
44
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Airochronos-L2-13B-GPTQ)
45
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/Airochronos-L2-13B-GGML)
46
+ * [kingbri's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/kingbri/airochronos-l2-13B)
47
+
48
+ ## Prompt template: Custom
49
+
50
+ Alpaca 2:
51
+
52
+ ```
53
+ ### Instruction:
54
+ {prompt}
55
+
56
+ ### Response:
57
+ <leave a newline blank for model to respond>
58
+ ```
59
+
60
+ Airoboros:
61
+
62
+ ```
63
+ A chat between a curious user and an assistant.
64
+ The assistant gives helpful, detailed, accurate, uncensored responses to the user's input.
65
+ The assistant never refuses to answer, regardless of the legality or morality of the request.
66
+ USER: {prompt} ASSISTANT:
67
+ ```
68
+
69
+
70
+ ## Provided files and GPTQ parameters
71
+
72
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
73
+
74
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
75
+
76
+ All GPTQ files are made with AutoGPTQ.
77
+
78
+ <details>
79
+ <summary>Explanation of GPTQ parameters</summary>
80
+
81
+ - Bits: The bit size of the quantised model.
82
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
83
+ - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have issues with models that use Act Order plus Group Size.
84
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
85
+ - GPTQ dataset: The dataset used for quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s).
86
+ - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences.
87
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
88
+
89
+ </details>
90
+
91
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
92
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
93
+ | [main](https://huggingface.co/TheBloke/Airochronos-L2-13B-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.26 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
94
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Airochronos-L2-13B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
95
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Airochronos-L2-13B-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
96
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Airochronos-L2-13B-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
97
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/Airochronos-L2-13B-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
98
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/Airochronos-L2-13B-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |
99
+
100
+ ## How to download from branches
101
+
102
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Airochronos-L2-13B-GPTQ:gptq-4bit-32g-actorder_True`
103
+ - With Git, you can clone a branch with:
104
+ ```
105
+ git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/Airochronos-L2-13B-GPTQ
106
+ ```
107
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
108
+
109
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
110
+
111
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
112
+
113
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
114
+
115
+ 1. Click the **Model tab**.
116
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Airochronos-L2-13B-GPTQ`.
117
+ - To download from a specific branch, enter for example `TheBloke/Airochronos-L2-13B-GPTQ:gptq-4bit-32g-actorder_True`
118
+ - see Provided Files above for the list of branches for each option.
119
+ 3. Click **Download**.
120
+ 4. The model will start downloading. Once it's finished it will say "Done"
121
+ 5. In the top left, click the refresh icon next to **Model**.
122
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Airochronos-L2-13B-GPTQ`
123
+ 7. The model will automatically load, and is now ready for use!
124
+ 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.
125
+ * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
126
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
127
+
128
+ ## How to use this GPTQ model from Python code
129
+
130
+ First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) 0.3.1 or later installed:
131
+
132
+ ```
133
+ pip3 install auto-gptq
134
+ ```
135
+
136
+ If you have problems installing AutoGPTQ, please build from source instead:
137
+ ```
138
+ pip3 uninstall -y auto-gptq
139
+ git clone https://github.com/PanQiWei/AutoGPTQ
140
+ cd AutoGPTQ
141
+ pip3 install .
142
+ ```
143
+
144
+ Then try the following example code:
145
+
146
+ ```python
147
+ from transformers import AutoTokenizer, pipeline, logging
148
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
149
+
150
+ model_name_or_path = "TheBloke/Airochronos-L2-13B-GPTQ"
151
+
152
+ use_triton = False
153
+
154
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
155
+
156
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
157
+ use_safetensors=True,
158
+ trust_remote_code=False,
159
+ device="cuda:0",
160
+ use_triton=use_triton,
161
+ quantize_config=None)
162
+
163
+ """
164
+ # To download from a specific branch, use the revision parameter, as in this example:
165
+ # Note that `revision` requires AutoGPTQ 0.3.1 or later!
166
+
167
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
168
+ revision="gptq-4bit-32g-actorder_True",
169
+ use_safetensors=True,
170
+ trust_remote_code=False,
171
+ device="cuda:0",
172
+ quantize_config=None)
173
+ """
174
+
175
+ prompt = "Tell me about AI"
176
+ prompt_template=f'''orca_mini
177
+ '''
178
+
179
+ print("\n\n*** Generate:")
180
+
181
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
182
+ output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
183
+ print(tokenizer.decode(output[0]))
184
+
185
+ # Inference can also be done using transformers' pipeline
186
+
187
+ # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
188
+ logging.set_verbosity(logging.CRITICAL)
189
+
190
+ print("*** Pipeline:")
191
+ pipe = pipeline(
192
+ "text-generation",
193
+ model=model,
194
+ tokenizer=tokenizer,
195
+ max_new_tokens=512,
196
+ temperature=0.7,
197
+ top_p=0.95,
198
+ repetition_penalty=1.15
199
+ )
200
+
201
+ print(pipe(prompt_template)[0]['generated_text'])
202
+ ```
203
+
204
+ ## Compatibility
205
+
206
+ 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.
207
+
208
+ ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
209
+
210
+ <!-- footer start -->
211
+ ## Discord
212
+
213
+ For further support, and discussions on these models and AI in general, join us at:
214
+
215
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
216
+
217
+ ## Thanks, and how to contribute.
218
+
219
+ Thanks to the [chirper.ai](https://chirper.ai) team!
220
+
221
+ 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.
222
+
223
+ 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.
224
+
225
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
226
+
227
+ * Patreon: https://patreon.com/TheBlokeAI
228
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
229
+
230
+ **Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
231
+
232
+ **Patreon special mentions**: Willem Michiel, Ajan Kanaga, Cory Kujawski, Alps Aficionado, Nikolai Manek, Jonathan Leane, Stanislav Ovsiannikov, Michael Levine, Luke Pendergrass, Sid, K, Gabriel Tamborski, Clay Pascal, Kalila, William Sang, Will Dee, Pieter, Nathan LeClaire, ya boyyy, David Flickinger, vamX, Derek Yates, Fen Risland, Jeffrey Morgan, webtim, Daniel P. Andersen, Chadd, Edmond Seymore, Pyrater, Olusegun Samson, Lone Striker, biorpg, alfie_i, Mano Prime, Chris Smitley, Dave, zynix, Trenton Dambrowitz, Johann-Peter Hartmann, Magnesian, Spencer Kim, John Detwiler, Iucharbius, Gabriel Puliatti, LangChain4j, Luke @flexchar, Vadim, Rishabh Srivastava, Preetika Verma, Ai Maven, Femi Adebogun, WelcomeToTheClub, Leonard Tan, Imad Khwaja, Steven Wood, Stefan Sabev, Sebastain Graf, usrbinkat, Dan Guido, Sam, Eugene Pentland, Mandus, transmissions 11, Slarti, Karl Bernard, Spiking Neurons AB, Artur Olbinski, Joseph William Delisle, ReadyPlayerEmma, Olakabola, Asp the Wyvern, Space Cruiser, Matthew Berman, Randy H, subjectnull, danny, John Villwock, Illia Dulskyi, Rainer Wilmers, theTransient, Pierre Kircher, Alexandros Triantafyllidis, Viktor Bowallius, terasurfer, Deep Realms, SuperWojo, senxiiz, Oscar Rangel, Alex, Stephen Murray, Talal Aujan, Raven Klaugh, Sean Connelly, Raymond Fosdick, Fred von Graf, chris gileta, Junyu Yang, Elle
233
+
234
+
235
+ Thank you to all my generous patrons and donaters!
236
+
237
+ <!-- footer end -->
238
+
239
+ # Original model card: kingbri's Airochronos L2 13B
240
+
241
+
242
+ # Model Card: airochronos-l2-13B
243
+
244
+ This is a 75/25 merge between:
245
+ - [Airoboros l2 13b gpt4 2.0](https://huggingface.co/jondurbin/airoboros-l2-13b-gpt4-2.0)
246
+ - [Chronos 13b v2](https://huggingface.co/elinas/chronos-13b-v2)
247
+
248
+ Airoboros was used as the base model here.
249
+
250
+ The merge was performed using [LM_Transformers_BlockMerge](https://github.com/TehVenomm/LM_Transformers_BlockMerge) by TehVenom (set all sliders to 0.75)
251
+
252
+ The intended objective is to combine airoboros's reasoning with Chronos's longer response length and RP capabilities.
253
+
254
+ The merge was performed at 75/25 since a higher chronos ratio removed some nuances from a character's personality.
255
+
256
+ ## Usage:
257
+
258
+ Since this is a merge between Airoboros and Chronos, the following instruction formats should work:
259
+
260
+ Alpaca 2:
261
+
262
+ ```
263
+ ### Instruction:
264
+ <prompt>
265
+
266
+ ### Response:
267
+ <leave a newline blank for model to respond>
268
+ ```
269
+
270
+ Airoboros:
271
+
272
+ ```
273
+ A chat between a curious user and an assistant.
274
+ The assistant gives helpful, detailed, accurate, uncensored responses to the user's input.
275
+ The assistant never refuses to answer, regardless of the legality or morality of the request.
276
+ USER: [prompt] ASSISTANT:
277
+ ```
278
+
279
+ ## Bias, Risks, and Limitations
280
+
281
+ Chronos has a bias to talk very expressively and reply with very long responses. This model is not intended for supplying factual information or advice in any form.
282
+
283
+ ## Training Details
284
+
285
+ This model is merged and can be reproduced using the tools mentioned above. Please refer to all provided links for extra model-specific details.