TheBloke commited on
Commit
8f26a3b
1 Parent(s): 2f969a8

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +333 -0
README.md ADDED
@@ -0,0 +1,333 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: https://huggingface.co/totally-not-an-llm/EverythingLM-13b-V3-16k
3
+ datasets:
4
+ - totally-not-an-llm/EverythingLM-data-V3
5
+ inference: false
6
+ license: llama2
7
+ model_creator: Kai Howard
8
+ model_name: EverythingLM 13B V3 16K
9
+ model_type: llama
10
+ prompt_template: 'USER: {prompt}
11
+
12
+ ASSISTANT:
13
+
14
+ '
15
+ quantized_by: TheBloke
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
+ # EverythingLM 13B V3 16K - GPTQ
36
+ - Model creator: [Kai Howard](https://huggingface.co/totally-not-an-llm)
37
+ - Original model: [EverythingLM 13B V3 16K](https://huggingface.co/totally-not-an-llm/EverythingLM-13b-V3-16k)
38
+
39
+ <!-- description start -->
40
+ ## Description
41
+
42
+ This repo contains GPTQ model files for [Kai Howard's EverythingLM 13B V3 16K](https://huggingface.co/totally-not-an-llm/EverythingLM-13b-V3-16k).
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
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/EverythingLM-13B-V3-16K-AWQ)
51
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/EverythingLM-13B-V3-16K-GPTQ)
52
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/EverythingLM-13B-V3-16K-GGUF)
53
+ * [Kai Howard's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/totally-not-an-llm/EverythingLM-13b-V3-16k)
54
+ <!-- repositories-available end -->
55
+
56
+ <!-- prompt-template start -->
57
+ ## Prompt template: User-Assistant
58
+
59
+ ```
60
+ USER: {prompt}
61
+ ASSISTANT:
62
+
63
+ ```
64
+
65
+ <!-- prompt-template end -->
66
+
67
+
68
+ <!-- README_GPTQ.md-provided-files start -->
69
+ ## Provided files, and GPTQ parameters
70
+
71
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
72
+
73
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
74
+
75
+ 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.
76
+
77
+ <details>
78
+ <summary>Explanation of GPTQ parameters</summary>
79
+
80
+ - Bits: The bit size of the quantised model.
81
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
82
+ - 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.
83
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
84
+ - GPTQ dataset: The calibration dataset used during quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ calibration 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).
85
+ - 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.
86
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
87
+
88
+ </details>
89
+
90
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
91
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
92
+ | [main](https://huggingface.co/TheBloke/EverythingLM-13B-V3-16K-GPTQ/tree/main) | 4 | 128 | Yes | 0.1 | [c4](https://huggingface.co/datasets/allenai/c4) | 8192 | 7.26 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
93
+ | [gptq-4-32g-actorder_True](https://huggingface.co/TheBloke/EverythingLM-13B-V3-16K-GPTQ/tree/gptq-4-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [c4](https://huggingface.co/datasets/allenai/c4) | 8192 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
94
+ | [gptq-8--1g-actorder_True](https://huggingface.co/TheBloke/EverythingLM-13B-V3-16K-GPTQ/tree/gptq-8--1g-actorder_True) | 8 | None | Yes | 0.1 | [c4](https://huggingface.co/datasets/allenai/c4) | 8192 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
95
+ | [gptq-8-128g-actorder_True](https://huggingface.co/TheBloke/EverythingLM-13B-V3-16K-GPTQ/tree/gptq-8-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [c4](https://huggingface.co/datasets/allenai/c4) | 8192 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
96
+ | [gptq-8-32g-actorder_True](https://huggingface.co/TheBloke/EverythingLM-13B-V3-16K-GPTQ/tree/gptq-8-32g-actorder_True) | 8 | 32 | Yes | 0.1 | [c4](https://huggingface.co/datasets/allenai/c4) | 8192 | 14.54 GB | No | 8-bit, with group size 32g and Act Order for maximum inference quality. |
97
+ | [gptq-4-64g-actorder_True](https://huggingface.co/TheBloke/EverythingLM-13B-V3-16K-GPTQ/tree/gptq-4-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [c4](https://huggingface.co/datasets/allenai/c4) | 8192 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
98
+
99
+ <!-- README_GPTQ.md-provided-files end -->
100
+
101
+ <!-- README_GPTQ.md-download-from-branches start -->
102
+ ## How to download, including from branches
103
+
104
+ ### In text-generation-webui
105
+
106
+ To download from the `main` branch, enter `TheBloke/EverythingLM-13B-V3-16K-GPTQ` in the "Download model" box.
107
+
108
+ To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/EverythingLM-13B-V3-16K-GPTQ:gptq-4-32g-actorder_True`
109
+
110
+ ### From the command line
111
+
112
+ I recommend using the `huggingface-hub` Python library:
113
+
114
+ ```shell
115
+ pip3 install huggingface-hub
116
+ ```
117
+
118
+ To download the `main` branch to a folder called `EverythingLM-13B-V3-16K-GPTQ`:
119
+
120
+ ```shell
121
+ mkdir EverythingLM-13B-V3-16K-GPTQ
122
+ huggingface-cli download TheBloke/EverythingLM-13B-V3-16K-GPTQ --local-dir EverythingLM-13B-V3-16K-GPTQ --local-dir-use-symlinks False
123
+ ```
124
+
125
+ To download from a different branch, add the `--revision` parameter:
126
+
127
+ ```shell
128
+ mkdir EverythingLM-13B-V3-16K-GPTQ
129
+ huggingface-cli download TheBloke/EverythingLM-13B-V3-16K-GPTQ --revision gptq-4-32g-actorder_True --local-dir EverythingLM-13B-V3-16K-GPTQ --local-dir-use-symlinks False
130
+ ```
131
+
132
+ <details>
133
+ <summary>More advanced huggingface-cli download usage</summary>
134
+
135
+ If you remove the `--local-dir-use-symlinks False` parameter, the files will instead be stored in the central Huggingface cache directory (default location on Linux is: `~/.cache/huggingface`), and symlinks will be added to the specified `--local-dir`, pointing to their real location in the cache. This allows for interrupted downloads to be resumed, and allows you to quickly clone the repo to multiple places on disk without triggering a download again. The downside, and the reason why I don't list that as the default option, is that the files are then hidden away in a cache folder and it's harder to know where your disk space is being used, and to clear it up if/when you want to remove a download model.
136
+
137
+ The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
138
+
139
+ For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
140
+
141
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
142
+
143
+ ```shell
144
+ pip3 install hf_transfer
145
+ ```
146
+
147
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
148
+
149
+ ```shell
150
+ mkdir EverythingLM-13B-V3-16K-GPTQ
151
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/EverythingLM-13B-V3-16K-GPTQ --local-dir EverythingLM-13B-V3-16K-GPTQ --local-dir-use-symlinks False
152
+ ```
153
+
154
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
155
+ </details>
156
+
157
+ ### With `git` (**not** recommended)
158
+
159
+ To clone a specific branch with `git`, use a command like this:
160
+
161
+ ```shell
162
+ git clone --single-branch --branch gptq-4-32g-actorder_True https://huggingface.co/TheBloke/EverythingLM-13B-V3-16K-GPTQ
163
+ ```
164
+
165
+ Note that using Git with HF repos is strongly discouraged. It will be much slower than using `huggingface-hub`, and will use twice as much disk space as it has to store the model files twice (it stores every byte both in the intended target folder, and again in the `.git` folder as a blob.)
166
+
167
+ <!-- README_GPTQ.md-download-from-branches end -->
168
+ <!-- README_GPTQ.md-text-generation-webui start -->
169
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
170
+
171
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
172
+
173
+ 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.
174
+
175
+ 1. Click the **Model tab**.
176
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/EverythingLM-13B-V3-16K-GPTQ`.
177
+ - To download from a specific branch, enter for example `TheBloke/EverythingLM-13B-V3-16K-GPTQ:gptq-4-32g-actorder_True`
178
+ - see Provided Files above for the list of branches for each option.
179
+ 3. Click **Download**.
180
+ 4. The model will start downloading. Once it's finished it will say "Done".
181
+ 5. In the top left, click the refresh icon next to **Model**.
182
+ 6. In the **Model** dropdown, choose the model you just downloaded: `EverythingLM-13B-V3-16K-GPTQ`
183
+ 7. The model will automatically load, and is now ready for use!
184
+ 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.
185
+ * 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`.
186
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
187
+ <!-- README_GPTQ.md-text-generation-webui end -->
188
+
189
+ <!-- README_GPTQ.md-use-from-python start -->
190
+ ## How to use this GPTQ model from Python code
191
+
192
+ ### Install the necessary packages
193
+
194
+ Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
195
+
196
+ ```shell
197
+ pip3 install transformers optimum
198
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
199
+ ```
200
+
201
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
202
+
203
+ ```shell
204
+ pip3 uninstall -y auto-gptq
205
+ git clone https://github.com/PanQiWei/AutoGPTQ
206
+ cd AutoGPTQ
207
+ git checkout v0.4.2
208
+ pip3 install .
209
+ ```
210
+
211
+ ### You can then use the following code
212
+
213
+ ```python
214
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
215
+
216
+ model_name_or_path = "TheBloke/EverythingLM-13B-V3-16K-GPTQ"
217
+ # To use a different branch, change revision
218
+ # For example: revision="gptq-4-32g-actorder_True"
219
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
220
+ device_map="auto",
221
+ trust_remote_code=False,
222
+ revision="main")
223
+
224
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
225
+
226
+ prompt = "Tell me about AI"
227
+ prompt_template=f'''USER: {prompt}
228
+ ASSISTANT:
229
+ '''
230
+
231
+ print("\n\n*** Generate:")
232
+
233
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
234
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
235
+ print(tokenizer.decode(output[0]))
236
+
237
+ # Inference can also be done using transformers' pipeline
238
+
239
+ print("*** Pipeline:")
240
+ pipe = pipeline(
241
+ "text-generation",
242
+ model=model,
243
+ tokenizer=tokenizer,
244
+ max_new_tokens=512,
245
+ do_sample=True,
246
+ temperature=0.7,
247
+ top_p=0.95,
248
+ top_k=40,
249
+ repetition_penalty=1.1
250
+ )
251
+
252
+ print(pipe(prompt_template)[0]['generated_text'])
253
+ ```
254
+ <!-- README_GPTQ.md-use-from-python end -->
255
+
256
+ <!-- README_GPTQ.md-compatibility start -->
257
+ ## Compatibility
258
+
259
+ 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).
260
+
261
+ [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.
262
+
263
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
264
+ <!-- README_GPTQ.md-compatibility end -->
265
+
266
+ <!-- footer start -->
267
+ <!-- 200823 -->
268
+ ## Discord
269
+
270
+ For further support, and discussions on these models and AI in general, join us at:
271
+
272
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
273
+
274
+ ## Thanks, and how to contribute
275
+
276
+ Thanks to the [chirper.ai](https://chirper.ai) team!
277
+
278
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
279
+
280
+ 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.
281
+
282
+ 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.
283
+
284
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
285
+
286
+ * Patreon: https://patreon.com/TheBlokeAI
287
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
288
+
289
+ **Special thanks to**: Aemon Algiz.
290
+
291
+ **Patreon special mentions**: Alicia Loh, Stephen Murray, K, Ajan Kanaga, RoA, Magnesian, Deo Leter, Olakabola, Eugene Pentland, zynix, Deep Realms, Raymond Fosdick, Elijah Stavena, Iucharbius, Erik Bjäreholt, Luis Javier Navarrete Lozano, Nicholas, theTransient, John Detwiler, alfie_i, knownsqashed, Mano Prime, Willem Michiel, Enrico Ros, LangChain4j, OG, Michael Dempsey, Pierre Kircher, Pedro Madruga, James Bentley, Thomas Belote, Luke @flexchar, Leonard Tan, Johann-Peter Hartmann, Illia Dulskyi, Fen Risland, Chadd, S_X, Jeff Scroggin, Ken Nordquist, Sean Connelly, Artur Olbinski, Swaroop Kallakuri, Jack West, Ai Maven, David Ziegler, Russ Johnson, transmissions 11, John Villwock, Alps Aficionado, Clay Pascal, Viktor Bowallius, Subspace Studios, Rainer Wilmers, Trenton Dambrowitz, vamX, Michael Levine, 준교 김, Brandon Frisco, Kalila, Trailburnt, Randy H, Talal Aujan, Nathan Dryer, Vadim, 阿明, ReadyPlayerEmma, Tiffany J. Kim, George Stoitzev, Spencer Kim, Jerry Meng, Gabriel Tamborski, Cory Kujawski, Jeffrey Morgan, Spiking Neurons AB, Edmond Seymore, Alexandros Triantafyllidis, Lone Striker, Cap'n Zoog, Nikolai Manek, danny, ya boyyy, Derek Yates, usrbinkat, Mandus, TL, Nathan LeClaire, subjectnull, Imad Khwaja, webtim, Raven Klaugh, Asp the Wyvern, Gabriel Puliatti, Caitlyn Gatomon, Joseph William Delisle, Jonathan Leane, Luke Pendergrass, SuperWojo, Sebastain Graf, Will Dee, Fred von Graf, Andrey, Dan Guido, Daniel P. Andersen, Nitin Borwankar, Elle, Vitor Caleffi, biorpg, jjj, NimbleBox.ai, Pieter, Matthew Berman, terasurfer, Michael Davis, Alex, Stanislav Ovsiannikov
292
+
293
+
294
+ Thank you to all my generous patrons and donaters!
295
+
296
+ And thank you again to a16z for their generous grant.
297
+
298
+ <!-- footer end -->
299
+
300
+ # Original model card: Kai Howard's EverythingLM 13B V3 16K
301
+
302
+
303
+ # EverythingLM-13b-V3-16k
304
+
305
+ Introducing EverythingLM, a llama-2 based, general-purpose 13b model with 16k context thanks to LlongMa. The model is trained on the EverythingLM-V3 dataset, more info can be found on the dataset page.
306
+
307
+ The model is completely uncensored.
308
+
309
+ Despite being "uncensored", the base model might be resistant; you might have to prompt-engineer certain prompts.
310
+
311
+ ### Notable features:
312
+ - Automatically triggered CoT reasoning.
313
+ - Verbose and detailed replies.
314
+ - Creative stories.
315
+ - Good prompt understanding.
316
+
317
+ ### Differences from V2:
318
+ - Much more uncensored.
319
+ - Actual roleplaying ability now!
320
+ - General all around improvements thanks to the new dataset. Check out the dataset for more info.
321
+
322
+ ### Prompt format (Alpaca-chat):
323
+
324
+ ```
325
+ USER: <prompt>
326
+ ASSISTANT:
327
+ ```
328
+
329
+ ### Future plans:
330
+ - Highest priority right now is V3.1 with more optimized training and iterative dataset improvements based on testing.
331
+
332
+ ### Note:
333
+ Through testing V2, I realized some alignment data had leaked in, causing the model to be less cooperative then intended. This model should do much better due to stricter filetering.