TheBloke commited on
Commit
5d3e66e
1 Parent(s): af1d72e

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +521 -0
README.md ADDED
@@ -0,0 +1,521 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B
3
+ datasets:
4
+ - Open-Orca/OpenOrca
5
+ inference: false
6
+ language:
7
+ - en
8
+ library_name: transformers
9
+ license: llama2
10
+ model_creator: Open-Orca
11
+ model_name: OpenOrca x OpenChat - Preview2 - 13B
12
+ model_type: llama
13
+ pipeline_tag: text-generation
14
+ prompt_template: 'user: {prompt}<|end_of_turn|>assistant:
15
+
16
+ '
17
+ quantized_by: TheBloke
18
+ ---
19
+
20
+ <!-- header start -->
21
+ <!-- 200823 -->
22
+ <div style="width: auto; margin-left: auto; margin-right: auto">
23
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
24
+ </div>
25
+ <div style="display: flex; justify-content: space-between; width: 100%;">
26
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
27
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
28
+ </div>
29
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
30
+ <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>
31
+ </div>
32
+ </div>
33
+ <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>
34
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
35
+ <!-- header end -->
36
+
37
+ # OpenOrca x OpenChat - Preview2 - 13B - AWQ
38
+ - Model creator: [Open-Orca](https://huggingface.co/Open-Orca)
39
+ - Original model: [OpenOrca x OpenChat - Preview2 - 13B](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B)
40
+
41
+ <!-- description start -->
42
+ ## Description
43
+
44
+ This repo contains AWQ model files for [Open-Orca's OpenOrca x OpenChat - Preview2 - 13B](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B).
45
+
46
+
47
+ ### About AWQ
48
+
49
+ 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.
50
+
51
+ It is also now supported by continuous batching server [vLLM](https://github.com/vllm-project/vllm), allowing use of AWQ models for high-throughput concurrent inference in multi-user server scenarios. Note that, at the time of writing, overall throughput is still lower than running vLLM with unquantised models, however using AWQ enables using much smaller GPUs which can lead to easier deployment and overall cost savings. For example, a 70B model can be run on 1 x 48GB GPU instead of 2 x 80GB.
52
+ <!-- description end -->
53
+ <!-- repositories-available start -->
54
+ ## Repositories available
55
+
56
+ * [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/OpenOrcaxOpenChat-Preview2-13B-AWQ)
57
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/OpenOrcaxOpenChat-Preview2-13B-GPTQ)
58
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/OpenOrcaxOpenChat-Preview2-13B-GGUF)
59
+ * [Open-Orca's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B)
60
+ <!-- repositories-available end -->
61
+
62
+ <!-- prompt-template start -->
63
+ ## Prompt template: openchat llama2 v1
64
+
65
+ ```
66
+ user: {prompt}<|end_of_turn|>assistant:
67
+
68
+ ```
69
+
70
+ <!-- prompt-template end -->
71
+
72
+
73
+ <!-- README_AWQ.md-provided-files start -->
74
+ ## Provided files and AWQ parameters
75
+
76
+ For my first release of AWQ models, I am releasing 128g models only. I will consider adding 32g as well if there is interest, and once I have done perplexity and evaluation comparisons, but at this time 32g models are still not fully tested with AutoAWQ and vLLM.
77
+
78
+ Models are released as sharded safetensors files.
79
+
80
+ | Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
81
+ | ------ | ---- | -- | ----------- | ------- | ---- |
82
+ | [main](https://huggingface.co/TheBloke/OpenOrcaxOpenChat-Preview2-13B-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.25 GB
83
+
84
+ <!-- README_AWQ.md-provided-files end -->
85
+
86
+ <!-- README_AWQ.md-use-from-vllm start -->
87
+ ## Serving this model from vLLM
88
+
89
+ Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
90
+
91
+ - When using vLLM as a server, pass the `--quantization awq` parameter, for example:
92
+
93
+ ```shell
94
+ python3 python -m vllm.entrypoints.api_server --model TheBloke/OpenOrcaxOpenChat-Preview2-13B-AWQ --quantization awq
95
+ ```
96
+
97
+ When using vLLM from Python code, pass the `quantization=awq` parameter, for example:
98
+
99
+ ```python
100
+ from vllm import LLM, SamplingParams
101
+
102
+ prompts = [
103
+ "Hello, my name is",
104
+ "The president of the United States is",
105
+ "The capital of France is",
106
+ "The future of AI is",
107
+ ]
108
+ sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
109
+
110
+ llm = LLM(model="TheBloke/OpenOrcaxOpenChat-Preview2-13B-AWQ", quantization="awq")
111
+
112
+ outputs = llm.generate(prompts, sampling_params)
113
+
114
+ # Print the outputs.
115
+ for output in outputs:
116
+ prompt = output.prompt
117
+ generated_text = output.outputs[0].text
118
+ print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
119
+ ```
120
+ <!-- README_AWQ.md-use-from-vllm start -->
121
+
122
+ <!-- README_AWQ.md-use-from-python start -->
123
+ ## How to use this AWQ model from Python code
124
+
125
+ ### Install the necessary packages
126
+
127
+ Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.0.2 or later
128
+
129
+ ```shell
130
+ pip3 install autoawq
131
+ ```
132
+
133
+ If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
134
+
135
+ ```shell
136
+ pip3 uninstall -y autoawq
137
+ git clone https://github.com/casper-hansen/AutoAWQ
138
+ cd AutoAWQ
139
+ pip3 install .
140
+ ```
141
+
142
+ ### You can then try the following example code
143
+
144
+ ```python
145
+ from awq import AutoAWQForCausalLM
146
+ from transformers import AutoTokenizer
147
+
148
+ model_name_or_path = "TheBloke/OpenOrcaxOpenChat-Preview2-13B-AWQ"
149
+
150
+ # Load model
151
+ model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
152
+ trust_remote_code=False, safetensors=True)
153
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
154
+
155
+ prompt = "Tell me about AI"
156
+ prompt_template=f'''user: {prompt}<|end_of_turn|>assistant:
157
+
158
+ '''
159
+
160
+ print("\n\n*** Generate:")
161
+
162
+ tokens = tokenizer(
163
+ prompt_template,
164
+ return_tensors='pt'
165
+ ).input_ids.cuda()
166
+
167
+ # Generate output
168
+ generation_output = model.generate(
169
+ tokens,
170
+ do_sample=True,
171
+ temperature=0.7,
172
+ top_p=0.95,
173
+ top_k=40,
174
+ max_new_tokens=512
175
+ )
176
+
177
+ print("Output: ", tokenizer.decode(generation_output[0]))
178
+
179
+ # Inference can also be done using transformers' pipeline
180
+ from transformers import pipeline
181
+
182
+ print("*** Pipeline:")
183
+ pipe = pipeline(
184
+ "text-generation",
185
+ model=model,
186
+ tokenizer=tokenizer,
187
+ max_new_tokens=512,
188
+ do_sample=True,
189
+ temperature=0.7,
190
+ top_p=0.95,
191
+ top_k=40,
192
+ repetition_penalty=1.1
193
+ )
194
+
195
+ print(pipe(prompt_template)[0]['generated_text'])
196
+ ```
197
+ <!-- README_AWQ.md-use-from-python end -->
198
+
199
+ <!-- README_AWQ.md-compatibility start -->
200
+ ## Compatibility
201
+
202
+ The files provided are tested to work with [AutoAWQ](https://github.com/casper-hansen/AutoAWQ), and [vLLM](https://github.com/vllm-project/vllm).
203
+
204
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is not yet compatible with AWQ, but a PR is open which should bring support soon: [TGI PR #781](https://github.com/huggingface/text-generation-inference/issues/781).
205
+ <!-- README_AWQ.md-compatibility end -->
206
+
207
+ <!-- footer start -->
208
+ <!-- 200823 -->
209
+ ## Discord
210
+
211
+ For further support, and discussions on these models and AI in general, join us at:
212
+
213
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
214
+
215
+ ## Thanks, and how to contribute
216
+
217
+ Thanks to the [chirper.ai](https://chirper.ai) team!
218
+
219
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
220
+
221
+ 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.
222
+
223
+ 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.
224
+
225
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
226
+
227
+ * Patreon: https://patreon.com/TheBlokeAI
228
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
229
+
230
+ **Special thanks to**: Aemon Algiz.
231
+
232
+ **Patreon special mentions**: Alicia Loh, Stephen Murray, K, Ajan Kanaga, RoA, Magnesian, Deo Leter, Olakabola, Eugene Pentland, zynix, Deep Realms, Raymond Fosdick, Elijah Stavena, Iucharbius, Erik Bjäreholt, Luis Javier Navarrete Lozano, Nicholas, theTransient, John Detwiler, alfie_i, knownsqashed, Mano Prime, Willem Michiel, Enrico Ros, LangChain4j, OG, Michael Dempsey, Pierre Kircher, Pedro Madruga, James Bentley, Thomas Belote, Luke @flexchar, Leonard Tan, Johann-Peter Hartmann, Illia Dulskyi, Fen Risland, Chadd, S_X, Jeff Scroggin, Ken Nordquist, Sean Connelly, Artur Olbinski, Swaroop Kallakuri, Jack West, Ai Maven, David Ziegler, Russ Johnson, transmissions 11, John Villwock, Alps Aficionado, Clay Pascal, Viktor Bowallius, Subspace Studios, Rainer Wilmers, Trenton Dambrowitz, vamX, Michael Levine, 준교 김, Brandon Frisco, Kalila, Trailburnt, Randy H, Talal Aujan, Nathan Dryer, Vadim, 阿明, ReadyPlayerEmma, Tiffany J. Kim, George Stoitzev, Spencer Kim, Jerry Meng, Gabriel Tamborski, Cory Kujawski, Jeffrey Morgan, Spiking Neurons AB, Edmond Seymore, Alexandros Triantafyllidis, Lone Striker, Cap'n Zoog, Nikolai Manek, danny, ya boyyy, Derek Yates, usrbinkat, Mandus, TL, Nathan LeClaire, subjectnull, Imad Khwaja, webtim, Raven Klaugh, Asp the Wyvern, Gabriel Puliatti, Caitlyn Gatomon, Joseph William Delisle, Jonathan Leane, Luke Pendergrass, SuperWojo, Sebastain Graf, Will Dee, Fred von Graf, Andrey, Dan Guido, Daniel P. Andersen, Nitin Borwankar, Elle, Vitor Caleffi, biorpg, jjj, NimbleBox.ai, Pieter, Matthew Berman, terasurfer, Michael Davis, Alex, Stanislav Ovsiannikov
233
+
234
+
235
+ Thank you to all my generous patrons and donaters!
236
+
237
+ And thank you again to a16z for their generous grant.
238
+
239
+ <!-- footer end -->
240
+
241
+ # Original model card: Open-Orca's OpenOrca x OpenChat - Preview2 - 13B
242
+
243
+
244
+ <p><h1>🐋 The Second OpenOrca Model Preview! 🐋</h1></p>
245
+
246
+
247
+ ![OpenOrca Logo](https://huggingface.co/datasets/Open-Orca/OpenOrca/resolve/main/OpenOrcaLogo.png "OpenOrca Logo")
248
+
249
+
250
+ # OpenOrca x OpenChat - Preview2 - 13B
251
+
252
+ We have used our own [OpenOrca dataset](https://huggingface.co/datasets/Open-Orca/OpenOrca) to fine-tune Llama2-13B using [OpenChat](https://huggingface.co/openchat) packing.
253
+ This dataset is our attempt to reproduce the dataset generated for Microsoft Research's [Orca Paper](https://arxiv.org/abs/2306.02707).
254
+
255
+ This second preview release is trained on a curated filtered subset of most of our GPT-4 augmented data.
256
+
257
+ This release highlights that our dataset and training methods have surpassed performance parity with the Orca paper.
258
+ We measured this with BigBench-Hard and AGIEval results with the same methods as used in the Orca paper, finding **~103%** of original Orca's performance on average.
259
+ As well, this is done with <1/10th the compute requirement and using <20% of the dataset size from the original Orca paper.
260
+
261
+ We have run extensive evaluations internally and expect this model to **place number 1** on both the HuggingFaceH4 Open LLM Leaderboard and the GPT4ALL Leaderboard for 13B models.
262
+
263
+ "One" of [OpenChat](https://huggingface.co/openchat) has joined our team, and we'd like to provide special thanks for their training of this model!
264
+ We have utilized OpenChat [MultiPack algorithm](https://github.com/imoneoi/multipack_sampler) which achieves 99.85% bin-packing efficiency on our dataset.
265
+ This has significantly reduced training time, with efficiency improvement of 3-10X over traditional methods.
266
+
267
+
268
+ <img src="https://raw.githubusercontent.com/imoneoi/openchat/master/assets/logo_new.png" style="width: 40%">
269
+
270
+
271
+ Want to visualize our full (pre-filtering) dataset? Check out our [Nomic Atlas Map](https://atlas.nomic.ai/map/c1b88b47-2d9b-47e0-9002-b80766792582/2560fd25-52fe-42f1-a58f-ff5eccc890d2).
272
+
273
+
274
+ [<img src="https://huggingface.co/Open-Orca/OpenOrca-Preview1-13B/resolve/main/OpenOrca%20Nomic%20Atlas.png" alt="Atlas Nomic Dataset Map" width="400" height="400" />](https://atlas.nomic.ai/map/c1b88b47-2d9b-47e0-9002-b80766792582/2560fd25-52fe-42f1-a58f-ff5eccc890d2)
275
+
276
+
277
+ We are in-process with training more models, so keep a look out on our org for releases coming soon with exciting partners.
278
+
279
+ We will also give sneak-peak announcements on our Discord, which you can find here:
280
+
281
+ https://AlignmentLab.ai
282
+
283
+ # Prompt Template
284
+
285
+ We use our own prompt template which we call "`OpenChat Llama2 V1`".
286
+
287
+ The model is heavily conditioned to work using this format only and will likely encounter issues such as run-on output which emulates a chat between a user and assistant if this format is not properly followed.
288
+
289
+
290
+ Examples:
291
+ ```
292
+ # Single-turn `OpenChat Llama2 V1`
293
+ tokenize("You are OpenOrcaChat.<|end_of_turn|>User: Hello<|end_of_turn|>Assistant:")
294
+ # [1, 887, 526, 4673, 2816, 1113, 1451, 271, 29889, 32000, 4911, 29901, 15043, 32000, 4007, 22137, 29901]
295
+
296
+ # Multi-turn `OpenChat Llama2 V1`
297
+ tokenize("You are OpenOrcaChat.<|end_of_turn|>User: Hello<|end_of_turn|>Assistant: Hi<|end_of_turn|>User: How are you today?<|end_of_turn|>Assistant:")
298
+ # [1, 887, 526, 4673, 2816, 1113, 1451, 271, 29889, 32000, 4911, 29901, 15043, 32000, 4007, 22137, 29901, 6324, 32000, 4911, 29901, 1128, 526, 366, 9826, 29973, 32000, 4007, 22137, 29901]
299
+ ```
300
+
301
+ For UIs with Prefix and Suffix fields, these will likely work:
302
+
303
+ Prefix (include a space after colon):
304
+ ```
305
+ User:
306
+ ```
307
+
308
+ Suffix (space after colon):
309
+ ```
310
+ <|end_of_turn|>\nAssistant:
311
+ ```
312
+
313
+ **Oobabooga's text-generation-webui instructions can be found [further down the page](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B#serving-with-oobabooga--text-generation-webui).**
314
+
315
+
316
+ # Evaluation
317
+
318
+ We have evaluated **OpenOrcaxOpenChat-Preview2-13B** on hard reasoning tasks from BigBench-Hard and AGIEval as outlined in the Orca paper.
319
+
320
+ Our average performance for BigBench-Hard: 0.488
321
+
322
+ Average for AGIEval: 0.447
323
+
324
+ We find our score averages to **~103%** of the total performance that was shown in the Orca paper, using the same evaluation methods as outlined in the paper.
325
+
326
+ So we are surpassing Orca performance with <20% of the dataset size and <1/10th the training budget!
327
+
328
+ As well, we have evaluated using the methodology and tools for the HuggingFace Leaderboard and GPT4ALL Leaderboard, and find that we place #1 on both for all 13B models at release time!
329
+
330
+ ## AGIEval Performance
331
+
332
+ We present our results in two columns.
333
+ The column for "`(Orca Paper eval)`" uses the methods outlined in the Orca paper, so as to be a direct apples-to-apples comparison with the results from the paper.
334
+ The column for "`(HF Leaderboard eval)`" uses EleutherAI's LM Evaluation Harness with settings outlined by HuggingFace. These results are not comparable to the other columns, as the methods are different.
335
+
336
+ ![OpenOrca Preview2 AGIEval Performance](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B/resolve/main/Images/OpenOrcaP2AGIEval.png "AGIEval Performance")
337
+
338
+ ## BigBench-Hard Performance
339
+
340
+ We present our results in two columns.
341
+ The column for "`(Orca Paper eval)`" uses the methods outlined in the Orca paper, so as to be a direct apples-to-apples comparison with the results from the paper.
342
+ The column for "`(HF Leaderboard eval)`" uses EleutherAI's LM Evaluation Harness with settings outlined by HuggingFace. These results are not comparable to the other columns, as the methods are different.
343
+
344
+ ![OpenOrca Preview2 BigBench-Hard Performance](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B/resolve/main/Images/OpenOrcaP2BigBenchHardEval.png "BigBench-Hard Performance")
345
+
346
+ ## HuggingFaceH4 Open LLM Leaderboard Performance
347
+
348
+ We have run our own tests using parameters matching the [HuggingFaceH4 Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard) evals.
349
+
350
+ We place #1 for all 13B models at release time!
351
+
352
+ ![OpenOrca Preview2 HuggingFace Leaderboard Internal Performance](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B/resolve/main/Images/OpenOrcaP2HuggingFaceLeaderboard.png "HuggingFace Leaderboard Internal Performance")
353
+
354
+ **Update Aug 10th:** The official results on the leaderboard are below.
355
+
356
+ ![OpenOrca Preview2 HuggingFace Leaderboard Performance](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B/resolve/main/Images/OpenOrcaP2HFLeaderboardOfficial.png "HuggingFace Leaderboard Performance")
357
+
358
+ Since our release, a new model which merges an Orca-style model with a Platypus (trained on STEM and logic) model places narrowly above ours, but we were #1 at release time.
359
+
360
+ Below we also highlight how our model fits relative to models of all sizes on the current (as of Aug 10th, 2023) leaderboard.
361
+
362
+ ![OpenOrca Preview2 HuggingFace Leaderboard Performance](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B/resolve/main/Images/OpenOrcaP2HFLeaderboardFull.png "HuggingFace Full Leaderboard")
363
+
364
+ Notably, performance is beyond falcon-40b-instruct, and close to LLaMA1-65B base.
365
+
366
+ ## GPT4ALL Leaderboard Performance
367
+
368
+ We have tested using parameters matching the GPT4ALL Benchmark Suite and report our results and placement vs their official reporting below.
369
+
370
+ We place #1 for all open models and come within comparison of `text-davinci-003`, a proprietary OpenAI model an order of magnitude larger.
371
+
372
+ ![OpenOrca Preview2 GPT4ALL Performance](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B/resolve/main/Images/OpenOrcaP2GPT4ALL_Leaderboard.png "GPT4ALL Performance")
373
+
374
+
375
+ # Dataset
376
+
377
+ 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.
378
+ Further details of our curation practices will be forthcoming with our full model releases.
379
+
380
+
381
+ # Training
382
+
383
+ We trained with 8x A100-80G GPUs for 46 hours, completing 5 epochs of full fine tuning on our dataset in one training run.
384
+ This contrasts with the 20x A100-80G GPUs for 200 hours used in the Orca paper, for only 3 epochs, and requiring stacked training (which is known to suffer catastrophic forgetting).
385
+ Our compute requirement was <1/10th that of the original Orca.
386
+ Commodity cost was ~$600.
387
+
388
+ Please await our full releases for further training details.
389
+
390
+
391
+ # Serving
392
+
393
+ This model is most easily served with [OpenChat's](https://github.com/imoneoi/openchat) customized vLLM OpenAI-compatible API server.
394
+ This is highly recommended as it is by far the fastest in terms of inference speed and is a quick and easy option for setup.
395
+ We also illustrate setup of Oobabooga/text-generation-webui below. The settings outlined there will also apply to other uses of `Transformers`.
396
+
397
+ ## Serving Quantized
398
+
399
+ Pre-quantized models are now available courtesy of our friend TheBloke:
400
+
401
+ * **GGML**: https://huggingface.co/TheBloke/OpenOrcaxOpenChat-Preview2-13B-GGML
402
+ * **GPTQ**: https://huggingface.co/TheBloke/OpenOrcaxOpenChat-Preview2-13B-GPTQ
403
+
404
+ The serving instructions below only apply to the unquantized model being presented in the repository you are viewing here.
405
+ There are some notes, such as on use of the prompt format, that will still apply to the quantized models though.
406
+
407
+ ## Serving with OpenChat
408
+
409
+ [Install OpenChat](https://github.com/imoneoi/openchat/#installation)
410
+
411
+ After installation, run:
412
+
413
+ ```bash
414
+ python -m ochat.serving.openai_api_server \
415
+ --model-type openchat_llama2 \
416
+ --model Open-Orca/OpenOrcaxOpenChat-Preview2-13B \
417
+ --engine-use-ray --worker-use-ray --max-num-batched-tokens 5120
418
+ ```
419
+
420
+ Follow the OpenChat documentation to use features such as tensor parallelism on consumer GPUs, API keys, and logging.
421
+ You may then connect to the OpenAI-compatible API endpoint with tools such as [BetterGPT.chat](https://bettergpt.chat).
422
+
423
+ ## Serving with Oobabooga / text-generation-webui
424
+
425
+ The model may also be loaded via [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui/) in a similar manner to other models.
426
+ See the requirements below. Note that inference with just the Transformers library is significantly slower than using the recommended OpenChat vLLM server.
427
+
428
+ ### Oobabooga Key Requirements
429
+
430
+ * You will first need to download the model as you normally do to the "`models/`" folder of your `text-generation-webui` installation.
431
+ * To use the unquantized model presented here, select "`Transformers`"" in the webui's "`Model`" tab "`Model loader`" dropdown.
432
+ * You will likely want to tick "`auto-devices`". The model will require >40GB VRAM after loading in context for inference.
433
+ * The model was trained in bf16, so tick the "`bf16`" box for best performance.
434
+ * It will run safely on single GPUs with VRAM >=48GB (e.g. A6000)
435
+ * If using consumer GPUs, e.g. 2x RTX3090 24GB, you will likely want to enter "18,17" under "`tensor_split`" to split the model across both GPUs
436
+ * The model will perform significantly better if you use the appropriate prompting template
437
+ * We will submit a PR to include our prompting template into text-generation-webui soon
438
+ * For now, manually enter the settings described in the following sections:
439
+
440
+ ### Oobabooga Chat Settings
441
+
442
+ In the "`Chat settings`" tab, select the following settings:
443
+
444
+ For "`User String`" ...
445
+ ```
446
+ User:
447
+ ```
448
+ For "`Bot string`" ...
449
+ ```
450
+ Assistant:
451
+ ```
452
+ For "`Context`", this is analogous to system prompt.
453
+ It is not necessary, but we have found good results with the below example.
454
+ System prompts used in the Orca training also work well. ...
455
+ ```
456
+ You are a helpful assistant. Please answer truthfully and write out your thinking step by step to be sure you get the right answer. If you make a mistake or encounter an error in your thinking, say so out loud and attempt to correct it. If you don't know or aren't sure about something, say so clearly. You will act as a professional logician, mathematician, and physicist. You will also act as the most appropriate type of expert to answer any particular question or solve the relevant problem; state which expert type your are, if so. Also think of any particular named expert that would be ideal to answer the relevant question or solve the relevant problem; name and act as them, if appropriate.
457
+ ```
458
+ For "`Turn template`", this is absolutely essential to have. You will get poor, mixed up output without this template ...
459
+ ```
460
+ <|user|> <|user-message|><|end_of_turn|>\n<|bot|> <|bot-message|>\n
461
+ ```
462
+
463
+ When done, it should look as below:
464
+ <img src="https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B/resolve/main/Images/OpenOrcaLlama2OobaboogaChatInstructionTemplate.png" style="width: 40%">
465
+
466
+ You may then save this as a named template preset by clicking the "Floppy" icon and giving it an appropriate name in the popup, e.g. "`OpenOrcaxOpenChat Llama2`".
467
+
468
+ ### Oobabooga Text Generation Mode
469
+
470
+ In the "`Text generation`" tab, select "`instruct`" as the mode:
471
+
472
+ #### Mode Illustration
473
+ It should look as below:
474
+ <img src="https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B/resolve/main/Images/OpenOrcaLlama2OobaboogaInstructMode.png" style="width: 40%">
475
+
476
+ Then you should be ready to generate!
477
+
478
+ # Citation
479
+
480
+ ```bibtex
481
+ @software{OpenOrcaxOpenChatPreview2,
482
+ title = {OpenOrcaxOpenChatPreview2: Llama2-13B Model Instruct-tuned on Filtered OpenOrcaV1 GPT-4 Dataset},
483
+ author = {Guan Wang and Bleys Goodson and Wing Lian and Eugene Pentland and Austin Cook and Chanvichet Vong and "Teknium"},
484
+ year = {2023},
485
+ publisher = {HuggingFace},
486
+ journal = {HuggingFace repository},
487
+ howpublished = {\url{https://https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B},
488
+ }
489
+ @software{openchat,
490
+ title = {{OpenChat: Advancing Open-source Language Models with Imperfect Data}},
491
+ author = {Wang, Guan and Cheng, Sijie and Yu, Qiying and Liu, Changling},
492
+ doi = {10.5281/zenodo.8105775},
493
+ url = {https://github.com/imoneoi/openchat},
494
+ version = {pre-release},
495
+ year = {2023},
496
+ month = {7},
497
+ }
498
+ @misc{mukherjee2023orca,
499
+ title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
500
+ author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
501
+ year={2023},
502
+ eprint={2306.02707},
503
+ archivePrefix={arXiv},
504
+ primaryClass={cs.CL}
505
+ }
506
+ @misc{longpre2023flan,
507
+ title={The Flan Collection: Designing Data and Methods for Effective Instruction Tuning},
508
+ 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},
509
+ year={2023},
510
+ eprint={2301.13688},
511
+ archivePrefix={arXiv},
512
+ primaryClass={cs.AI}
513
+ }
514
+ @misc{touvron2023llama,
515
+ title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
516
+ author={Hugo Touvron and Louis Martin and Kevin Stone and Peter Albert and Amjad Almahairi and Yasmine Babaei and Nikolay Bashlykov and Soumya Batra and Prajjwal Bhargava and Shruti Bhosale and Dan Bikel and Lukas Blecher and Cristian Canton Ferrer and Moya Chen and Guillem Cucurull and David Esiobu and Jude Fernandes and Jeremy Fu and Wenyin Fu and Brian Fuller and Cynthia Gao and Vedanuj Goswami and Naman Goyal and Anthony Hartshorn and Saghar Hosseini and Rui Hou and Hakan Inan and Marcin Kardas and Viktor Kerkez and Madian Khabsa and Isabel Kloumann and Artem Korenev and Punit Singh Koura and Marie-Anne Lachaux and Thibaut Lavril and Jenya Lee and Diana Liskovich and Yinghai Lu and Yuning Mao and Xavier Martinet and Todor Mihaylov and Pushkar Mishra and Igor Molybog and Yixin Nie and Andrew Poulton and Jeremy Reizenstein and Rashi Rungta and Kalyan Saladi and Alan Schelten and Ruan Silva and Eric Michael Smith and Ranjan Subramanian and Xiaoqing Ellen Tan and Binh Tang and Ross Taylor and Adina Williams and Jian Xiang Kuan and Puxin Xu and Zheng Yan and Iliyan Zarov and Yuchen Zhang and Angela Fan and Melanie Kambadur and Sharan Narang and Aurelien Rodriguez and Robert Stojnic and Sergey Edunov and Thomas Scialom},
517
+ year={2023},
518
+ eprint={2307.09288},
519
+ archivePrefix={arXiv},
520
+ }
521
+ ```