TheBloke commited on
Commit
23f8970
1 Parent(s): 720c4da

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +292 -0
README.md ADDED
@@ -0,0 +1,292 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ inference: false
3
+ license: cc-by-nc-4.0
4
+ model_creator: Elinas
5
+ model_link: https://huggingface.co/elinas/chronos-70b-v2
6
+ model_name: Chronos 70B v2
7
+ model_type: llama
8
+ quantized_by: TheBloke
9
+ tags:
10
+ - chat
11
+ - roleplay
12
+ - storywriting
13
+ ---
14
+
15
+ <!-- header start -->
16
+ <!-- 200823 -->
17
+ <div style="width: auto; margin-left: auto; margin-right: auto">
18
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
19
+ </div>
20
+ <div style="display: flex; justify-content: space-between; width: 100%;">
21
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
22
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
23
+ </div>
24
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
25
+ <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>
26
+ </div>
27
+ </div>
28
+ <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>
29
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
30
+ <!-- header end -->
31
+
32
+ # Chronos 70B v2 - GPTQ
33
+ - Model creator: [Elinas](https://huggingface.co/elinas)
34
+ - Original model: [Chronos 70B v2](https://huggingface.co/elinas/chronos-70b-v2)
35
+
36
+ <!-- description start -->
37
+ ## Description
38
+
39
+ This repo contains GPTQ model files for [Elinas's Chronos 70B v2](https://huggingface.co/elinas/chronos-70b-v2).
40
+
41
+ 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.
42
+
43
+ <!-- description end -->
44
+ <!-- repositories-available start -->
45
+ ## Repositories available
46
+
47
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Chronos-70B-v2-GPTQ)
48
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Chronos-70B-v2-GGUF)
49
+ * [Elinas's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/elinas/chronos-70b-v2)
50
+ <!-- repositories-available end -->
51
+
52
+ <!-- prompt-template start -->
53
+ ## Prompt template: Alpaca
54
+
55
+ ```
56
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
57
+
58
+ ### Instruction:
59
+ {prompt}
60
+
61
+ ### Response:
62
+
63
+ ```
64
+
65
+ <!-- prompt-template end -->
66
+
67
+ <!-- README_GPTQ.md-provided-files start -->
68
+ ## Provided files and GPTQ parameters
69
+
70
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
71
+
72
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
73
+
74
+ 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.
75
+
76
+ <details>
77
+ <summary>Explanation of GPTQ parameters</summary>
78
+
79
+ - Bits: The bit size of the quantised model.
80
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
81
+ - 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.
82
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
83
+ - 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).
84
+ - 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.
85
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
86
+
87
+ </details>
88
+
89
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
90
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
91
+ | main | 4 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 35.33 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
92
+ | gptq-4bit-32g-actorder_True | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 40.66 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
93
+ | gptq-4bit-64g-actorder_True | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 37.99 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. |
94
+ | gptq-4bit-128g-actorder_True | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 36.65 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. |
95
+ | gptq-3bit--1g-actorder_True | 3 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 26.77 GB | No | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
96
+ | gptq-3bit-128g-actorder_True | 3 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 28.03 GB | No | 3-bit, with group size 128g and act-order. Higher quality than 128g-False but poor AutoGPTQ CUDA speed. |
97
+
98
+ <!-- README_GPTQ.md-provided-files end -->
99
+
100
+ <!-- README_GPTQ.md-download-from-branches start -->
101
+ ## How to download from branches
102
+
103
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Chronos-70B-v2-GPTQ:gptq-4bit-32g-actorder_True`
104
+ - With Git, you can clone a branch with:
105
+ ```
106
+ git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/Chronos-70B-v2-GPTQ
107
+ ```
108
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
109
+ <!-- README_GPTQ.md-download-from-branches end -->
110
+ <!-- README_GPTQ.md-text-generation-webui start -->
111
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
112
+
113
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
114
+
115
+ 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.
116
+
117
+ 1. Click the **Model tab**.
118
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Chronos-70B-v2-GPTQ`.
119
+ - To download from a specific branch, enter for example `TheBloke/Chronos-70B-v2-GPTQ:gptq-4bit-32g-actorder_True`
120
+ - see Provided Files above for the list of branches for each option.
121
+ 3. Click **Download**.
122
+ 4. The model will start downloading. Once it's finished it will say "Done".
123
+ 5. In the top left, click the refresh icon next to **Model**.
124
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Chronos-70B-v2-GPTQ`
125
+ 7. The model will automatically load, and is now ready for use!
126
+ 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.
127
+ * 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`.
128
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
129
+ <!-- README_GPTQ.md-text-generation-webui end -->
130
+
131
+ <!-- README_GPTQ.md-use-from-python start -->
132
+ ## How to use this GPTQ model from Python code
133
+
134
+ ### Install the necessary packages
135
+
136
+ Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
137
+
138
+ ```shell
139
+ pip3 install transformers>=4.32.0 optimum>=1.12.0
140
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
141
+ ```
142
+
143
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
144
+
145
+ ```shell
146
+ pip3 uninstall -y auto-gptq
147
+ git clone https://github.com/PanQiWei/AutoGPTQ
148
+ cd AutoGPTQ
149
+ pip3 install .
150
+ ```
151
+
152
+ ### For CodeLlama models only: you must use Transformers 4.33.0 or later.
153
+
154
+ If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
155
+ ```shell
156
+ pip3 uninstall -y transformers
157
+ pip3 install git+https://github.com/huggingface/transformers.git
158
+ ```
159
+
160
+ ### You can then use the following code
161
+
162
+ ```python
163
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
164
+
165
+ model_name_or_path = "TheBloke/Chronos-70B-v2-GPTQ"
166
+ # To use a different branch, change revision
167
+ # For example: revision="gptq-4bit-32g-actorder_True"
168
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
169
+ torch_dtype=torch.float16,
170
+ device_map="auto",
171
+ revision="main")
172
+
173
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
174
+
175
+ prompt = "Tell me about AI"
176
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
177
+
178
+ ### Instruction:
179
+ {prompt}
180
+
181
+ ### Response:
182
+
183
+ '''
184
+
185
+ print("\n\n*** Generate:")
186
+
187
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
188
+ output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
189
+ print(tokenizer.decode(output[0]))
190
+
191
+ # Inference can also be done using transformers' pipeline
192
+
193
+ print("*** Pipeline:")
194
+ pipe = pipeline(
195
+ "text-generation",
196
+ model=model,
197
+ tokenizer=tokenizer,
198
+ max_new_tokens=512,
199
+ temperature=0.7,
200
+ top_p=0.95,
201
+ repetition_penalty=1.15
202
+ )
203
+
204
+ print(pipe(prompt_template)[0]['generated_text'])
205
+ ```
206
+ <!-- README_GPTQ.md-use-from-python end -->
207
+
208
+ <!-- README_GPTQ.md-compatibility start -->
209
+ ## Compatibility
210
+
211
+ 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).
212
+
213
+ [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.
214
+
215
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
216
+ <!-- README_GPTQ.md-compatibility end -->
217
+
218
+ <!-- footer start -->
219
+ <!-- 200823 -->
220
+ ## Discord
221
+
222
+ For further support, and discussions on these models and AI in general, join us at:
223
+
224
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
225
+
226
+ ## Thanks, and how to contribute.
227
+
228
+ Thanks to the [chirper.ai](https://chirper.ai) team!
229
+
230
+ 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.
231
+
232
+ 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.
233
+
234
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
235
+
236
+ * Patreon: https://patreon.com/TheBlokeAI
237
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
238
+
239
+ **Special thanks to**: Aemon Algiz.
240
+
241
+ **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
242
+
243
+
244
+ Thank you to all my generous patrons and donaters!
245
+
246
+ And thank you again to a16z for their generous grant.
247
+
248
+ <!-- footer end -->
249
+
250
+ # Original model card: Elinas's Chronos 70B v2
251
+
252
+
253
+ # chronos-70b-v2
254
+
255
+ This is the FP16 PyTorch / HF version of **chronos-70b-v2** based on the **Llama v2 Base** model.
256
+
257
+ Big thank you to the Pygmalion team for providing compute. Reach out to me if you would like individual credit.
258
+
259
+ This model is primarily focused on chat, roleplay, storywriting, with significantly improved reasoning and logic. It does not have any form of censorship, please use responsibly.
260
+
261
+ Chronos can generate very long outputs with coherent text, largely due to the human inputs it was trained on, and it supports context length up to 4096 tokens.
262
+
263
+ ## License
264
+
265
+ This model is strictly [*non-commercial*](https://creativecommons.org/licenses/by-nc/4.0/) (**cc-by-nc-4.0**) use only which takes priority over the **LLAMA 2 COMMUNITY LICENSE AGREEMENT**. If you'd like to discuss using it for your business, contact Elinas through Discord **elinas**, or X (Twitter) **@officialelinas**.
266
+
267
+ The "Model" is completely free (ie. base model, derivates, merges/mixes) to use for non-commercial purposes as long as the the included **cc-by-nc-4.0** license in any parent repository, and the non-commercial use statute remains, regardless of other models' licences.
268
+ At the moment, only 70b models released will be under this license and the terms may change at any time (ie. a more permissive license allowing commercial use).
269
+
270
+ ## Model Usage
271
+
272
+ This model uses Alpaca formatting, so for optimal model performance, use it to start the dialogue or story, and if you use a frontend like SillyTavern ENABLE Alpaca instruction mode:
273
+
274
+ ```
275
+ ### Instruction:
276
+ Your instruction or question here.
277
+ ### Response:
278
+ ```
279
+ Not using the format will make the model perform significantly worse than intended.
280
+
281
+ ## Other Versions
282
+
283
+ [GGML Versions provided by @TheBloke]()
284
+
285
+ [4bit GPTQ Quantized version]()
286
+
287
+ Only use this version for further quantization or if you would like to run in full precision, as long as you have the VRAM required.
288
+
289
+
290
+ **Support Development of New Models**
291
+ <a href='https://ko-fi.com/Q5Q6MB734' target='_blank'><img height='36' style='border:0px;height:36px;'
292
+ src='https://storage.ko-fi.com/cdn/kofi1.png?v=3' border='0' alt='Support Development' /></a>