Text Generation
Transformers
Safetensors
mistral
conversational
Inference Endpoints
text-generation-inference
jondurbin commited on
Commit
8205857
1 Parent(s): ecbb6db

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +205 -1
README.md CHANGED
@@ -1,3 +1,207 @@
1
  ---
2
  license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ datasets:
4
+ - ai2_arc
5
+ - allenai/ultrafeedback_binarized_cleaned
6
+ - argilla/distilabel-intel-orca-dpo-pairs
7
+ - jondurbin/airoboros-3.2
8
+ - codeparrot/apps
9
+ - facebook/belebele
10
+ - bluemoon-fandom-1-1-rp-cleaned
11
+ - boolq
12
+ - camel-ai/biology
13
+ - camel-ai/chemistry
14
+ - camel-ai/math
15
+ - camel-ai/physics
16
+ - jondurbin/contextual-dpo-v0.1
17
+ - jondurbin/gutenberg-dpo-v0.1
18
+ - jondurbin/py-dpo-v0.1
19
+ - jondurbin/truthy-dpo-v0.1
20
+ - LDJnr/Capybara
21
+ - jondurbin/cinematika-v0.1
22
+ - WizardLM/WizardLM_evol_instruct_70k
23
+ - glaiveai/glaive-function-calling-v2
24
+ - jondurbin/gutenberg-dpo-v0.1
25
+ - grimulkan/LimaRP-augmented
26
+ - lmsys/lmsys-chat-1m
27
+ - ParisNeo/lollms_aware_dataset
28
+ - TIGER-Lab/MathInstruct
29
+ - Muennighoff/natural-instructions
30
+ - openbookqa
31
+ - kingbri/PIPPA-shareGPT
32
+ - piqa
33
+ - Vezora/Tested-22k-Python-Alpaca
34
+ - ropes
35
+ - cakiki/rosetta-code
36
+ - Open-Orca/SlimOrca
37
+ - b-mc2/sql-create-context
38
+ - squad_v2
39
+ - mattpscott/airoboros-summarization
40
+ - migtissera/Synthia-v1.3
41
+ - unalignment/toxic-dpo-v0.2
42
+ - WhiteRabbitNeo/WRN-Chapter-1
43
+ - WhiteRabbitNeo/WRN-Chapter-2
44
+ - winogrande
45
+
46
+ # A bagel, with everything (except DPO)
47
+
48
+ ![bagel](bagel.png)
49
+
50
+ ## Overview
51
+
52
+ This is the pre-DPO version of the mistral-7b model fine-tuned with https://github.com/jondurbin/bagel
53
+
54
+ The DPO counterpart can be found here: https://huggingface.co/jondurbin/bagel-dpo-7b-v0.4
55
+
56
+ This model is likely better for roleplay usage.
57
+
58
+ ### Data sources
59
+
60
+ There are many data sources used in the bagel models. See https://github.com/jondurbin/bagel for more information.
61
+
62
+ __*Only train splits are used, and a decontamination by cosine similarity is performed at the end as a sanity check against common benchmarks. If you don't know the difference between train and test, please learn.*__
63
+
64
+ <details>
65
+ <summary>SFT data sources</summary>
66
+ - [ai2_arc](https://huggingface.co/datasets/ai2_arc)
67
+ - Abstraction and reasoning dataset, useful in measuring "intelligence" to a certain extent.
68
+ - [airoboros](https://huggingface.co/datasets/unalignment/spicy-3.1)
69
+ - Variety of categories of synthetic instructions generated by gpt-4.
70
+ - [apps](https://huggingface.co/datasets/codeparrot/apps)
71
+ - Python coding dataset with 10k problems.
72
+ - [belebele](https://huggingface.co/datasets/facebook/belebele)
73
+ - Multi-lingual reading comprehension dataset.
74
+ - [bluemoon](https://huggingface.co/datasets/Squish42/bluemoon-fandom-1-1-rp-cleaned)
75
+ - Roleplay data scraped from Bluemoon, then cleaned and formatted as ShareGPT.
76
+ - [boolq](https://huggingface.co/datasets/boolq)
77
+ - Corpus of yes/no questions (which can be surprisingly difficult for AI to answer apparently?)
78
+ - [camel-ai biology](https://huggingface.co/datasets/camel-ai/biology)
79
+ - GPT-4 generated biology instructions.
80
+ - [camel-ai chemistry](https://huggingface.co/datasets/camel-ai/chemistry)
81
+ - GPT-4 generated chemistryinstructions.
82
+ - [camel-ai math](https://huggingface.co/datasets/camel-ai/math)
83
+ - GPT-4 generated math instructions.
84
+ - [camel-ai physics](https://huggingface.co/datasets/camel-ai/physics)
85
+ - GPT-4 generated physics instructions.
86
+ - [capybara](https://huggingface.co/datasets/LDJnr/Capybara)
87
+ - Multi-turn dataset used to create the capybara models.
88
+ - [cinematika](https://huggingface.co/datasets/jondurbin/cinematika-v0.1) (instruction and plain text)
89
+ - RP-style data synthesized from movie scripts so the model isn't quite as boring as it otherwise would be.
90
+ - [emobank](https://github.com/JULIELab/EmoBank)
91
+ - Emotion annotations using the Valence-Arousal-Domninance scheme.
92
+ - [evol-instruct](https://huggingface.co/datasets/WizardLM/WizardLM_evol_instruct_70k)
93
+ - WizardLM's evol instruct 70k dataset.
94
+ - [glaive-function-calling-v2](https://huggingface.co/datasets/glaiveai/glaive-function-calling-v2)
95
+ - GlaiveAI function calling dataset.
96
+ - [gutenberg](https://www.gutenberg.org/) (plain text)
97
+ - Books/plain text, again to make the model less boring, only a handful of examples supported by [chapterize](https://github.com/JonathanReeve/chapterize)
98
+ - [limarp-augmented](https://huggingface.co/datasets/grimulkan/LimaRP-augmented)
99
+ - Augmented and further modified version of [LimaRP](https://huggingface.co/datasets/lemonilia/LimaRP)
100
+ - [lmsys_chat_1m](https://huggingface.co/datasets/lmsys/lmsys-chat-1m) (only gpt-4 items, also used for DPO)
101
+ - Chats collected by the lmsys chat arena, containing a wide variety of chats with various models.
102
+ - [lollms](https://huggingface.co/datasets/ParisNeo/lollms_aware_dataset)
103
+ - LoLLMs question answering dataset by ParisNeo, with helpful question answer pairs for using LoLLMs.
104
+ - [mathinstruct](https://huggingface.co/datasets/TIGER-Lab/MathInstruct)
105
+ - Composite dataset with a variety of math-related tasks and problem/question formats.
106
+ - [natural_instructions](https://huggingface.co/datasets/Muennighoff/natural-instructions)
107
+ - Millions of instructions from 1600+ task categories (sampled down substantially, stratified by task type)
108
+ - [openbookqa](https://huggingface.co/datasets/openbookqa)
109
+ - Question answering dataset.
110
+ - [pippa](https://huggingface.co/datasets/kingbri/PIPPA-shareGPT)
111
+ - Deduped version of [PIPPA](https://huggingface.co/datasets/PygmalionAI/PIPPA) in ShareGPT format.
112
+ - [piqa](https://huggingface.co/datasets/piqa)
113
+ - Phyiscal interaction question answering.
114
+ - [python_alpaca](https://huggingface.co/datasets/Vezora/Tested-22k-Python-Alpaca)
115
+ - Python instruction response pairs, validated as functional.
116
+ - [ropes](https://huggingface.co/datasets/ropes)
117
+ - Reasoning Over PAragraph Effects in Situations - enhances ability to apply knowledge from a passage of text to a new situation.
118
+ - [rosetta_code](https://huggingface.co/datasets/cakiki/rosetta-code)
119
+ - Code problems and solutions in a variety of programming languages taken from rosettacode.org.
120
+ - [slimorca](https://huggingface.co/datasets/Open-Orca/SlimOrca)
121
+ - Collection of ~500k gpt-4 verified chats from OpenOrca.
122
+ - [sql-create-context](https://huggingface.co/datasets/b-mc2/sql-create-context)
123
+ - SQL-targeted dataset, combining WikiSQL and Spider.
124
+ - [squad_v2](https://huggingface.co/datasets/squad_v2)
125
+ - Contextual question answering (RAG).
126
+ - [airoboros-summarization](https://huggingface.co/datasets/mattpscott/airoboros-summarization)
127
+ - Combination of various summarization datasets, formatted into the airoboros context-obedient format.
128
+ - [synthia](https://huggingface.co/datasets/migtissera/Synthia-v1.3)
129
+ - GPT-4 generated data using advanced prompting from Migel Tissera.
130
+ - whiterabbitneo [chapter 1](https://huggingface.co/datasets/WhiteRabbitNeo/WRN-Chapter-1) and [chapter 2](https://huggingface.co/datasets/WhiteRabbitNeo/WRN-Chapter-2)
131
+ - Offensive cybersecurity dataset by WhiteRabbitNeo/Migel Tissera
132
+ - [winogrande](https://huggingface.co/datasets/winogrande)
133
+ - Fill in the blank style prompts.
134
+ </details>
135
+
136
+ <details>
137
+ <summary>DPO data sources</summary>
138
+ - [airoboros 3.2](https://huggingface.co/datasets/jondurbin/airoboros-3.2) vs [airoboros m2.0](https://huggingface.co/datasets/jondurbin/airoboros-gpt4-m2.0)
139
+ - The creative/writing tasks from airoboros-2.2.1 were re-generated using gpt4-0314 and a custom prompt to get longer, more creative, less clichè responses for airoboros 3.1, so we can use the shorter/boring version as the "rejected" value and the rerolled response as "chosen"
140
+ - [contextual-dpo](https://huggingface.co/datasets/jondurbin/contextual-dpo-v0.1)
141
+ - Contextual prompt/response dataset using the airoboros context-obedient question answering format.
142
+ - [helpsteer](https://huggingface.co/datasets/nvidia/HelpSteer)
143
+ - Really neat dataset provided by the folks at NVidia with human annotation across a variety of metrics. Only items with the highest "correctness" value were used for DPO here, with the highest scoring output as "chosen" and random lower scoring value as "rejected"
144
+ - [distilabel_orca_dpo_pairs](https://huggingface.co/datasets/argilla/distilabel-intel-orca-dpo-pairs)
145
+ - Another interesting dataset, originally by Intel, enhanced by argilla with [distilabel](https://github.com/argilla-io/distilabel) which provides various DPO pairs generated from prompts included in the SlimOrca dataset.
146
+ - [gutenberg-dpo](https://huggingface.co/datasets/jondurbin/gutenberg-dpo-v0.1)
147
+ - DPO pairs meant to increase the models novel writing abilities, using public domain books from https://gutenberg.org/
148
+ - [py-dpo](https://huggingface.co/datasets/jondurbin/py-dpo-v0.1)
149
+ - Python DPO dataset (based on the SFT python_alpaca dataset above)
150
+ - [toxic-dpo](https://huggingface.co/datasets/unalignment/toxic-dpo-v0.2)
151
+ - __*highly toxic and potentially illegal content!*__ De-censorship, for academic and lawful purposes only, of course. Generated by llama-2-70b via prompt engineering.
152
+ - [truthy](https://huggingface.co/datasets/jondurbin/truthy-dpo-v0.1)
153
+ - DPO pairs meant to increase truthfulness of the model, e.g. common misconceptions, differentiate between AI assistants and roleplayed human in terms of corporeal awareness/locality/etc.
154
+ - [ultrafeedback](https://huggingface.co/datasets/allenai/ultrafeedback_binarized_cleaned)
155
+ - One of the bits of magic behind the Zephyr model. Only the items with a chosen score of 8 or higher were included.
156
+ </details>
157
+
158
+ ## Prompt formatting
159
+
160
+ 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.
161
+ 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 converted into every prompt format (with 0.75 probability).
162
+
163
+ This means each epoch of our fine-tune is the equivalent of 3 epochs.
164
+
165
+ <details>
166
+ <summary>Alpaca (sort of)</summary>
167
+
168
+ The only caveat here for alpaca format is that most of the datasets didn't have a separate `"input"` value, so there is no `### Input:` block - any additional input should just be in the instruction section.
169
+
170
+ ```
171
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
172
+
173
+ ### Instruction:
174
+ {system prompt, if provided}
175
+ {instruction}
176
+
177
+ ### Response:
178
+ ```
179
+
180
+ 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.
181
+
182
+ ### Vicuna
183
+
184
+ ```
185
+ {system prompt, if provided, randomly defaulting to "A chat between a user and an unbiased, uncensored assistant."}
186
+ USER: {instruction}
187
+ ASSISTANT:
188
+ ```
189
+ </details>
190
+
191
+ ### ChatML (sort of)
192
+
193
+ ```text
194
+ {bos}<|im_start|>{role}
195
+ {text}
196
+ <|im_end|>{eos}
197
+ ```
198
+
199
+ ### Llama-2 chat (recommended)
200
+
201
+ ```
202
+ [INST] <<SYS>>
203
+ {system}
204
+ <</SYS>>
205
+
206
+ {instruction} [/INST]
207
+ ```