TheBloke commited on
Commit
8d60162
1 Parent(s): 1f28cb2

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +299 -0
README.md ADDED
@@ -0,0 +1,299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ inference: false
3
+ language:
4
+ - en
5
+ library_name: transformers
6
+ license: llama2
7
+ model_creator: The Royal Lab
8
+ model_link: https://huggingface.co/royallab/Pygmalion-2-13b-SuperCOT
9
+ model_name: Pygmalion 2 13B SuperCOT
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
+ <!-- 200823 -->
20
+ <div style="width: auto; margin-left: auto; margin-right: auto">
21
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
22
+ </div>
23
+ <div style="display: flex; justify-content: space-between; width: 100%;">
24
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
25
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
26
+ </div>
27
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
28
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
29
+ </div>
30
+ </div>
31
+ <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
32
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
33
+ <!-- header end -->
34
+
35
+ # Pygmalion 2 13B SuperCOT - GPTQ
36
+ - Model creator: [The Royal Lab](https://huggingface.co/royallab)
37
+ - Original model: [Pygmalion 2 13B SuperCOT](https://huggingface.co/royallab/Pygmalion-2-13b-SuperCOT)
38
+
39
+ <!-- description start -->
40
+ ## Description
41
+
42
+ This repo contains GPTQ model files for [The Royal Lab's Pygmalion 2 13B SuperCOT](https://huggingface.co/royallab/Pygmalion-2-13b-SuperCOT).
43
+
44
+ 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.
45
+
46
+ <!-- description end -->
47
+ <!-- repositories-available start -->
48
+ ## Repositories available
49
+
50
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Pygmalion-2-13B-SuperCOT-GPTQ)
51
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Pygmalion-2-13B-SuperCOT-GGUF)
52
+ * [The Royal Lab's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/royallab/Pygmalion-2-13b-SuperCOT)
53
+ <!-- repositories-available end -->
54
+
55
+ <!-- prompt-template start -->
56
+ ## Prompt template: Alpaca
57
+
58
+ ```
59
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
60
+
61
+ ### Instruction:
62
+ {prompt}
63
+
64
+ ### Response:
65
+
66
+ ```
67
+
68
+ <!-- prompt-template end -->
69
+
70
+ <!-- README_GPTQ.md-provided-files start -->
71
+ ## Provided files and GPTQ parameters
72
+
73
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
74
+
75
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
76
+
77
+ All recent GPTQ files are made with AutoGPTQ, and all files in non-main branches are made with AutoGPTQ. Files in the `main` branch which were uploaded before August 2023 were made with GPTQ-for-LLaMa.
78
+
79
+ <details>
80
+ <summary>Explanation of GPTQ parameters</summary>
81
+
82
+ - Bits: The bit size of the quantised model.
83
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
84
+ - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now.
85
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
86
+ - 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).
87
+ - 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.
88
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
89
+
90
+ </details>
91
+
92
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
93
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
94
+ | [main](https://huggingface.co/TheBloke/Pygmalion-2-13B-SuperCOT-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.26 GB | Yes | 4-bit, without Act Order and group size 128g. |
95
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-13B-SuperCOT-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. |
96
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-13B-SuperCOT-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. |
97
+ | [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-13B-SuperCOT-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. |
98
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-13B-SuperCOT-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. |
99
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/Pygmalion-2-13B-SuperCOT-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. |
100
+
101
+ <!-- README_GPTQ.md-provided-files end -->
102
+
103
+ <!-- README_GPTQ.md-download-from-branches start -->
104
+ ## How to download from branches
105
+
106
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Pygmalion-2-13B-SuperCOT-GPTQ:main`
107
+ - With Git, you can clone a branch with:
108
+ ```
109
+ git clone --single-branch --branch main https://huggingface.co/TheBloke/Pygmalion-2-13B-SuperCOT-GPTQ
110
+ ```
111
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
112
+ <!-- README_GPTQ.md-download-from-branches end -->
113
+ <!-- README_GPTQ.md-text-generation-webui start -->
114
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
115
+
116
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
117
+
118
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install.
119
+
120
+ 1. Click the **Model tab**.
121
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Pygmalion-2-13B-SuperCOT-GPTQ`.
122
+ - To download from a specific branch, enter for example `TheBloke/Pygmalion-2-13B-SuperCOT-GPTQ:main`
123
+ - see Provided Files above for the list of branches for each option.
124
+ 3. Click **Download**.
125
+ 4. The model will start downloading. Once it's finished it will say "Done".
126
+ 5. In the top left, click the refresh icon next to **Model**.
127
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Pygmalion-2-13B-SuperCOT-GPTQ`
128
+ 7. The model will automatically load, and is now ready for use!
129
+ 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.
130
+ * Note that you do not need to and should not set manual GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
131
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
132
+ <!-- README_GPTQ.md-text-generation-webui end -->
133
+
134
+ <!-- README_GPTQ.md-use-from-python start -->
135
+ ## How to use this GPTQ model from Python code
136
+
137
+ ### Install the necessary packages
138
+
139
+ Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
140
+
141
+ ```shell
142
+ pip3 install transformers>=4.32.0 optimum>=1.12.0
143
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
144
+ ```
145
+
146
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
147
+
148
+ ```shell
149
+ pip3 uninstall -y auto-gptq
150
+ git clone https://github.com/PanQiWei/AutoGPTQ
151
+ cd AutoGPTQ
152
+ pip3 install .
153
+ ```
154
+
155
+ ### For CodeLlama models only: you must use Transformers 4.33.0 or later.
156
+
157
+ If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
158
+ ```shell
159
+ pip3 uninstall -y transformers
160
+ pip3 install git+https://github.com/huggingface/transformers.git
161
+ ```
162
+
163
+ ### You can then use the following code
164
+
165
+ ```python
166
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
167
+
168
+ model_name_or_path = "TheBloke/Pygmalion-2-13B-SuperCOT-GPTQ"
169
+ # To use a different branch, change revision
170
+ # For example: revision="main"
171
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
172
+ device_map="auto",
173
+ trust_remote_code=False,
174
+ revision="main")
175
+
176
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
177
+
178
+ prompt = "Tell me about AI"
179
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
180
+
181
+ ### Instruction:
182
+ {prompt}
183
+
184
+ ### Response:
185
+
186
+ '''
187
+
188
+ print("\n\n*** Generate:")
189
+
190
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
191
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
192
+ print(tokenizer.decode(output[0]))
193
+
194
+ # Inference can also be done using transformers' pipeline
195
+
196
+ print("*** Pipeline:")
197
+ pipe = pipeline(
198
+ "text-generation",
199
+ model=model,
200
+ tokenizer=tokenizer,
201
+ max_new_tokens=512,
202
+ do_sample=True,
203
+ temperature=0.7,
204
+ top_p=0.95,
205
+ top_k=40,
206
+ repetition_penalty=1.1
207
+ )
208
+
209
+ print(pipe(prompt_template)[0]['generated_text'])
210
+ ```
211
+ <!-- README_GPTQ.md-use-from-python end -->
212
+
213
+ <!-- README_GPTQ.md-compatibility start -->
214
+ ## Compatibility
215
+
216
+ The files provided are tested to work with AutoGPTQ, both via Transformers and using AutoGPTQ directly. They should also work with [Occ4m's GPTQ-for-LLaMa fork](https://github.com/0cc4m/KoboldAI).
217
+
218
+ [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
219
+
220
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
221
+ <!-- README_GPTQ.md-compatibility end -->
222
+
223
+ <!-- footer start -->
224
+ <!-- 200823 -->
225
+ ## Discord
226
+
227
+ For further support, and discussions on these models and AI in general, join us at:
228
+
229
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
230
+
231
+ ## Thanks, and how to contribute
232
+
233
+ Thanks to the [chirper.ai](https://chirper.ai) team!
234
+
235
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
236
+
237
+ 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.
238
+
239
+ 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.
240
+
241
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
242
+
243
+ * Patreon: https://patreon.com/TheBlokeAI
244
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
245
+
246
+ **Special thanks to**: Aemon Algiz.
247
+
248
+ **Patreon special mentions**: Russ Johnson, J, alfie_i, Alex, NimbleBox.ai, Chadd, Mandus, Nikolai Manek, Ken Nordquist, ya boyyy, Illia Dulskyi, Viktor Bowallius, vamX, Iucharbius, zynix, Magnesian, Clay Pascal, Pierre Kircher, Enrico Ros, Tony Hughes, Elle, Andrey, knownsqashed, Deep Realms, Jerry Meng, Lone Striker, Derek Yates, Pyrater, Mesiah Bishop, James Bentley, Femi Adebogun, Brandon Frisco, SuperWojo, Alps Aficionado, Michael Dempsey, Vitor Caleffi, Will Dee, Edmond Seymore, usrbinkat, LangChain4j, Kacper Wikieł, Luke Pendergrass, John Detwiler, theTransient, Nathan LeClaire, Tiffany J. Kim, biorpg, Eugene Pentland, Stanislav Ovsiannikov, Fred von Graf, terasurfer, Kalila, Dan Guido, Nitin Borwankar, 阿明, Ai Maven, John Villwock, Gabriel Puliatti, Stephen Murray, Asp the Wyvern, danny, Chris Smitley, ReadyPlayerEmma, S_X, Daniel P. Andersen, Olakabola, Jeffrey Morgan, Imad Khwaja, Caitlyn Gatomon, webtim, Alicia Loh, Trenton Dambrowitz, Swaroop Kallakuri, Erik Bjäreholt, Leonard Tan, Spiking Neurons AB, Luke @flexchar, Ajan Kanaga, Thomas Belote, Deo Leter, RoA, Willem Michiel, transmissions 11, subjectnull, Matthew Berman, Joseph William Delisle, David Ziegler, Michael Davis, Johann-Peter Hartmann, Talal Aujan, senxiiz, Artur Olbinski, Rainer Wilmers, Spencer Kim, Fen Risland, Cap'n Zoog, Rishabh Srivastava, Michael Levine, Geoffrey Montalvo, Sean Connelly, Alexandros Triantafyllidis, Pieter, Gabriel Tamborski, Sam, Subspace Studios, Junyu Yang, Pedro Madruga, Vadim, Cory Kujawski, K, Raven Klaugh, Randy H, Mano Prime, Sebastain Graf, Space Cruiser
249
+
250
+
251
+ Thank you to all my generous patrons and donaters!
252
+
253
+ And thank you again to a16z for their generous grant.
254
+
255
+ <!-- footer end -->
256
+
257
+ # Original model card: The Royal Lab's Pygmalion 2 13B SuperCOT
258
+
259
+
260
+ # Model Card: Pygmalion-2-13b-SuperCOT
261
+
262
+ This is a merge between:
263
+ - [Pygmalion 2 13b](https://huggingface.co/PygmalionAI/pygmalion-2-13b)
264
+ - [Ausboss's Llama2 SuperCOT loras](https://huggingface.co/ausboss/llama2-13b-supercot-loras) at a weight of 1.00.
265
+
266
+ Quantizations provided by myself:
267
+ - [GGUF](https://huggingface.co/royallab/Pygmalion-2-13b-SuperCOT-GGUF)
268
+
269
+ The merge was performed by a commandline version of [EzTrainer](https://github.com/CoffeeVampir3/ez-trainer) by CoffeeVampire/Blackroot via [zaraki-tools](https://github.com/CoffeeVampir3/ez-trainer) by Zaraki.
270
+
271
+ The intended objective is to make Pygmalion-2 smarter and try to make it drift off less.
272
+
273
+ The SuperCOT lora was merged at a weight of 1.
274
+
275
+ ## Usage:
276
+
277
+ Since this is a merge between Pygmalion-2 and SuperCOT, the following instruction formats should work:
278
+
279
+ Metharme:
280
+
281
+ ```
282
+ <|system|>This is a text adventure game. Describe the scenario to the user and give him three options to pick from on each turn.<|user|>Start!<|model|>
283
+ ```
284
+
285
+ Alpaca:
286
+
287
+ ```
288
+ ### Instruction:
289
+ Your instruction or question here.
290
+ ### Response:
291
+ ```
292
+
293
+ ## Bias, Risks, and Limitations
294
+
295
+ The model will show biases similar to those observed in niche roleplaying forums on the Internet, besides those exhibited by the base model. It is not intended for supplying factual information or advice in any form.
296
+
297
+ ## Training Details
298
+
299
+ This model is merged and can be reproduced using the tools mentioned above. Please refer to all provided links for extra model-specific details.