TheBloke commited on
Commit
a46071a
1 Parent(s): 80a13e7

Initial GPTQ model commit

Browse files
Files changed (1) hide show
  1. README.md +224 -0
README.md ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ inference: false
3
+ license: other
4
+ model_creator: totally-not-an-llm
5
+ model_link: https://huggingface.co/totally-not-an-llm/AlpacaCielo-13b
6
+ model_name: AlpacaCielo 13B
7
+ model_type: llama
8
+ quantized_by: TheBloke
9
+ ---
10
+
11
+ <!-- header start -->
12
+ <div style="width: 100%;">
13
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
14
+ </div>
15
+ <div style="display: flex; justify-content: space-between; width: 100%;">
16
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
17
+ <p><a href="https://discord.gg/theblokeai">Chat & support: my new Discord server</a></p>
18
+ </div>
19
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
20
+ <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
21
+ </div>
22
+ </div>
23
+ <!-- header end -->
24
+
25
+ # AlpacaCielo 13B - GPTQ
26
+ - Model creator: [totally-not-an-llm](https://huggingface.co/totally-not-an-llm)
27
+ - Original model: [AlpacaCielo 13B](https://huggingface.co/totally-not-an-llm/AlpacaCielo-13b)
28
+
29
+ ## Description
30
+
31
+ This repo contains GPTQ model files for [totally-not-an-llm's AlpacaCielo 13B](https://huggingface.co/totally-not-an-llm/AlpacaCielo-13b).
32
+
33
+ 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.
34
+
35
+ ## Repositories available
36
+
37
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/AlpacaCielo-13B-GPTQ)
38
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/AlpacaCielo-13B-GGML)
39
+ * [totally-not-an-llm's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/totally-not-an-llm/AlpacaCielo-13b)
40
+
41
+ ## Prompt template: Guanaco
42
+
43
+ ```
44
+ ### Human: {prompt}
45
+ ### Assistant:
46
+ ```
47
+
48
+ ## Provided files
49
+
50
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
51
+
52
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
53
+
54
+ | Branch | Bits | Group Size | Act Order (desc_act) | File Size | ExLlama Compatible? | Made With | Description |
55
+ | ------ | ---- | ---------- | -------------------- | --------- | ------------------- | --------- | ----------- |
56
+ | main | 4 | 128 | False | 7.26 GB | True | AutoGPTQ | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
57
+ | gptq-4bit-32g-actorder_True | 4 | 32 | True | 8.00 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. |
58
+ | gptq-4bit-64g-actorder_True | 4 | 64 | True | 7.51 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. |
59
+ | gptq-4bit-128g-actorder_True | 4 | 128 | True | 7.26 GB | True | AutoGPTQ | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
60
+ | gptq-8bit--1g-actorder_True | 8 | None | True | Processing, coming soon | False | AutoGPTQ | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
61
+ | gptq-8bit-128g-actorder_False | 8 | 128 | False | Processing, coming soon | False | AutoGPTQ | 8-bit, with group size 128g for higher inference quality and without Act Order to improve AutoGPTQ speed. |
62
+ | gptq-8bit-128g-actorder_True | 8 | 128 | True | Processing, coming soon | False | AutoGPTQ | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |
63
+ | gptq-8bit-64g-actorder_True | 8 | 64 | True | Processing, coming soon | False | AutoGPTQ | 8-bit, with group size 64g and Act Order for maximum inference quality. Poor AutoGPTQ CUDA speed. |
64
+
65
+ ## How to download from branches
66
+
67
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/AlpacaCielo-13B-GPTQ:gptq-4bit-32g-actorder_True`
68
+ - With Git, you can clone a branch with:
69
+ ```
70
+ git clone --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/AlpacaCielo-13B-GPTQ`
71
+ ```
72
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
73
+
74
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
75
+
76
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
77
+
78
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
79
+
80
+ 1. Click the **Model tab**.
81
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/AlpacaCielo-13B-GPTQ`.
82
+ - To download from a specific branch, enter for example `TheBloke/AlpacaCielo-13B-GPTQ:gptq-4bit-32g-actorder_True`
83
+ - see Provided Files above for the list of branches for each option.
84
+ 3. Click **Download**.
85
+ 4. The model will start downloading. Once it's finished it will say "Done"
86
+ 5. In the top left, click the refresh icon next to **Model**.
87
+ 6. In the **Model** dropdown, choose the model you just downloaded: `AlpacaCielo-13B-GPTQ`
88
+ 7. The model will automatically load, and is now ready for use!
89
+ 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.
90
+ * Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
91
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
92
+
93
+ ## How to use this GPTQ model from Python code
94
+
95
+ First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) installed:
96
+
97
+ `GITHUB_ACTIONS=true pip install auto-gptq`
98
+
99
+ Then try the following example code:
100
+
101
+ ```python
102
+ from transformers import AutoTokenizer, pipeline, logging
103
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
104
+
105
+ model_name_or_path = "TheBloke/AlpacaCielo-13B-GPTQ"
106
+ model_basename = "gptq_model-4bit-128g"
107
+
108
+ use_triton = False
109
+
110
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
111
+
112
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
113
+ model_basename=model_basename,
114
+ use_safetensors=True,
115
+ trust_remote_code=False,
116
+ device="cuda:0",
117
+ use_triton=use_triton,
118
+ quantize_config=None)
119
+
120
+ """
121
+ To download from a specific branch, use the revision parameter, as in this example:
122
+
123
+ model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
124
+ revision="gptq-4bit-32g-actorder_True",
125
+ model_basename=model_basename,
126
+ use_safetensors=True,
127
+ trust_remote_code=False,
128
+ device="cuda:0",
129
+ quantize_config=None)
130
+ """
131
+
132
+ prompt = "Tell me about AI"
133
+ prompt_template=f'''### Human: {prompt}
134
+ ### Assistant:
135
+ '''
136
+
137
+ print("\n\n*** Generate:")
138
+
139
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
140
+ output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
141
+ print(tokenizer.decode(output[0]))
142
+
143
+ # Inference can also be done using transformers' pipeline
144
+
145
+ # Prevent printing spurious transformers error when using pipeline with AutoGPTQ
146
+ logging.set_verbosity(logging.CRITICAL)
147
+
148
+ print("*** Pipeline:")
149
+ pipe = pipeline(
150
+ "text-generation",
151
+ model=model,
152
+ tokenizer=tokenizer,
153
+ max_new_tokens=512,
154
+ temperature=0.7,
155
+ top_p=0.95,
156
+ repetition_penalty=1.15
157
+ )
158
+
159
+ print(pipe(prompt_template)[0]['generated_text'])
160
+ ```
161
+
162
+ ## Compatibility
163
+
164
+ 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.
165
+
166
+ ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
167
+
168
+ <!-- footer start -->
169
+ ## Discord
170
+
171
+ For further support, and discussions on these models and AI in general, join us at:
172
+
173
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
174
+
175
+ ## Thanks, and how to contribute.
176
+
177
+ Thanks to the [chirper.ai](https://chirper.ai) team!
178
+
179
+ 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.
180
+
181
+ 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.
182
+
183
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
184
+
185
+ * Patreon: https://patreon.com/TheBlokeAI
186
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
187
+
188
+ **Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
189
+
190
+ **Patreon special mentions**: Slarti, Chadd, John Detwiler, Pieter, zynix, K, Mano Prime, ReadyPlayerEmma, Ai Maven, Leonard Tan, Edmond Seymore, Joseph William Delisle, Luke @flexchar, Fred von Graf, Viktor Bowallius, Rishabh Srivastava, Nikolai Manek, Matthew Berman, Johann-Peter Hartmann, ya boyyy, Greatston Gnanesh, Femi Adebogun, Talal Aujan, Jonathan Leane, terasurfer, David Flickinger, William Sang, Ajan Kanaga, Vadim, Artur Olbinski, Raven Klaugh, Michael Levine, Oscar Rangel, Randy H, Cory Kujawski, RoA, Dave, Alex, Alexandros Triantafyllidis, Fen Risland, Eugene Pentland, vamX, Elle, Nathan LeClaire, Khalefa Al-Ahmad, Rainer Wilmers, subjectnull, Junyu Yang, Daniel P. Andersen, SuperWojo, LangChain4j, Mandus, Kalila, Illia Dulskyi, Trenton Dambrowitz, Asp the Wyvern, Derek Yates, Jeffrey Morgan, Deep Realms, Imad Khwaja, Pyrater, Preetika Verma, biorpg, Gabriel Tamborski, Stephen Murray, Spiking Neurons AB, Iucharbius, Chris Smitley, Willem Michiel, Luke Pendergrass, Sebastain Graf, senxiiz, Will Dee, Space Cruiser, Karl Bernard, Clay Pascal, Lone Striker, transmissions 11, webtim, WelcomeToTheClub, Sam, theTransient, Pierre Kircher, chris gileta, John Villwock, Sean Connelly, Willian Hasse
191
+
192
+
193
+ Thank you to all my generous patrons and donaters!
194
+
195
+ <!-- footer end -->
196
+
197
+ # Original model card: totally-not-an-llm's AlpacaCielo 13B
198
+
199
+
200
+ # AlpacaCielo-13b
201
+
202
+ <figure>
203
+ <img src="https://huggingface.co/totally-not-an-llm/AlpacaCielo-13b/resolve/main/alpaca.png" alt="cute cloud alpaca">
204
+ <figcaption style="font-size: 1em;"><i>"super cute baby alpaca laying on a cloud", Model: epicrealism_pureEvolutionV3</i></figcaption>
205
+ </figure>
206
+
207
+ ***
208
+ Disclaimer: The model might have a tokenizer issue, but functions. Updates to come.
209
+ ***
210
+
211
+ AlpacaCielo-13b is a llama-2 based model designed for creative tasks, such as storytelling and roleplay, while still doing well with other chatbot purposes. It is a triple model merge of Nous-Hermes + Guanaco + Storywriter. While it is mostly *"uncensored"*, it still inherits some alignment from Guanaco.
212
+
213
+ **Prompt format is:**
214
+
215
+ ```
216
+ ### Human: {prompt}
217
+ ### Assistant:
218
+ ```
219
+
220
+ *Thanks to previous similar models such as Alpacino, Alpasta, and AlpacaDente for inspiring the creation of this model. Thanks also to the creators of the models involved in the merge. Original models:*
221
+
222
+ - [Nous-Hermes-Llama-2](https://huggingface.co/NousResearch/Nous-Hermes-Llama2-13b)
223
+ - [Guanaco QLoRA](https://huggingface.co/Mikael110/llama-2-13b-guanaco-qlora)
224
+ - [Storywriter LoRA](https://huggingface.co/Blackroot/Llama-2-13B-Storywriter-LORA)