bleysg commited on
Commit
b40ee77
1 Parent(s): a9744d8

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +198 -0
README.md ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - Open-Orca/OpenOrca
4
+ language:
5
+ - en
6
+ library_name: transformers
7
+ pipeline_tag: text-generation
8
+ license: apache-2.0
9
+ ---
10
+
11
+ <p><h1>🐋 Mistral-7B-SlimOrca 🐋</h1></p>
12
+
13
+
14
+ PRE-RELEASE, DEMO MODEL
15
+
16
+
17
+ ![OpenOrca Logo](https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca/resolve/main/Images/MistralOrcaLogo.png "MistralOrca Logo")
18
+ [<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)
19
+
20
+
21
+ # OpenOrca - Mistral - 7B - 8k - Slim Data!
22
+
23
+ We have used our own [OpenOrca dataset](https://huggingface.co/datasets/Open-Orca/OpenOrca) to fine-tune on top of [Mistral 7B](https://huggingface.co/mistralai/Mistral-7B-v0.1).
24
+ This dataset is our attempt to reproduce the dataset generated for Microsoft Research's [Orca Paper](https://arxiv.org/abs/2306.02707).
25
+ We use [OpenChat](https://huggingface.co/openchat) packing, trained with [Axolotl](https://github.com/OpenAccess-AI-Collective/axolotl).
26
+
27
+ This model is being released as a demonstration of the performance of our new curated subset of the OpenOrca data: **[SlimOrca](https://huggingface.co/datasets/Open-Orca/SlimOrca)**.
28
+
29
+ This new dataset release provides an efficient means of reaching performance on-par with using larger slices of our data, while only including ~500k GPT-4 completions.
30
+
31
+ HF Leaderboard evals place this model as TBD
32
+
33
+ Codename: "*MistralSlimOrca*"
34
+
35
+ We are in-process with training more models, so keep a look out on our org for releases coming soon with exciting partners.
36
+
37
+ We will also give sneak-peak announcements on our Discord, which you can find here:
38
+
39
+ https://AlignmentLab.ai
40
+
41
+ or check the OpenAccess AI Collective Discord for more information about Axolotl trainer here:
42
+
43
+ https://discord.gg/5y8STgB3P3
44
+
45
+
46
+ # Quantized Models
47
+
48
+ Quantized versions of this model are generously made available by [TheBloke](https://huggingface.co/TheBloke).
49
+
50
+ - AWQ: https://huggingface.co/TheBloke/Mistral-7B-SlimOrca-AWQ
51
+ - GPTQ: https://huggingface.co/TheBloke/Mistral-7B-SlimOrca-GPTQ
52
+ - GGUF: https://huggingface.co/TheBloke/Mistral-7B-SlimOrca-GGUF
53
+
54
+
55
+ # Prompt Template
56
+
57
+ We used [OpenAI's Chat Markup Language (ChatML)](https://github.com/openai/openai-python/blob/main/chatml.md) format, with `<|im_start|>` and `<|im_end|>` tokens added to support this.
58
+
59
+ This means that, e.g., in [oobabooga](https://github.com/oobabooga/text-generation-webui/) the "`MPT-Chat`" instruction template should work, as it also uses ChatML.
60
+
61
+ This formatting is also available via a pre-defined [Transformers chat template](https://huggingface.co/docs/transformers/main/chat_templating),
62
+ which means that lists of messages can be formatted for you with the `apply_chat_template()` method:
63
+
64
+ ```python
65
+ chat = [
66
+ {"role": "system", "content": "You are MistralSlimOrca, a large language model trained by Alignment Lab AI. Write out your reasoning step-by-step to be sure you get the right answers!"}
67
+ {"role": "user", "content": "How are you?"},
68
+ {"role": "assistant", "content": "I am doing well!"},
69
+ {"role": "user", "content": "Please tell me about how mistral winds have attracted super-orcas."},
70
+ ]
71
+ tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
72
+ ```
73
+
74
+ which will yield:
75
+
76
+ ```
77
+ <|im_start|>system
78
+ You are MistralSlimOrca, a large language model trained by Alignment Lab AI. Write out your reasoning step-by-step to be sure you get the right answers!
79
+ <|im_end|>
80
+ <|im_start|>user
81
+ How are you?<|im_end|>
82
+ <|im_start|>assistant
83
+ I am doing well!<|im_end|>
84
+ <|im_start|>user
85
+ Please tell me about how mistral winds have attracted super-orcas.<|im_end|>
86
+ <|im_start|>assistant
87
+ ```
88
+
89
+ If you use `tokenize=True` and `return_tensors="pt"` instead, then you will get a tokenized
90
+ and formatted conversation ready to pass to `model.generate()`.
91
+
92
+
93
+ # Inference
94
+
95
+ See [this notebook](https://colab.research.google.com/drive/tbd) for inference details.
96
+
97
+ Note that you need the development snapshot of Transformers currently, as support for Mistral hasn't been released into PyPI yet:
98
+
99
+ ```
100
+ pip install git+https://github.com/huggingface/transformers
101
+ ```
102
+
103
+
104
+ # Evaluation
105
+
106
+ ## HuggingFace Leaderboard Performance
107
+
108
+ We have evaluated using the methodology and tools for the HuggingFace Leaderboard, and find that we have dramatically improved upon the base model.
109
+ We find **106%** of the base model's performance on HF Leaderboard evals, averaging **65.85**.
110
+
111
+
112
+ This is also **98.6%** of *`Llama2-70b-chat`*'s performance!
113
+
114
+ ![HF Leaderboard](https://huggingface.co/Open-Orca/Mistral-7B-SlimOrca/resolve/main/Images/MistralSlimOrca7BHFLeaderboard.png)
115
+
116
+
117
+ | Metric | Value |
118
+ |-----------------------|-------|
119
+ | MMLU (5-shot) | 62.77 |
120
+ | ARC (25-shot) | 62.54 |
121
+ | HellaSwag (10-shot) | 83.86 |
122
+ | TruthfulQA (0-shot) | 54.23 |
123
+ | Avg. | 65.85 |
124
+
125
+ We use [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) to run the benchmark tests above, using the same version as the HuggingFace LLM Leaderboard.
126
+
127
+
128
+ ## AGIEval Performance
129
+
130
+ We compare our results to the base Mistral-7B model (using LM Evaluation Harness).
131
+
132
+ We find **tbd** of the base model's performance on AGI Eval, averaging **tbd**.
133
+ As well, we significantly improve upon the official `mistralai/Mistral-7B-Instruct-v0.1` finetuning, achieving **tbd** of their performance.
134
+
135
+ ![AGIEval Performance](https://huggingface.co/Open-Orca/Mistral-7B-SlimOrca/resolve/main/Images/MistralSlimOrca7BAGIEval.png "AGIEval Performance")
136
+
137
+ ## BigBench-Hard Performance
138
+
139
+ We find **tbd** of the base model's performance on BigBench-Hard, averaging **tbd**.
140
+
141
+ ![BigBench-Hard Performance](https://huggingface.co/Open-Orca/Mistral-7B-SlimOrca/resolve/main/Images/MistralSlimOrca7BBigBenchHard.png "BigBench-Hard Performance")
142
+
143
+ ## GPT4ALL Leaderboard Performance
144
+
145
+ We ... averaging **tbd**.
146
+
147
+ ![GPT4ALL Performance](https://huggingface.co/Open-Orca/Mistral-7B-SlimOrca/resolve/main/Images/MistralSlimOrca7BGPT4ALL.png "GPT4ALL Performance")
148
+
149
+ ## MT-Bench Performance
150
+
151
+ MT-Bench uses GPT-4 as a judge of model response quality, across a wide range of challenges.
152
+ We find our performance is *on-par with `Llama2-70b-chat`*, averaging **6.86**.
153
+
154
+ ![MT-Bench Performance](https://huggingface.co/Open-Orca/Mistral-7B-SlimOrca/resolve/main/Images/MistralSlimOrca7BMTBENCH.png "MT-Bench Performance")
155
+
156
+
157
+ # Dataset
158
+
159
+ We used a curated, filtered selection of most of the GPT-4 augmented data from our OpenOrca dataset, which aims to reproduce the Orca Research Paper dataset.
160
+
161
+ The key change in this dataset is that we've done an additional pass, using GPT-4 to remove answers which appear wrong based on the human annotations from the FLAN dataset.
162
+ This reduces the dataset size to only ~500k entries, allowing training to a similar quality level to our previous releases with 2/3 the compute requirement.
163
+
164
+
165
+ # Training
166
+
167
+ We trained with 8x A6000 GPUs for 40 hours, completing 4 epochs of full fine tuning on our dataset in one training run.
168
+ Commodity cost was ~$240.
169
+
170
+
171
+ # Citation
172
+
173
+ ```bibtex
174
+ @software{lian2023mistralslimorca1
175
+ title = {MistralSlimOrca: Mistral-7B Model Instruct-tuned on Filtered, Corrected, OpenOrcaV1 GPT-4 Dataset},
176
+ author = {Wing Lian and Bleys Goodson and Guan Wang and Eugene Pentland and Austin Cook and Chanvichet Vong and "Teknium"},
177
+ year = {2023},
178
+ publisher = {HuggingFace},
179
+ journal = {HuggingFace repository},
180
+ howpublished = {\url{https://huggingface.co/Open-Orca/Mistral-7B-OpenOrca},
181
+ }
182
+ @misc{mukherjee2023orca,
183
+ title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
184
+ author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
185
+ year={2023},
186
+ eprint={2306.02707},
187
+ archivePrefix={arXiv},
188
+ primaryClass={cs.CL}
189
+ }
190
+ @misc{longpre2023flan,
191
+ title={The Flan Collection: Designing Data and Methods for Effective Instruction Tuning},
192
+ author={Shayne Longpre and Le Hou and Tu Vu and Albert Webson and Hyung Won Chung and Yi Tay and Denny Zhou and Quoc V. Le and Barret Zoph and Jason Wei and Adam Roberts},
193
+ year={2023},
194
+ eprint={2301.13688},
195
+ archivePrefix={arXiv},
196
+ primaryClass={cs.AI}
197
+ }
198
+ ```