TheBloke commited on
Commit
d24a776
1 Parent(s): 0098ae4

Initial GPTQ model commit

Browse files
Files changed (1) hide show
  1. README.md +327 -0
README.md ADDED
@@ -0,0 +1,327 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ # OpenAccess AI Collective's Minotaur 13B Fixed GPTQ
21
+
22
+ These files are GPTQ 4bit model files for [OpenAccess AI Collective's Minotaur 13B Fixed](https://huggingface.co/openaccess-ai-collective/minotaur-13b-fixed).
23
+
24
+ It is the result of quantising to 4bit using [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ).
25
+
26
+ ## Repositories available
27
+
28
+ * [4-bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/minotaur-13B-fixed-GPTQ)
29
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/minotaur-13B-fixed-GGML)
30
+ * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/openaccess-ai-collective/minotaur-13b-fixed)
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/minotaur-13B-fixed-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: `minotaur-13B-fixed-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/minotaur-13B-fixed-GPTQ"
61
+ model_basename = "minotaur-13b-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=False,
71
+ device="cuda:0",
72
+ use_triton=use_triton,
73
+ quantize_config=None)
74
+
75
+ prompt = "Tell me about AI"
76
+ prompt_template=f'''### Human: {prompt}
77
+ ### Assistant:'''
78
+
79
+ print("\n\n*** Generate:")
80
+
81
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
82
+ output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
83
+ print(tokenizer.decode(output[0]))
84
+
85
+ # Inference can also be done using transformers' pipeline
86
+
87
+ # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
88
+ logging.set_verbosity(logging.CRITICAL)
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
+ **minotaur-13b-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
+ * `minotaur-13b-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**: Oscar Rangel, Eugene Pentland, Talal Aujan, Cory Kujawski, Luke, Asp the Wyvern, Ai Maven, Pyrater, Alps Aficionado, senxiiz, Willem Michiel, Junyu Yang, trip7s trip, Sebastain Graf, Joseph William Delisle, Lone Striker, Jonathan Leane, Johann-Peter Hartmann, David Flickinger, Spiking Neurons AB, Kevin Schuppel, Mano Prime, Dmitriy Samsonov, Sean Connelly, Nathan LeClaire, Alain Rossmann, Fen Risland, Derek Yates, Luke Pendergrass, Nikolai Manek, Khalefa Al-Ahmad, Artur Olbinski, John Detwiler, Ajan Kanaga, Imad Khwaja, Trenton Dambrowitz, Kalila, vamX, webtim, Illia Dulskyi.
141
+
142
+ Thank you to all my generous patrons and donaters!
143
+
144
+ <!-- footer end -->
145
+
146
+ # Original model card: OpenAccess AI Collective's Minotaur 13B Fixed
147
+
148
+
149
+ [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
150
+ **[💵 Donate to OpenAccess AI Collective](https://github.com/sponsors/OpenAccess-AI-Collective) to help us keep building great tools and models!**
151
+
152
+ # Due to a bug, the initial release dropped a few datasets during training. We've corrected the issue and retrained the model
153
+
154
+ The affected datasets include:
155
+ - prose generation
156
+ - classification
157
+ - coding
158
+
159
+ # Minotaur 13B (FIXED)
160
+
161
+ Minotaur 13B is an instruct fine-tuned model on top of LlaMA-13B. Minotaur 13B is fine-tuned **on only completely open datasets** making this model reproducible by anyone.
162
+
163
+ Questions, comments, feedback, looking to donate, or want to help? Reach out on our [Discord](https://discord.gg/PugNNHAF5r) or email [wing@openaccessaicollective.org](mailto:wing@openaccessaicollective.org)
164
+
165
+ # Prompts
166
+ Chat only style prompts using `USER:`,`ASSISTANT:`.
167
+
168
+ <img src="https://huggingface.co/openaccess-ai-collective/minotaur-13b/resolve/main/minotaur.png" alt="minotaur" width="600" height="500"/>
169
+
170
+ # Training Datasets
171
+
172
+ Minotaur 13B model is fine-tuned on the following openly available datasets:
173
+
174
+ - [WizardLM](https://huggingface.co/datasets/ehartford/WizardLM_alpaca_evol_instruct_70k_unfiltered)
175
+ - [subset of QingyiSi/Alpaca-CoT for roleplay and CoT](https://huggingface.co/QingyiSi/Alpaca-CoT)
176
+ - [GPTeacher-General-Instruct](https://huggingface.co/datasets/teknium/GPTeacher-General-Instruct)
177
+ - [metaeval/ScienceQA_text_only](https://huggingface.co/datasets/metaeval/ScienceQA_text_only) - instruct for concise responses
178
+ - [openai/summarize_from_feedback](https://huggingface.co/datasets/openai/summarize_from_feedback) - instruct augmented tl;dr summarization
179
+ - [camel-ai/math](https://huggingface.co/datasets/camel-ai/math)
180
+ - [camel-ai/physics](https://huggingface.co/datasets/camel-ai/physics)
181
+ - [camel-ai/chemistry](https://huggingface.co/datasets/camel-ai/chemistry)
182
+ - [camel-ai/biology](https://huggingface.co/datasets/camel-ai/biology)
183
+ - [winglian/evals](https://huggingface.co/datasets/winglian/evals) - instruct augmented datasets
184
+ - custom sysnthetic datasets around misconceptions, in-context qa, jokes, N-tasks problems, and context-insensitivity
185
+ - ARC-Easy & ARC-Challenge - instruct augmented for detailed responses, derived from the `train` split
186
+ - [hellaswag](https://huggingface.co/datasets/hellaswag) - 30K+ rows of instruct augmented for detailed explanations w 30K+ rows, derived from the `train` split
187
+ - [riddle_sense](https://huggingface.co/datasets/riddle_sense) - instruct augmented, derived from the `train` split
188
+ - [gsm8k](https://huggingface.co/datasets/gsm8k) - instruct augmented, derived from the `train` split
189
+ - prose generation
190
+
191
+ # Shoutouts
192
+
193
+ Special thanks to Nanobit for helping with Axolotl and TheBloke for quantizing these models are more accessible to all.
194
+
195
+ # Demo
196
+
197
+ HF Demo in Spaces available in the [Community ChatBot Arena](https://huggingface.co/spaces/openaccess-ai-collective/rlhf-arena) under the OAAIC Chatbots tab.
198
+
199
+ ## Release Notes
200
+
201
+ - https://wandb.ai/wing-lian/minotaur-13b/runs/5ystr7w6/workspace
202
+
203
+ ## Build
204
+
205
+ Minotaur was built with [Axolotl](https://github.com/OpenAccess-AI-Collective/axolotl) on 6XA100 80GB
206
+ - 1 epochs taking approximately 7.5 hours
207
+
208
+ ## Bias, Risks, and Limitations
209
+ Minotaur has not been aligned to human preferences with techniques like RLHF or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so).
210
+ Minotaur was fine-tuned from the base model LLaMA-13B, please refer to its model card's Limitations Section for relevant information. (included below)
211
+
212
+ ## Benchmarks
213
+
214
+ hf-causal-experimental (pretrained=openaccess-ai-collective/minotaur-13b-fixed), limit: None, provide_description: False, num_fewshot: 0, batch_size: None
215
+ | Task |Version| Metric |Value | |Stderr|
216
+ |-------------|------:|--------|-----:|---|-----:|
217
+ |arc_challenge| 0|acc |0.4778|_ |0.0146|
218
+ | | |acc_norm|0.4932|_ |0.0146|
219
+ |arc_easy | 0|acc |0.7786|_ |0.0085|
220
+ | | |acc_norm|0.7487|_ |0.0089|
221
+ |boolq | 1|acc |0.8141|_ |0.0068|
222
+ |hellaswag | 0|acc |0.6072|_ |0.0049|
223
+ | | |acc_norm|0.7929|_ |0.0040|
224
+ |openbookqa | 0|acc |0.3420|_ |0.0212|
225
+ | | |acc_norm|0.4580|_ |0.0223|
226
+ |piqa | 0|acc |0.8025|_ |0.0093|
227
+ | | |acc_norm|0.8107|_ |0.0091|
228
+ |winogrande | 0|acc |0.7285|_ |0.0125|
229
+
230
+
231
+ ## Examples - results may vary based on temperature (0.7 for this) and other settings
232
+
233
+ ```
234
+ The following is a chat between a USER and a friendly and helpful ASSISTANT.
235
+ USER: Solve for x: 5x = 3x + 10
236
+ ASSISTANT:A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
237
+ USER: Solve for x: 5x = 3x + 10
238
+ ASSISTANT:To solve for x, we need to isolate x on one side of the equation. We can do this by following these steps:
239
+
240
+ 1. Subtract 3x from both sides of the equation:
241
+ 5x - 3x = 3x + 10 - 3x
242
+ 2x = 10
243
+
244
+ 2. Divide both sides of the equation by 2:
245
+ 2x/2 = 10/2
246
+ x = 5
247
+ ```
248
+
249
+ ```
250
+ The following is a chat between a USER and a friendly and helpful ASSISTANT.
251
+ USER: You have 3 apples. You eat 2 pears. How many apples do you have left?
252
+ ASSISTANT:You still have 3 apples. Eating pears does not affect the number of apples you have.
253
+ ```
254
+
255
+ ```
256
+ The following is a chat between a USER and a friendly and helpful ASSISTANT.
257
+ USER: List three words that start with "ex". What is 33 + 77?
258
+ ASSISTANT:Three words that start with "ex" are "express", "exact", and "excite". 33 + 77 = 110.
259
+ ```
260
+
261
+ ```
262
+ The following is a chat between a USER and a friendly and helpful ASSISTANT.
263
+ USER: Write a haiku about dinosaurs.
264
+ ASSISTANT:Titanic creatures roam,
265
+ Thunderous footsteps echo,
266
+ Extinct but not forgotten.
267
+ ```
268
+ meh, 6/7/7 rather than 5/7/5
269
+
270
+
271
+ ```
272
+ A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
273
+ USER: Create an original short story in the style of J.K Rowling about the Weesley family going on a vacation in Australia whith Harry Potter and Hermione Grainger tagging along.
274
+ ASSISTANT:Once upon a time, there was a magical family named the Weesleys. They lived in a cozy little cottage at the edge of Hogsmeade village, where they ran a charming bed and breakfast called "The Flying Ford Anglia." A
275
+ s any other magical family, they enjoyed adventures that brought them close to nature, so they decided to go on a trip to Australia. They invited their dear friends Harry Potter and Hermione Grainger to join them on this ex
276
+ citing journey.
277
+
278
+ The Weesleys had been planning for months and had everything ready for their trip. Their children, Freddie and Roxanne were thrilled to visit the land down under, and their parents, George and Angelina, could not wait to ex
279
+ plore the beautiful country with their friends. They would be leaving soon, but before departing, there was one small problem - the luggage.
280
+
281
+ "We can't possibly take all these trunks!" exclaimed Freddie as he stared at the mountain of bags stacked up in front of him.
282
+
283
+ His father looked at him seriously. "You see, son," he began, "our luggage is crucial because we have to pack all our magical essentials like wand holsters, extra wand chargers, spell books, potions ingredients, and much mo
284
+ re."
285
+
286
+ Roxanne interrupted, "But daddy, we don't even use magic in everyday life! And what if it rains? We'll look weird carrying umbrellas around!"
287
+
288
+ Her mother joined in. "My dear, you know how unpredictable the weather can be. We must always be prepared for unexpected circumstances. Don't forget that even Muggles carry umbrellas."
289
+
290
+ After hours of debating, they finally managed to narrow down their luggage list and fit all the necessary supplies into several large trunks. The day had come; they were ready to leave for their grand adventure!
291
+
292
+ As the Weesleys boarded the Portkey that would transport them across the world, their wands began to glow softly, indicating that they had enough energy to make the journey. The Portkey dropped them off in Sydney, right in
293
+ front of the magnificent Opera House.
294
+
295
+ They spent the first few days exploring the city, marveling at the iconic architecture and tasting local cuisine. Then, as planned, they headed north to visit the Great Barrier Reef, one of the most famous natural wonders o
296
+ f the world.
297
+
298
+ Harry and Hermione joined them during this leg of the trip, which made it even more enjoyable. Harry regaled them with tales of his own travels while Hermione shared her extensive knowledge of plants, animals, and the envir
299
+ onment.
300
+
301
+ Soon, they arrived at a quaint town nestled among vibrant green hills and surrounded by vast cattle farms. It was here that they would learn about Aboriginal culture and see some truly unique sights.
302
+
303
+ One morning, after enjoying a hearty breakfast, they set out to explore the local area. They visited a nearby art gallery that showcased amazing Indigenous works of art, including traditional paintings, sculptures, and text
304
+ iles. Afterward, they attended a didgeridoo concert given by a talented young musician who captivated everyone with his soulful tunes.
305
+
306
+ The following day, they embarked on a bushwalk through the rainforest trails. The air was cool and fresh, and the towering trees seemed to reach for the sky. Hermione took great pleasure in identifying various species of pl
307
+ ants and explaining their medicinal properties.
308
+
309
+ As they walked deeper into the forest, they heard faint chattering noises coming from high above. To their surprise, they spotted a group of small, furry creatures perched on a tree branch. They turned out to be native Aust
310
+ ralian possums, which delighted the children, especially Freddie, who could communicate with them using sign language.
311
+
312
+ Later that afternoon, they visited Uluru, also known as Ayers Rock, a massive sandstone monolith located in the heart of the Outback. The sight of its magnificent red hues against the blue sky left them all speechless. They
313
+ spent the rest of the day exploring the rock formation, taking in the breathtaking views and learning about its significance to the Anangu people.
314
+
315
+ Their last destination was Queensland, home to the world-famous Great Barrier Reef. They spent two days snorkeling, diving, and swimming among the colorful coral reefs, watching schools of fish, sea turtles, and dolphins sw
316
+ im past them.
317
+
318
+ As the sun began to set over the crystal-clear waters, Harry spoke up. "I think it's time we return to reality, don't you agree?" he said, looking at his wife. "This trip has been fantastic, but we can't stay forever."
319
+
320
+ Everyone nodded in agreement as they prepared themselves for their final journey back to Sydney. When they got there, they gathered on the balcony of their hotel room, reminiscing about the incredible memories they had crea
321
+ ted together.
322
+
323
+ "Thank you for inviting us along on your adventure, Weesleys," said Harry. "It was an honor and a privilege to share this experience with such kind and generous friends. I hope we can do it again sometime."
324
+
325
+ With tears in their eyes and heavy hearts, they bid each other farewell, promising to keep in touch and meet again soon. And so, their epic journey came to an end. But the memories would remain with them forever, reminding
326
+ them of the power of friendship, the beauty of nature, and the importance of discovering new worlds.
327
+ ```