Text Generation
Transformers
Safetensors
llama
text-generation-inference
4-bit precision
awq
TheBloke commited on
Commit
1a561f9
1 Parent(s): d98cd0d

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +536 -0
README.md ADDED
@@ -0,0 +1,536 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: jondurbin/bagel-34b-v0.2
3
+ datasets:
4
+ - ai2_arc
5
+ - unalignment/spicy-3.1
6
+ - codeparrot/apps
7
+ - facebook/belebele
8
+ - boolq
9
+ - jondurbin/cinematika-v0.1
10
+ - drop
11
+ - lmsys/lmsys-chat-1m
12
+ - TIGER-Lab/MathInstruct
13
+ - cais/mmlu
14
+ - Muennighoff/natural-instructions
15
+ - openbookqa
16
+ - piqa
17
+ - Vezora/Tested-22k-Python-Alpaca
18
+ - cakiki/rosetta-code
19
+ - Open-Orca/SlimOrca
20
+ - spider
21
+ - squad_v2
22
+ - migtissera/Synthia-v1.3
23
+ - datasets/winogrande
24
+ - nvidia/HelpSteer
25
+ - Intel/orca_dpo_pairs
26
+ - unalignment/toxic-dpo-v0.1
27
+ - jondurbin/truthy-dpo-v0.1
28
+ - allenai/ultrafeedback_binarized_cleaned
29
+ - Squish42/bluemoon-fandom-1-1-rp-cleaned
30
+ - LDJnr/Capybara
31
+ - JULIELab/EmoBank
32
+ - kingbri/PIPPA-shareGPT
33
+ inference: false
34
+ license: other
35
+ license_link: https://huggingface.co/01-ai/Yi-34B-200K/blob/main/LICENSE
36
+ license_name: yi-license
37
+ model_creator: Jon Durbin
38
+ model_name: Bagel 34B v0.2
39
+ model_type: yi
40
+ prompt_template: 'Below is an instruction that describes a task. Write a response
41
+ that appropriately completes the request.
42
+
43
+
44
+ ### Instruction:
45
+
46
+ {system_message}
47
+
48
+ {prompt}
49
+
50
+
51
+ ### Response:
52
+
53
+ '
54
+ quantized_by: TheBloke
55
+ ---
56
+ <!-- markdownlint-disable MD041 -->
57
+
58
+ <!-- header start -->
59
+ <!-- 200823 -->
60
+ <div style="width: auto; margin-left: auto; margin-right: auto">
61
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
62
+ </div>
63
+ <div style="display: flex; justify-content: space-between; width: 100%;">
64
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
65
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
66
+ </div>
67
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
68
+ <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>
69
+ </div>
70
+ </div>
71
+ <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>
72
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
73
+ <!-- header end -->
74
+
75
+ # Bagel 34B v0.2 - AWQ
76
+ - Model creator: [Jon Durbin](https://huggingface.co/jondurbin)
77
+ - Original model: [Bagel 34B v0.2](https://huggingface.co/jondurbin/bagel-34b-v0.2)
78
+
79
+ <!-- description start -->
80
+ ## Description
81
+
82
+ This repo contains AWQ model files for [Jon Durbin's Bagel 34B v0.2](https://huggingface.co/jondurbin/bagel-34b-v0.2).
83
+
84
+ These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
85
+
86
+
87
+ ### About AWQ
88
+
89
+ AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
90
+
91
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
92
+
93
+ It is supported by:
94
+
95
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
96
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
97
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
98
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
99
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
100
+
101
+ <!-- description end -->
102
+ <!-- repositories-available start -->
103
+ ## Repositories available
104
+
105
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/bagel-34b-v0.2-AWQ)
106
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/bagel-34b-v0.2-GPTQ)
107
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/bagel-34b-v0.2-GGUF)
108
+ * [Jon Durbin's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/jondurbin/bagel-34b-v0.2)
109
+ <!-- repositories-available end -->
110
+
111
+ <!-- prompt-template start -->
112
+ ## Prompt template: Bagel-Alpaca
113
+
114
+ ```
115
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
116
+
117
+ ### Instruction:
118
+ {system_message}
119
+ {prompt}
120
+
121
+ ### Response:
122
+
123
+ ```
124
+
125
+ <!-- prompt-template end -->
126
+
127
+
128
+ <!-- README_AWQ.md-provided-files start -->
129
+ ## Provided files, and AWQ parameters
130
+
131
+ I currently release 128g GEMM models only. The addition of group_size 32 models, and GEMV kernel models, is being actively considered.
132
+
133
+ Models are released as sharded safetensors files.
134
+
135
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
136
+ | ------ | ---- | -- | ----------- | ------- | ---- |
137
+ | [main](https://huggingface.co/TheBloke/bagel-34b-v0.2-AWQ/tree/main) | 4 | 128 | [VMware Open Instruct](https://huggingface.co/datasets/VMware/open-instruct/viewer/) | 8192 | 19.23 GB
138
+
139
+ <!-- README_AWQ.md-provided-files end -->
140
+
141
+ <!-- README_AWQ.md-text-generation-webui start -->
142
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
143
+
144
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
145
+
146
+ 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.
147
+
148
+ 1. Click the **Model tab**.
149
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/bagel-34b-v0.2-AWQ`.
150
+ 3. Click **Download**.
151
+ 4. The model will start downloading. Once it's finished it will say "Done".
152
+ 5. In the top left, click the refresh icon next to **Model**.
153
+ 6. In the **Model** dropdown, choose the model you just downloaded: `bagel-34b-v0.2-AWQ`
154
+ 7. Select **Loader: AutoAWQ**.
155
+ 8. Click Load, and the model will load and is now ready for use.
156
+ 9. 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.
157
+ 10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
158
+ <!-- README_AWQ.md-text-generation-webui end -->
159
+
160
+ <!-- README_AWQ.md-use-from-vllm start -->
161
+ ## Multi-user inference server: vLLM
162
+
163
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
164
+
165
+ - Please ensure you are using vLLM version 0.2 or later.
166
+ - When using vLLM as a server, pass the `--quantization awq` parameter.
167
+
168
+ For example:
169
+
170
+ ```shell
171
+ python3 -m vllm.entrypoints.api_server --model TheBloke/bagel-34b-v0.2-AWQ --quantization awq --dtype auto
172
+ ```
173
+
174
+ - When using vLLM from Python code, again set `quantization=awq`.
175
+
176
+ For example:
177
+
178
+ ```python
179
+ from vllm import LLM, SamplingParams
180
+
181
+ prompts = [
182
+ "Tell me about AI",
183
+ "Write a story about llamas",
184
+ "What is 291 - 150?",
185
+ "How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
186
+ ]
187
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
188
+
189
+ ### Instruction:
190
+ {system_message}
191
+ {prompt}
192
+
193
+ ### Response:
194
+ '''
195
+
196
+ prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
197
+
198
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
199
+
200
+ llm = LLM(model="TheBloke/bagel-34b-v0.2-AWQ", quantization="awq", dtype="auto")
201
+
202
+ outputs = llm.generate(prompts, sampling_params)
203
+
204
+ # Print the outputs.
205
+ for output in outputs:
206
+ prompt = output.prompt
207
+ generated_text = output.outputs[0].text
208
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
209
+ ```
210
+ <!-- README_AWQ.md-use-from-vllm start -->
211
+
212
+ <!-- README_AWQ.md-use-from-tgi start -->
213
+ ## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
214
+
215
+ Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
216
+
217
+ Example Docker parameters:
218
+
219
+ ```shell
220
+ --model-id TheBloke/bagel-34b-v0.2-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
221
+ ```
222
+
223
+ Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
224
+
225
+ ```shell
226
+ pip3 install huggingface-hub
227
+ ```
228
+
229
+ ```python
230
+ from huggingface_hub import InferenceClient
231
+
232
+ endpoint_url = "https://your-endpoint-url-here"
233
+
234
+ prompt = "Tell me about AI"
235
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
236
+
237
+ ### Instruction:
238
+ {system_message}
239
+ {prompt}
240
+
241
+ ### Response:
242
+ '''
243
+
244
+ client = InferenceClient(endpoint_url)
245
+ response = client.text_generation(prompt,
246
+ max_new_tokens=128,
247
+ do_sample=True,
248
+ temperature=0.7,
249
+ top_p=0.95,
250
+ top_k=40,
251
+ repetition_penalty=1.1)
252
+
253
+ print(f"Model output: ", response)
254
+ ```
255
+ <!-- README_AWQ.md-use-from-tgi end -->
256
+
257
+ <!-- README_AWQ.md-use-from-python start -->
258
+ ## Inference from Python code using Transformers
259
+
260
+ ### Install the necessary packages
261
+
262
+ - Requires: [Transformers](https://huggingface.co/docs/transformers) 4.35.0 or later.
263
+ - Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.6 or later.
264
+
265
+ ```shell
266
+ pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0"
267
+ ```
268
+
269
+ Note that if you are using PyTorch 2.0.1, the above AutoAWQ command will automatically upgrade you to PyTorch 2.1.0.
270
+
271
+ If you are using CUDA 11.8 and wish to continue using PyTorch 2.0.1, instead run this command:
272
+
273
+ ```shell
274
+ pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl
275
+ ```
276
+
277
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
278
+
279
+ ```shell
280
+ pip3 uninstall -y autoawq
281
+ git clone https://github.com/casper-hansen/AutoAWQ
282
+ cd AutoAWQ
283
+ pip3 install .
284
+ ```
285
+
286
+ ### Transformers example code (requires Transformers 4.35.0 and later)
287
+
288
+ ```python
289
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
290
+
291
+ model_name_or_path = "TheBloke/bagel-34b-v0.2-AWQ"
292
+
293
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
294
+ model = AutoModelForCausalLM.from_pretrained(
295
+ model_name_or_path,
296
+ low_cpu_mem_usage=True,
297
+ device_map="cuda:0"
298
+ )
299
+
300
+ # Using the text streamer to stream output one token at a time
301
+ streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
302
+
303
+ prompt = "Tell me about AI"
304
+ prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
305
+
306
+ ### Instruction:
307
+ {system_message}
308
+ {prompt}
309
+
310
+ ### Response:
311
+ '''
312
+
313
+ # Convert prompt to tokens
314
+ tokens = tokenizer(
315
+ prompt_template,
316
+ return_tensors='pt'
317
+ ).input_ids.cuda()
318
+
319
+ generation_params = {
320
+ "do_sample": True,
321
+ "temperature": 0.7,
322
+ "top_p": 0.95,
323
+ "top_k": 40,
324
+ "max_new_tokens": 512,
325
+ "repetition_penalty": 1.1
326
+ }
327
+
328
+ # Generate streamed output, visible one token at a time
329
+ generation_output = model.generate(
330
+ tokens,
331
+ streamer=streamer,
332
+ **generation_params
333
+ )
334
+
335
+ # Generation without a streamer, which will include the prompt in the output
336
+ generation_output = model.generate(
337
+ tokens,
338
+ **generation_params
339
+ )
340
+
341
+ # Get the tokens from the output, decode them, print them
342
+ token_output = generation_output[0]
343
+ text_output = tokenizer.decode(token_output)
344
+ print("model.generate output: ", text_output)
345
+
346
+ # Inference is also possible via Transformers' pipeline
347
+ from transformers import pipeline
348
+
349
+ pipe = pipeline(
350
+ "text-generation",
351
+ model=model,
352
+ tokenizer=tokenizer,
353
+ **generation_params
354
+ )
355
+
356
+ pipe_output = pipe(prompt_template)[0]['generated_text']
357
+ print("pipeline output: ", pipe_output)
358
+
359
+ ```
360
+ <!-- README_AWQ.md-use-from-python end -->
361
+
362
+ <!-- README_AWQ.md-compatibility start -->
363
+ ## Compatibility
364
+
365
+ The files provided are tested to work with:
366
+
367
+ - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
368
+ - [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
369
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
370
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later.
371
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
372
+
373
+ <!-- README_AWQ.md-compatibility end -->
374
+
375
+ <!-- footer start -->
376
+ <!-- 200823 -->
377
+ ## Discord
378
+
379
+ For further support, and discussions on these models and AI in general, join us at:
380
+
381
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
382
+
383
+ ## Thanks, and how to contribute
384
+
385
+ Thanks to the [chirper.ai](https://chirper.ai) team!
386
+
387
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
388
+
389
+ 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.
390
+
391
+ 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.
392
+
393
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
394
+
395
+ * Patreon: https://patreon.com/TheBlokeAI
396
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
397
+
398
+ **Special thanks to**: Aemon Algiz.
399
+
400
+ **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
401
+
402
+
403
+ Thank you to all my generous patrons and donaters!
404
+
405
+ And thank you again to a16z for their generous grant.
406
+
407
+ <!-- footer end -->
408
+
409
+ # Original model card: Jon Durbin's Bagel 34B v0.2
410
+
411
+
412
+ # A bagel, with everything (except DPO)
413
+
414
+ ![bagel](bagel.png)
415
+
416
+ ## Overview
417
+
418
+ An experimental fine-tune of yi-34b-200k using [bagel](https://github.com/jondurbin/bagel)
419
+
420
+ This is the model after the SFT phase, before DPO has been applied. You'll likely want to use the DPO'd version, rather than this one, but since I had it, I uploaded it.
421
+
422
+ ### Data sources
423
+
424
+ *Yes, you will see benchmark names in the list, but this only uses the train splits, and a decontamination by cosine similarity is performed at the end as a sanity check*
425
+
426
+ - [ai2_arc](https://huggingface.co/datasets/ai2_arc)
427
+ - Abstraction and reasoning dataset, useful in measuring "intelligence" to a certain extent.
428
+ - [airoboros](https://huggingface.co/datasets/unalignment/spicy-3.1)
429
+ - Variety of categories of synthetic instructions generated by gpt-4.
430
+ - [apps](https://huggingface.co/datasets/codeparrot/apps)
431
+ - Python coding dataset with 10k problems.
432
+ - [belebele](https://huggingface.co/datasets/facebook/belebele)
433
+ - Multi-lingual reading comprehension dataset.
434
+ - [bluemoon](https://huggingface.co/datasets/Squish42/bluemoon-fandom-1-1-rp-cleaned)
435
+ - Roleplay data scraped from Bluemoon, then cleaned and formatted as ShareGPT.
436
+ - [boolq](https://huggingface.co/datasets/boolq)
437
+ - Corpus of yes/no questions (which can be surprisingly difficult for AI to answer apparently?)
438
+ - [capybara](https://huggingface.co/datasets/LDJnr/Capybara)
439
+ - Multi-turn dataset used to create the capybara models.
440
+ - [cinematika](https://huggingface.co/datasets/jondurbin/cinematika-v0.1) (instruction and plain text)
441
+ - RP-style data synthesized from movie scripts so the model isn't quite as boring as it otherwise would be.
442
+ - [drop](https://huggingface.co/datasets/drop)
443
+ - More reading comprehension.
444
+ - [emobank](https://github.com/JULIELab/EmoBank)
445
+ - Emotion annotations using the Valence-Arousal-Domninance scheme.
446
+ - [gutenberg](https://www.gutenberg.org/) (plain text)
447
+ - Books/plain text, again to make the model less boring, only a handful of examples supported by [chapterize](https://github.com/JonathanReeve/chapterize)
448
+ - [lmsys_chat_1m](https://huggingface.co/datasets/lmsys/lmsys-chat-1m) (only gpt-4 items, also used for DPO)
449
+ - Chats collected by the lmsys chat arena, containing a wide variety of chats with various models.
450
+ - [mathinstruct](https://huggingface.co/datasets/TIGER-Lab/MathInstruct)
451
+ - Composite dataset with a variety of math-related tasks and problem/question formats.
452
+ - [mmlu](https://huggingface.co/datasets/cais/mmlu)
453
+ - Massive Multitask Language Understanding - a wide variety of questions about various subject matters.
454
+ - [natural_instructions](https://huggingface.co/datasets/Muennighoff/natural-instructions)
455
+ - Millions of instructions from 1600+ task categories (sampled down substantially, stratified by task type)
456
+ - [openbookqa](https://huggingface.co/datasets/openbookqa)
457
+ - Question answering dataset.
458
+ - [pippa](https://huggingface.co/datasets/kingbri/PIPPA-shareGPT)
459
+ - Deduped version of [PIPPA](https://huggingface.co/datasets/PygmalionAI/PIPPA) in ShareGPT format.
460
+ - [piqa](https://huggingface.co/datasets/piqa)
461
+ - Phyiscal interaction question answering.
462
+ - [python_alpaca](https://huggingface.co/datasets/Vezora/Tested-22k-Python-Alpaca)
463
+ - Python instruction response pairs, validated as functional.
464
+ - [rosetta_code](https://huggingface.co/datasets/cakiki/rosetta-code)
465
+ - Code problems and solutions in a variety of programming languages taken from rosettacode.org.
466
+ - [slimorca](https://huggingface.co/datasets/Open-Orca/SlimOrca)
467
+ - Collection of ~500k gpt-4 verified chats from OpenOrca.
468
+ - [spider](https://huggingface.co/datasets/spider)
469
+ - SQL-targeted dataset.
470
+ - [squad_v2](https://huggingface.co/datasets/squad_v2)
471
+ - Contextual question answering (RAG).
472
+ - [synthia](https://huggingface.co/datasets/migtissera/Synthia-v1.3)
473
+ - GPT-4 generated data using advanced prompting from Migel Tissera.
474
+ - [winogrande](https://huggingface.co/datasets/winogrande)
475
+ - Fill in the blank style prompts.
476
+
477
+ Only the train splits were used (if a split was provided), and an additional pass of decontamination is performed using approximate nearest neighbor search (via faiss).
478
+
479
+ ## Prompt formatting
480
+
481
+ In sticking with the theme of the bagel, I didn't want to use a single prompt format, so I used 4 - vicuna, llama-2, alpaca, and chat-ml (sorta).
482
+ I also didn't want to randomly select a single prompt format for each item (hoping each instruction would generalize more when used in a variety of prompt formats), so each instruction is actually converted into every prompt format.
483
+
484
+ This means each epoch of our fine-tune is really basically 4 epochs. So, for the fine-tunes, I would recommend only doing 1 epoch (or 0.75 epochs). I am testing with a single epoch using a relatively low learning rate.
485
+
486
+ ### Alpaca (sort of)
487
+
488
+ ```
489
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
490
+
491
+ ### Instruction:
492
+ {system prompt, if provided}
493
+ {instruction}
494
+
495
+ ### Response:
496
+ ```
497
+
498
+ The main difference here is that because of the dataset formatting and variety of data sources, it would have been much to tedious to add an `### Input:` block, so the inputs are just in the instruction section.
499
+
500
+ ### Vicuna
501
+
502
+ ```
503
+ {system prompt, if provided, randomly defaulting to "A chat between a user and an unbiased, uncensored assistant."}
504
+ USER: {instruction}
505
+ ASSISTANT:
506
+ ```
507
+
508
+ ### ChatML (sort of)
509
+
510
+ I don't really understand the point of having special tokens for `<|im_start|>` and `<|im_end|>`, because in practice they just act as BOS and EOS tokens (but, please correct me if I'm wrong).
511
+
512
+ So, instead of:
513
+ ```text
514
+ {bos}<|im_start|>{role}
515
+ {text}
516
+ <|im_end|>{eos}
517
+ ```
518
+
519
+ I just changed it to:
520
+ ```text
521
+ {bos}{role}
522
+ {text}
523
+ {eos}
524
+ ```
525
+
526
+ If you *really* want to use `<|im_start|>` and `<|im_end|>`, just update your `tokenizer_config.json` to use `<|im_start|>` instead of `<s>` and `<|im_end|>` instead of `</s>` and when tokenizing. And if you still don't like what I've done to this chat-ml-ish format, feel free to cry into your pillow or fork the code and do a new fine-tune.
527
+
528
+ ### Llama-2 chat
529
+
530
+ ```
531
+ [INST] <<SYS>>
532
+ {system}
533
+ <</SYS>>
534
+
535
+ {instruction} [/INST]
536
+ ```