TheBloke commited on
Commit
632d19e
1 Parent(s): 2ba0e89

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +513 -0
README.md ADDED
@@ -0,0 +1,513 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Undi95/toxicqa-Llama2-13B
3
+ inference: false
4
+ library_name: peft
5
+ license: other
6
+ model-index:
7
+ - name: NobodyExistsOnTheInternet/ToxicQAtextFiltered
8
+ results: []
9
+ model_creator: Undi
10
+ model_name: ToxicQA Llama2 13B
11
+ model_type: llama
12
+ prompt_template: '{prompt}
13
+
14
+ '
15
+ quantized_by: TheBloke
16
+ tags:
17
+ - generated_from_trainer
18
+ ---
19
+ <!-- markdownlint-disable MD041 -->
20
+
21
+ <!-- header start -->
22
+ <!-- 200823 -->
23
+ <div style="width: auto; margin-left: auto; margin-right: auto">
24
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
25
+ </div>
26
+ <div style="display: flex; justify-content: space-between; width: 100%;">
27
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
28
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
29
+ </div>
30
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
31
+ <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>
32
+ </div>
33
+ </div>
34
+ <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>
35
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
36
+ <!-- header end -->
37
+
38
+ # ToxicQA Llama2 13B - GPTQ
39
+ - Model creator: [Undi](https://huggingface.co/Undi95)
40
+ - Original model: [ToxicQA Llama2 13B](https://huggingface.co/Undi95/toxicqa-Llama2-13B)
41
+
42
+ <!-- description start -->
43
+ # Description
44
+
45
+ This repo contains GPTQ model files for [Undi's ToxicQA Llama2 13B](https://huggingface.co/Undi95/toxicqa-Llama2-13B).
46
+
47
+ 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.
48
+
49
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
50
+
51
+ <!-- description end -->
52
+ <!-- repositories-available start -->
53
+ ## Repositories available
54
+
55
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/toxicqa-Llama2-13B-AWQ)
56
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/toxicqa-Llama2-13B-GPTQ)
57
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/toxicqa-Llama2-13B-GGUF)
58
+ * [Undi's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Undi95/toxicqa-Llama2-13B)
59
+ <!-- repositories-available end -->
60
+
61
+ <!-- prompt-template start -->
62
+ ## Prompt template: Unknown
63
+
64
+ ```
65
+ {prompt}
66
+
67
+ ```
68
+
69
+ <!-- prompt-template end -->
70
+
71
+
72
+
73
+ <!-- README_GPTQ.md-compatible clients start -->
74
+ ## Known compatible clients / servers
75
+
76
+ GPTQ models are currently supported on Linux (NVidia/AMD) and Windows (NVidia only). macOS users: please use GGUF models.
77
+
78
+ These GPTQ models are known to work in the following inference servers/webuis.
79
+
80
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
81
+ - [KoboldAI United](https://github.com/henk717/koboldai)
82
+ - [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui)
83
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
84
+
85
+ This may not be a complete list; if you know of others, please let me know!
86
+ <!-- README_GPTQ.md-compatible clients end -->
87
+
88
+ <!-- README_GPTQ.md-provided-files start -->
89
+ ## Provided files, and GPTQ parameters
90
+
91
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
92
+
93
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
94
+
95
+ Most GPTQ files are made with AutoGPTQ. Mistral models are currently made with Transformers.
96
+
97
+ <details>
98
+ <summary>Explanation of GPTQ parameters</summary>
99
+
100
+ - Bits: The bit size of the quantised model.
101
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
102
+ - 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.
103
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
104
+ - 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).
105
+ - 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.
106
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama and Mistral models in 4-bit.
107
+
108
+ </details>
109
+
110
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
111
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
112
+ | [main](https://huggingface.co/TheBloke/toxicqa-Llama2-13B-GPTQ/tree/main) | 4 | 128 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 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. |
113
+ | [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/toxicqa-Llama2-13B-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 8.00 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
114
+ | [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/toxicqa-Llama2-13B-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 13.36 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
115
+ | [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/toxicqa-Llama2-13B-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 13.65 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
116
+ | [gptq-8bit-32g-actorder_True](https://huggingface.co/TheBloke/toxicqa-Llama2-13B-GPTQ/tree/gptq-8bit-32g-actorder_True) | 8 | 32 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 14.54 GB | No | 8-bit, with group size 32g and Act Order for maximum inference quality. |
117
+ | [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/toxicqa-Llama2-13B-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 4096 | 7.51 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
118
+
119
+ <!-- README_GPTQ.md-provided-files end -->
120
+
121
+ <!-- README_GPTQ.md-download-from-branches start -->
122
+ ## How to download, including from branches
123
+
124
+ ### In text-generation-webui
125
+
126
+ To download from the `main` branch, enter `TheBloke/toxicqa-Llama2-13B-GPTQ` in the "Download model" box.
127
+
128
+ To download from another branch, add `:branchname` to the end of the download name, eg `TheBloke/toxicqa-Llama2-13B-GPTQ:gptq-4bit-32g-actorder_True`
129
+
130
+ ### From the command line
131
+
132
+ I recommend using the `huggingface-hub` Python library:
133
+
134
+ ```shell
135
+ pip3 install huggingface-hub
136
+ ```
137
+
138
+ To download the `main` branch to a folder called `toxicqa-Llama2-13B-GPTQ`:
139
+
140
+ ```shell
141
+ mkdir toxicqa-Llama2-13B-GPTQ
142
+ huggingface-cli download TheBloke/toxicqa-Llama2-13B-GPTQ --local-dir toxicqa-Llama2-13B-GPTQ --local-dir-use-symlinks False
143
+ ```
144
+
145
+ To download from a different branch, add the `--revision` parameter:
146
+
147
+ ```shell
148
+ mkdir toxicqa-Llama2-13B-GPTQ
149
+ huggingface-cli download TheBloke/toxicqa-Llama2-13B-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir toxicqa-Llama2-13B-GPTQ --local-dir-use-symlinks False
150
+ ```
151
+
152
+ <details>
153
+ <summary>More advanced huggingface-cli download usage</summary>
154
+
155
+ If you remove the `--local-dir-use-symlinks False` parameter, the files will instead be stored in the central Hugging Face 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.
156
+
157
+ The cache location can be changed with the `HF_HOME` environment variable, and/or the `--cache-dir` parameter to `huggingface-cli`.
158
+
159
+ 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).
160
+
161
+ To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
162
+
163
+ ```shell
164
+ pip3 install hf_transfer
165
+ ```
166
+
167
+ And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
168
+
169
+ ```shell
170
+ mkdir toxicqa-Llama2-13B-GPTQ
171
+ HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/toxicqa-Llama2-13B-GPTQ --local-dir toxicqa-Llama2-13B-GPTQ --local-dir-use-symlinks False
172
+ ```
173
+
174
+ Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
175
+ </details>
176
+
177
+ ### With `git` (**not** recommended)
178
+
179
+ To clone a specific branch with `git`, use a command like this:
180
+
181
+ ```shell
182
+ git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/toxicqa-Llama2-13B-GPTQ
183
+ ```
184
+
185
+ 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.)
186
+
187
+ <!-- README_GPTQ.md-download-from-branches end -->
188
+ <!-- README_GPTQ.md-text-generation-webui start -->
189
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
190
+
191
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
192
+
193
+ 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.
194
+
195
+ 1. Click the **Model tab**.
196
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/toxicqa-Llama2-13B-GPTQ`.
197
+
198
+ - To download from a specific branch, enter for example `TheBloke/toxicqa-Llama2-13B-GPTQ:gptq-4bit-32g-actorder_True`
199
+ - see Provided Files above for the list of branches for each option.
200
+
201
+ 3. Click **Download**.
202
+ 4. The model will start downloading. Once it's finished it will say "Done".
203
+ 5. In the top left, click the refresh icon next to **Model**.
204
+ 6. In the **Model** dropdown, choose the model you just downloaded: `toxicqa-Llama2-13B-GPTQ`
205
+ 7. The model will automatically load, and is now ready for use!
206
+ 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.
207
+
208
+ - 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`.
209
+
210
+ 9. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
211
+
212
+ <!-- README_GPTQ.md-text-generation-webui end -->
213
+
214
+ <!-- README_GPTQ.md-use-from-tgi start -->
215
+ ## Serving this model from Text Generation Inference (TGI)
216
+
217
+ It's recommended to use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
218
+
219
+ Example Docker parameters:
220
+
221
+ ```shell
222
+ --model-id TheBloke/toxicqa-Llama2-13B-GPTQ --port 3000 --quantize gptq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
223
+ ```
224
+
225
+ Example Python code for interfacing with TGI (requires huggingface-hub 0.17.0 or later):
226
+
227
+ ```shell
228
+ pip3 install huggingface-hub
229
+ ```
230
+
231
+ ```python
232
+ from huggingface_hub import InferenceClient
233
+
234
+ endpoint_url = "https://your-endpoint-url-here"
235
+
236
+ prompt = "Tell me about AI"
237
+ prompt_template=f'''{prompt}
238
+ '''
239
+
240
+ client = InferenceClient(endpoint_url)
241
+ response = client.text_generation(
242
+ prompt_template,
243
+ max_new_tokens=128,
244
+ do_sample=True,
245
+ temperature=0.7,
246
+ top_p=0.95,
247
+ top_k=40,
248
+ repetition_penalty=1.1
249
+ )
250
+
251
+ print(f"Model output: {response}")
252
+ ```
253
+ <!-- README_GPTQ.md-use-from-tgi end -->
254
+ <!-- README_GPTQ.md-use-from-python start -->
255
+ ## Python code example: inference from this GPTQ model
256
+
257
+ ### Install the necessary packages
258
+
259
+ Requires: Transformers 4.33.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
260
+
261
+ ```shell
262
+ pip3 install --upgrade transformers optimum
263
+ # If using PyTorch 2.1 + CUDA 12.x:
264
+ pip3 install --upgrade auto-gptq
265
+ # or, if using PyTorch 2.1 + CUDA 11.x:
266
+ pip3 install --upgrade auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/
267
+ ```
268
+
269
+ If you are using PyTorch 2.0, you will need to install AutoGPTQ from source. Likewise if you have problems with the pre-built wheels, you should try building from source:
270
+
271
+ ```shell
272
+ pip3 uninstall -y auto-gptq
273
+ git clone https://github.com/PanQiWei/AutoGPTQ
274
+ cd AutoGPTQ
275
+ git checkout v0.5.1
276
+ pip3 install .
277
+ ```
278
+
279
+ ### Example Python code
280
+
281
+ ```python
282
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
283
+
284
+ model_name_or_path = "TheBloke/toxicqa-Llama2-13B-GPTQ"
285
+ # To use a different branch, change revision
286
+ # For example: revision="gptq-4bit-32g-actorder_True"
287
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
288
+ device_map="auto",
289
+ trust_remote_code=False,
290
+ revision="main")
291
+
292
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
293
+
294
+ prompt = "Write a story about llamas"
295
+ system_message = "You are a story writing assistant"
296
+ prompt_template=f'''{prompt}
297
+ '''
298
+
299
+ print("\n\n*** Generate:")
300
+
301
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
302
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
303
+ print(tokenizer.decode(output[0]))
304
+
305
+ # Inference can also be done using transformers' pipeline
306
+
307
+ print("*** Pipeline:")
308
+ pipe = pipeline(
309
+ "text-generation",
310
+ model=model,
311
+ tokenizer=tokenizer,
312
+ max_new_tokens=512,
313
+ do_sample=True,
314
+ temperature=0.7,
315
+ top_p=0.95,
316
+ top_k=40,
317
+ repetition_penalty=1.1
318
+ )
319
+
320
+ print(pipe(prompt_template)[0]['generated_text'])
321
+ ```
322
+ <!-- README_GPTQ.md-use-from-python end -->
323
+
324
+ <!-- README_GPTQ.md-compatibility start -->
325
+ ## Compatibility
326
+
327
+ The files provided are tested to work with Transformers. For non-Mistral models, AutoGPTQ can also be used directly.
328
+
329
+ [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama architecture models (including Mistral, Yi, DeepSeek, SOLAR, etc) in 4-bit. Please see the Provided Files table above for per-file compatibility.
330
+
331
+ For a list of clients/servers, please see "Known compatible clients / servers", above.
332
+ <!-- README_GPTQ.md-compatibility end -->
333
+
334
+ <!-- footer start -->
335
+ <!-- 200823 -->
336
+ ## Discord
337
+
338
+ For further support, and discussions on these models and AI in general, join us at:
339
+
340
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
341
+
342
+ ## Thanks, and how to contribute
343
+
344
+ Thanks to the [chirper.ai](https://chirper.ai) team!
345
+
346
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
347
+
348
+ 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.
349
+
350
+ 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.
351
+
352
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
353
+
354
+ * Patreon: https://patreon.com/TheBlokeAI
355
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
356
+
357
+ **Special thanks to**: Aemon Algiz.
358
+
359
+ **Patreon special mentions**: Michael Levine, 阿明, Trailburnt, Nikolai Manek, John Detwiler, Randy H, Will Dee, Sebastain Graf, NimbleBox.ai, Eugene Pentland, Emad Mostaque, Ai Maven, Jim Angel, Jeff Scroggin, Michael Davis, Manuel Alberto Morcote, Stephen Murray, Robert, Justin Joy, Luke @flexchar, Brandon Frisco, Elijah Stavena, S_X, Dan Guido, Undi ., Komninos Chatzipapas, Shadi, theTransient, Lone Striker, Raven Klaugh, jjj, Cap'n Zoog, Michel-Marie MAUDET (LINAGORA), Matthew Berman, David, Fen Risland, Omer Bin Jawed, Luke Pendergrass, Kalila, OG, Erik Bjäreholt, Rooh Singh, Joseph William Delisle, Dan Lewis, TL, John Villwock, AzureBlack, Brad, Pedro Madruga, Caitlyn Gatomon, K, jinyuan sun, Mano Prime, Alex, Jeffrey Morgan, Alicia Loh, Illia Dulskyi, Chadd, transmissions 11, fincy, Rainer Wilmers, ReadyPlayerEmma, knownsqashed, Mandus, biorpg, Deo Leter, Brandon Phillips, SuperWojo, Sean Connelly, Iucharbius, Jack West, Harry Royden McLaughlin, Nicholas, terasurfer, Vitor Caleffi, Duane Dunston, Johann-Peter Hartmann, David Ziegler, Olakabola, Ken Nordquist, Trenton Dambrowitz, Tom X Nguyen, Vadim, Ajan Kanaga, Leonard Tan, Clay Pascal, Alexandros Triantafyllidis, JM33133, Xule, vamX, ya boyyy, subjectnull, Talal Aujan, Alps Aficionado, wassieverse, Ari Malik, James Bentley, Woland, Spencer Kim, Michael Dempsey, Fred von Graf, Elle, zynix, William Richards, Stanislav Ovsiannikov, Edmond Seymore, Jonathan Leane, Martin Kemka, usrbinkat, Enrico Ros
360
+
361
+
362
+ Thank you to all my generous patrons and donaters!
363
+
364
+ And thank you again to a16z for their generous grant.
365
+
366
+ <!-- footer end -->
367
+
368
+ # Original model card: Undi's ToxicQA Llama2 13B
369
+
370
+ # Disclaimer: Toxic Content
371
+
372
+ This model is based on a toxic dataset, and its responses may include content that is shocking or disturbing. It is essential to exercise caution and use the model moderately, considering that the generated content is algorithmically derived from the training data. This model is intended for uncensoring purposes only, and users assume responsibility for the interpretation and application of its outputs. I explicitly disclaim endorsement of any specific viewpoints represented in the training data. Additionally, it is crucial to note that the model should not be used for any illegal activities. Users are hereby informed that I am not responsible for any misuse or negative consequences arising from the model's use. Usage of this model implies agreement with these terms.
373
+
374
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
375
+ should probably proofread and complete it, then remove this comment. -->
376
+
377
+ [<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)
378
+ <details><summary>See axolotl config</summary>
379
+
380
+ axolotl version: `0.3.0`
381
+ ```yaml
382
+ base_model: NousResearch/Llama-2-13b-hf
383
+ model_type: LlamaForCausalLM
384
+ tokenizer_type: LlamaTokenizer
385
+ is_llama_derived_model: true
386
+
387
+ load_in_8bit: true
388
+ load_in_4bit: false
389
+ strict: false
390
+
391
+ datasets:
392
+ - path: dataset
393
+ type: sharegpt
394
+ dataset_prepared_path:
395
+ val_set_size: 0.05
396
+ output_dir: ./lora-out
397
+
398
+ sequence_len: 4096
399
+ sample_packing: true
400
+ pad_to_sequence_len: true
401
+
402
+ adapter: lora
403
+ lora_model_dir:
404
+ lora_r: 128
405
+ lora_alpha: 64
406
+ lora_dropout: 0.05
407
+ lora_target_linear: true
408
+ lora_fan_in_fan_out:
409
+
410
+ wandb_project: toxicLlama-2-13B
411
+ wandb_entity:
412
+ wandb_watch:
413
+ wandb_name:
414
+ wandb_log_model:
415
+
416
+ gradient_accumulation_steps: 1
417
+ micro_batch_size: 2
418
+ num_epochs: 2
419
+ optimizer: adamw_bnb_8bit
420
+ lr_scheduler: cosine
421
+ learning_rate: 0.0002
422
+ eval_batch_size: 2
423
+
424
+ train_on_inputs: false
425
+ group_by_length: false
426
+ bf16: true
427
+ fp16: false
428
+ tf32: false
429
+
430
+ gradient_checkpointing: true
431
+ early_stopping_patience:
432
+ resume_from_checkpoint:
433
+ local_rank:
434
+ logging_steps: 1
435
+ xformers_attention:
436
+ flash_attention: true
437
+
438
+ warmup_steps: 10
439
+ evals_per_epoch: 4
440
+ eval_table_size:
441
+ eval_table_max_new_tokens: 128
442
+ saves_per_epoch: 1
443
+ debug:
444
+ deepspeed:
445
+ weight_decay: 0.0
446
+ fsdp:
447
+ fsdp_config:
448
+ special_tokens:
449
+ bos_token: "<s>"
450
+ eos_token: "</s>"
451
+ unk_token: "<unk>"
452
+
453
+ ```
454
+
455
+ </details><br>
456
+
457
+ # NobodyExistsOnTheInternet/ToxicQAtextFiltered
458
+
459
+ This model is a fine-tuned version of [NousResearch/Llama-2-13b-hf](https://huggingface.co/NousResearch/Llama-2-13b-hf) on the [NobodyExistsOnTheInternet/ToxicQAtextFiltered](https://huggingface.co/datasets/NobodyExistsOnTheInternet/ToxicQAtextFiltered) dataset.
460
+ It achieves the following results on the evaluation set:
461
+ - Loss: 0.7634
462
+
463
+ ### Training hyperparameters
464
+
465
+ The following hyperparameters were used during training:
466
+ - learning_rate: 0.0002
467
+ - train_batch_size: 2
468
+ - eval_batch_size: 2
469
+ - seed: 42
470
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
471
+ - lr_scheduler_type: cosine
472
+ - lr_scheduler_warmup_steps: 10
473
+ - num_epochs: 2
474
+
475
+ ### Training results
476
+
477
+ | Training Loss | Epoch | Step | Validation Loss |
478
+ |:-------------:|:-----:|:----:|:---------------:|
479
+ | 1.0107 | 0.0 | 1 | 1.0286 |
480
+ | 0.8198 | 0.25 | 152 | 0.8079 |
481
+ | 0.7993 | 0.5 | 304 | 0.7904 |
482
+ | 0.7348 | 0.75 | 456 | 0.7748 |
483
+ | 0.689 | 1.0 | 608 | 0.7638 |
484
+ | 0.6462 | 1.23 | 760 | 0.7729 |
485
+ | 0.6226 | 1.48 | 912 | 0.7657 |
486
+ | 0.6179 | 1.73 | 1064 | 0.7634 |
487
+
488
+
489
+ ### Framework versions
490
+
491
+ - Transformers 4.36.2
492
+ - Pytorch 2.0.1+cu118
493
+ - Datasets 2.16.1
494
+ - Tokenizers 0.15.0
495
+ ## Training procedure
496
+
497
+
498
+ The following `bitsandbytes` quantization config was used during training:
499
+ - quant_method: bitsandbytes
500
+ - load_in_8bit: True
501
+ - load_in_4bit: False
502
+ - llm_int8_threshold: 6.0
503
+ - llm_int8_skip_modules: None
504
+ - llm_int8_enable_fp32_cpu_offload: False
505
+ - llm_int8_has_fp16_weight: False
506
+ - bnb_4bit_quant_type: fp4
507
+ - bnb_4bit_use_double_quant: False
508
+ - bnb_4bit_compute_dtype: float32
509
+
510
+ ### Framework versions
511
+
512
+
513
+ - PEFT 0.6.0