jondurbin commited on
Commit
af229b2
1 Parent(s): 07a9058

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +159 -1
README.md CHANGED
@@ -1,3 +1,161 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: other
3
+ license_name: yi-license
4
+ license_link: https://huggingface.co/01-ai/Yi-34B-200K/blob/main/LICENSE
5
+ datasets:
6
+ - ai2_arc
7
+ - unalignment/spicy-3.1
8
+ - codeparrot/apps
9
+ - facebook/belebele
10
+ - boolq
11
+ - jondurbin/cinematika-v0.1
12
+ - drop
13
+ - lmsys/lmsys-chat-1m
14
+ - TIGER-Lab/MathInstruct
15
+ - cais/mmlu
16
+ - Muennighoff/natural-instructions
17
+ - openbookqa
18
+ - piqa
19
+ - Vezora/Tested-22k-Python-Alpaca
20
+ - cakiki/rosetta-code
21
+ - Open-Orca/SlimOrca
22
+ - spider
23
+ - squad_v2
24
+ - migtissera/Synthia-v1.3
25
+ - datasets/winogrande
26
+ - nvidia/HelpSteer
27
+ - Intel/orca_dpo_pairs
28
+ - unalignment/toxic-dpo-v0.1
29
+ - jondurbin/truthy-dpo-v0.1
30
+ - allenai/ultrafeedback_binarized_cleaned
31
+ - Squish42/bluemoon-fandom-1-1-rp-cleaned
32
+ - LDJnr/Capybara
33
+ - JULIELab/EmoBank
34
+ - kingbri/PIPPA-shareGPT
35
  ---
36
+
37
+ # A bagel, with everything (except DPO)
38
+
39
+ ![bagel](bagel.png)
40
+
41
+ ## Overview
42
+
43
+ An experimental fine-tune of yi-34b-200k using [bagel](https://github.com/jondurbin/bagel)
44
+
45
+ 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.
46
+
47
+ ### Data sources
48
+
49
+ *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*
50
+
51
+ - [ai2_arc](https://huggingface.co/datasets/ai2_arc)
52
+ - Abstraction and reasoning dataset, useful in measuring "intelligence" to a certain extent.
53
+ - [airoboros](https://huggingface.co/datasets/unalignment/spicy-3.1)
54
+ - Variety of categories of synthetic instructions generated by gpt-4.
55
+ - [apps](https://huggingface.co/datasets/codeparrot/apps)
56
+ - Python coding dataset with 10k problems.
57
+ - [belebele](https://huggingface.co/datasets/facebook/belebele)
58
+ - Multi-lingual reading comprehension dataset.
59
+ - [bluemoon](https://huggingface.co/datasets/Squish42/bluemoon-fandom-1-1-rp-cleaned)
60
+ - Roleplay data scraped from Bluemoon, then cleaned and formatted as ShareGPT.
61
+ - [boolq](https://huggingface.co/datasets/boolq)
62
+ - Corpus of yes/no questions (which can be surprisingly difficult for AI to answer apparently?)
63
+ - [capybara](https://huggingface.co/datasets/LDJnr/Capybara)
64
+ - Multi-turn dataset used to create the capybara models.
65
+ - [cinematika](https://huggingface.co/datasets/jondurbin/cinematika-v0.1) (instruction and plain text)
66
+ - RP-style data synthesized from movie scripts so the model isn't quite as boring as it otherwise would be.
67
+ - [drop](https://huggingface.co/datasets/drop)
68
+ - More reading comprehension.
69
+ - [emobank](https://github.com/JULIELab/EmoBank)
70
+ - Emotion annotations using the Valence-Arousal-Domninance scheme.
71
+ - [gutenberg](https://www.gutenberg.org/) (plain text)
72
+ - Books/plain text, again to make the model less boring, only a handful of examples supported by [chapterize](https://github.com/JonathanReeve/chapterize)
73
+ - [lmsys_chat_1m](https://huggingface.co/datasets/lmsys/lmsys-chat-1m) (only gpt-4 items, also used for DPO)
74
+ - Chats collected by the lmsys chat arena, containing a wide variety of chats with various models.
75
+ - [mathinstruct](https://huggingface.co/datasets/TIGER-Lab/MathInstruct)
76
+ - Composite dataset with a variety of math-related tasks and problem/question formats.
77
+ - [mmlu](https://huggingface.co/datasets/cais/mmlu)
78
+ - Massive Multitask Language Understanding - a wide variety of questions about various subject matters.
79
+ - [natural_instructions](https://huggingface.co/datasets/Muennighoff/natural-instructions)
80
+ - Millions of instructions from 1600+ task categories (sampled down substantially, stratified by task type)
81
+ - [openbookqa](https://huggingface.co/datasets/openbookqa)
82
+ - Question answering dataset.
83
+ - [pippa](https://huggingface.co/datasets/kingbri/PIPPA-shareGPT)
84
+ - Deduped version of [PIPPA](https://huggingface.co/datasets/PygmalionAI/PIPPA) in ShareGPT format.
85
+ - [piqa](https://huggingface.co/datasets/piqa)
86
+ - Phyiscal interaction question answering.
87
+ - [python_alpaca](https://huggingface.co/datasets/Vezora/Tested-22k-Python-Alpaca)
88
+ - Python instruction response pairs, validated as functional.
89
+ - [rosetta_code](https://huggingface.co/datasets/cakiki/rosetta-code)
90
+ - Code problems and solutions in a variety of programming languages taken from rosettacode.org.
91
+ - [slimorca](https://huggingface.co/datasets/Open-Orca/SlimOrca)
92
+ - Collection of ~500k gpt-4 verified chats from OpenOrca.
93
+ - [spider](https://huggingface.co/datasets/spider)
94
+ - SQL-targeted dataset.
95
+ - [squad_v2](https://huggingface.co/datasets/squad_v2)
96
+ - Contextual question answering (RAG).
97
+ - [synthia](https://huggingface.co/datasets/migtissera/Synthia-v1.3)
98
+ - GPT-4 generated data using advanced prompting from Migel Tissera.
99
+ - [winogrande](https://huggingface.co/datasets/winogrande)
100
+ - Fill in the blank style prompts.
101
+
102
+ 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).
103
+
104
+ ## Prompt formatting
105
+
106
+ 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).
107
+ 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.
108
+
109
+ 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.
110
+
111
+ ### Alpaca (sort of)
112
+
113
+ ```
114
+ Below is an instruction that describes a task. Write a response that appropriately completes the request.
115
+
116
+ ### Instruction:
117
+ {system prompt, if provided}
118
+ {instruction}
119
+
120
+ ### Response:
121
+ ```
122
+
123
+ 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.
124
+
125
+ ### Vicuna
126
+
127
+ ```
128
+ {system prompt, if provided, randomly defaulting to "A chat between a user and an unbiased, uncensored assistant."}
129
+ USER: {instruction}
130
+ ASSISTANT:
131
+ ```
132
+
133
+ ### ChatML (sort of)
134
+
135
+ 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).
136
+
137
+ So, instead of:
138
+ ```text
139
+ {bos}<|im_start|>{role}
140
+ {text}
141
+ <|im_end|>{eos}
142
+ ```
143
+
144
+ I just changed it to:
145
+ ```text
146
+ {bos}{role}
147
+ {text}
148
+ {eos}
149
+ ```
150
+
151
+ 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.
152
+
153
+ ### Llama-2 chat
154
+
155
+ ```
156
+ [INST] <<SYS>>
157
+ {system}
158
+ <</SYS>>
159
+
160
+ {instruction} [/INST]
161
+ ```