Initial GPTQ model commit
Browse files
README.md
ADDED
@@ -0,0 +1,366 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
datasets:
|
3 |
+
- Open-Orca/OpenOrca
|
4 |
+
inference: false
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
library_name: transformers
|
8 |
+
license: other
|
9 |
+
model_creator: Open-Orca
|
10 |
+
model_link: https://huggingface.co/Open-Orca/LlongOrca-7B-16k
|
11 |
+
model_name: LlongOrca 7B 16K
|
12 |
+
model_type: llama
|
13 |
+
pipeline_tag: text-generation
|
14 |
+
quantized_by: TheBloke
|
15 |
+
---
|
16 |
+
|
17 |
+
<!-- header start -->
|
18 |
+
<div style="width: 100%;">
|
19 |
+
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
20 |
+
</div>
|
21 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
22 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
23 |
+
<p><a href="https://discord.gg/theblokeai">Chat & support: my new Discord server</a></p>
|
24 |
+
</div>
|
25 |
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
26 |
+
<p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
|
27 |
+
</div>
|
28 |
+
</div>
|
29 |
+
<!-- header end -->
|
30 |
+
|
31 |
+
# LlongOrca 7B 16K - GPTQ
|
32 |
+
- Model creator: [Open-Orca](https://huggingface.co/Open-Orca)
|
33 |
+
- Original model: [LlongOrca 7B 16K](https://huggingface.co/Open-Orca/LlongOrca-7B-16k)
|
34 |
+
|
35 |
+
## Description
|
36 |
+
|
37 |
+
This repo contains GPTQ model files for [Open-Orca's LlongOrca 7B 16K](https://huggingface.co/Open-Orca/LlongOrca-7B-16k).
|
38 |
+
|
39 |
+
Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.
|
40 |
+
|
41 |
+
## Repositories available
|
42 |
+
|
43 |
+
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/LlongOrca-7B-16K-GPTQ)
|
44 |
+
* [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/LlongOrca-7B-16K-GGML)
|
45 |
+
* [Open-Orca's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/Open-Orca/LlongOrca-7B-16k)
|
46 |
+
|
47 |
+
## Prompt template: ChatML
|
48 |
+
|
49 |
+
```
|
50 |
+
<|im_start|>system
|
51 |
+
A conversation between a user and an LLM-based AI assistant. The assistant gives helpful and honest answers.<|im_end|>
|
52 |
+
<|im_start|>user
|
53 |
+
{prompt}<|im_end|>
|
54 |
+
<|im_start|>assistant
|
55 |
+
```
|
56 |
+
|
57 |
+
## Provided files and GPTQ parameters
|
58 |
+
|
59 |
+
Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
|
60 |
+
|
61 |
+
Each separate quant is in a different branch. See below for instructions on fetching from different branches.
|
62 |
+
|
63 |
+
All GPTQ files are made with AutoGPTQ.
|
64 |
+
|
65 |
+
<details>
|
66 |
+
<summary>Explanation of GPTQ parameters</summary>
|
67 |
+
|
68 |
+
- Bits: The bit size of the quantised model.
|
69 |
+
- GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
|
70 |
+
- Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have issues with models that use Act Order plus Group Size.
|
71 |
+
- Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
|
72 |
+
- GPTQ dataset: The dataset used for quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s).
|
73 |
+
- Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences.
|
74 |
+
- ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
|
75 |
+
|
76 |
+
</details>
|
77 |
+
|
78 |
+
| Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
|
79 |
+
| ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
|
80 |
+
| [main](https://huggingface.co/TheBloke/LlongOrca-7B-16K-GPTQ/tree/main) | 4 | 128 | No | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 8192 | 3.90 GB | Yes | Most compatible option. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. Lower inference quality than other options. |
|
81 |
+
| [gptq-4bit-32g-actorder_True](https://huggingface.co/TheBloke/LlongOrca-7B-16K-GPTQ/tree/gptq-4bit-32g-actorder_True) | 4 | 32 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 8192 | 4.28 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. Poor AutoGPTQ CUDA speed. |
|
82 |
+
| [gptq-4bit-64g-actorder_True](https://huggingface.co/TheBloke/LlongOrca-7B-16K-GPTQ/tree/gptq-4bit-64g-actorder_True) | 4 | 64 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 8192 | 4.02 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
|
83 |
+
| [gptq-4bit-128g-actorder_True](https://huggingface.co/TheBloke/LlongOrca-7B-16K-GPTQ/tree/gptq-4bit-128g-actorder_True) | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 8192 | 3.90 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. Poor AutoGPTQ CUDA speed. |
|
84 |
+
| [gptq-8bit--1g-actorder_True](https://huggingface.co/TheBloke/LlongOrca-7B-16K-GPTQ/tree/gptq-8bit--1g-actorder_True) | 8 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 8192 | 7.01 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements and to improve AutoGPTQ speed. |
|
85 |
+
| [gptq-8bit-128g-actorder_True](https://huggingface.co/TheBloke/LlongOrca-7B-16K-GPTQ/tree/gptq-8bit-128g-actorder_True) | 8 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 8192 | 7.16 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. Poor AutoGPTQ CUDA speed. |
|
86 |
+
|
87 |
+
## How to download from branches
|
88 |
+
|
89 |
+
- In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/LlongOrca-7B-16K-GPTQ:gptq-4bit-32g-actorder_True`
|
90 |
+
- With Git, you can clone a branch with:
|
91 |
+
```
|
92 |
+
git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/LlongOrca-7B-16K-GPTQ
|
93 |
+
```
|
94 |
+
- In Python Transformers code, the branch is the `revision` parameter; see below.
|
95 |
+
|
96 |
+
## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
|
97 |
+
|
98 |
+
Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
|
99 |
+
|
100 |
+
It is strongly recommended to use the text-generation-webui one-click-installers unless you know how to make a manual install.
|
101 |
+
|
102 |
+
1. Click the **Model tab**.
|
103 |
+
2. Under **Download custom model or LoRA**, enter `TheBloke/LlongOrca-7B-16K-GPTQ`.
|
104 |
+
- To download from a specific branch, enter for example `TheBloke/LlongOrca-7B-16K-GPTQ:gptq-4bit-32g-actorder_True`
|
105 |
+
- see Provided Files above for the list of branches for each option.
|
106 |
+
3. Click **Download**.
|
107 |
+
4. The model will start downloading. Once it's finished it will say "Done"
|
108 |
+
5. In the top left, click the refresh icon next to **Model**.
|
109 |
+
6. In the **Model** dropdown, choose the model you just downloaded: `LlongOrca-7B-16K-GPTQ`
|
110 |
+
7. The model will automatically load, and is now ready for use!
|
111 |
+
8. 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.
|
112 |
+
* Note that you do not need to set GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
|
113 |
+
9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
|
114 |
+
|
115 |
+
## How to use this GPTQ model from Python code
|
116 |
+
|
117 |
+
First make sure you have [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) 0.3.1 or later installed:
|
118 |
+
|
119 |
+
```
|
120 |
+
pip3 install auto-gptq
|
121 |
+
```
|
122 |
+
|
123 |
+
If you have problems installing AutoGPTQ, please build from source instead:
|
124 |
+
```
|
125 |
+
pip3 uninstall -y auto-gptq
|
126 |
+
git clone https://github.com/PanQiWei/AutoGPTQ
|
127 |
+
cd AutoGPTQ
|
128 |
+
pip3 install .
|
129 |
+
```
|
130 |
+
|
131 |
+
Then try the following example code:
|
132 |
+
|
133 |
+
```python
|
134 |
+
from transformers import AutoTokenizer, pipeline, logging
|
135 |
+
from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
|
136 |
+
|
137 |
+
model_name_or_path = "TheBloke/LlongOrca-7B-16K-GPTQ"
|
138 |
+
|
139 |
+
use_triton = False
|
140 |
+
|
141 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
|
142 |
+
|
143 |
+
model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
|
144 |
+
use_safetensors=True,
|
145 |
+
trust_remote_code=False,
|
146 |
+
device="cuda:0",
|
147 |
+
use_triton=use_triton,
|
148 |
+
quantize_config=None)
|
149 |
+
|
150 |
+
"""
|
151 |
+
# To download from a specific branch, use the revision parameter, as in this example:
|
152 |
+
# Note that `revision` requires AutoGPTQ 0.3.1 or later!
|
153 |
+
|
154 |
+
model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
|
155 |
+
revision="gptq-4bit-32g-actorder_True",
|
156 |
+
use_safetensors=True,
|
157 |
+
trust_remote_code=False,
|
158 |
+
device="cuda:0",
|
159 |
+
quantize_config=None)
|
160 |
+
"""
|
161 |
+
|
162 |
+
prompt = "Tell me about AI"
|
163 |
+
prompt_template=f'''<|im_start|>system
|
164 |
+
A conversation between a user and an LLM-based AI assistant. The assistant gives helpful and honest answers.<|im_end|>
|
165 |
+
<|im_start|>user
|
166 |
+
{prompt}<|im_end|>
|
167 |
+
<|im_start|>assistant
|
168 |
+
'''
|
169 |
+
|
170 |
+
print("\n\n*** Generate:")
|
171 |
+
|
172 |
+
input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
|
173 |
+
output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)
|
174 |
+
print(tokenizer.decode(output[0]))
|
175 |
+
|
176 |
+
# Inference can also be done using transformers' pipeline
|
177 |
+
|
178 |
+
# Prevent printing spurious transformers error when using pipeline with AutoGPTQ
|
179 |
+
logging.set_verbosity(logging.CRITICAL)
|
180 |
+
|
181 |
+
print("*** Pipeline:")
|
182 |
+
pipe = pipeline(
|
183 |
+
"text-generation",
|
184 |
+
model=model,
|
185 |
+
tokenizer=tokenizer,
|
186 |
+
max_new_tokens=512,
|
187 |
+
temperature=0.7,
|
188 |
+
top_p=0.95,
|
189 |
+
repetition_penalty=1.15
|
190 |
+
)
|
191 |
+
|
192 |
+
print(pipe(prompt_template)[0]['generated_text'])
|
193 |
+
```
|
194 |
+
|
195 |
+
## Compatibility
|
196 |
+
|
197 |
+
The files provided will work with AutoGPTQ (CUDA and Triton modes), GPTQ-for-LLaMa (only CUDA has been tested), and Occ4m's GPTQ-for-LLaMa fork.
|
198 |
+
|
199 |
+
ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
|
200 |
+
|
201 |
+
<!-- footer start -->
|
202 |
+
## Discord
|
203 |
+
|
204 |
+
For further support, and discussions on these models and AI in general, join us at:
|
205 |
+
|
206 |
+
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
207 |
+
|
208 |
+
## Thanks, and how to contribute.
|
209 |
+
|
210 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
211 |
+
|
212 |
+
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.
|
213 |
+
|
214 |
+
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.
|
215 |
+
|
216 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
217 |
+
|
218 |
+
* Patreon: https://patreon.com/TheBlokeAI
|
219 |
+
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
220 |
+
|
221 |
+
**Special thanks to**: Luke from CarbonQuill, Aemon Algiz.
|
222 |
+
|
223 |
+
**Patreon special mentions**: Ajan Kanaga, David Ziegler, Raymond Fosdick, SuperWojo, Sam, webtim, Steven Wood, knownsqashed, Tony Hughes, Junyu Yang, J, Olakabola, Dan Guido, Stephen Murray, John Villwock, vamX, William Sang, Sean Connelly, LangChain4j, Olusegun Samson, Fen Risland, Derek Yates, Karl Bernard, transmissions 11, Trenton Dambrowitz, Pieter, Preetika Verma, Swaroop Kallakuri, Andrey, Slarti, Jonathan Leane, Michael Levine, Kalila, Joseph William Delisle, Rishabh Srivastava, Deo Leter, Luke Pendergrass, Spencer Kim, Geoffrey Montalvo, Thomas Belote, Jeffrey Morgan, Mandus, ya boyyy, Matthew Berman, Magnesian, Ai Maven, senxiiz, Alps Aficionado, Luke @flexchar, Raven Klaugh, Imad Khwaja, Gabriel Puliatti, Johann-Peter Hartmann, usrbinkat, Spiking Neurons AB, Artur Olbinski, chris gileta, danny, Willem Michiel, WelcomeToTheClub, Deep Realms, alfie_i, Dave, Leonard Tan, NimbleBox.ai, Randy H, Daniel P. Andersen, Pyrater, Will Dee, Elle, Space Cruiser, Gabriel Tamborski, Asp the Wyvern, Illia Dulskyi, Nikolai Manek, Sid, Brandon Frisco, Nathan LeClaire, Edmond Seymore, Enrico Ros, Pedro Madruga, Eugene Pentland, John Detwiler, Mano Prime, Stanislav Ovsiannikov, Alex, Vitor Caleffi, K, biorpg, Michael Davis, Lone Striker, Pierre Kircher, theTransient, Fred von Graf, Sebastain Graf, Vadim, Iucharbius, Clay Pascal, Chadd, Mesiah Bishop, terasurfer, Rainer Wilmers, Alexandros Triantafyllidis, Stefan Sabev, Talal Aujan, Cory Kujawski, Viktor Bowallius, subjectnull, ReadyPlayerEmma, zynix
|
224 |
+
|
225 |
+
|
226 |
+
Thank you to all my generous patrons and donaters!
|
227 |
+
|
228 |
+
<!-- footer end -->
|
229 |
+
|
230 |
+
# Original model card: Open-Orca's LlongOrca 7B 16K
|
231 |
+
|
232 |
+
|
233 |
+
<p><h1>🐋 The First Llong Context Orca! 🐋</h1></p>
|
234 |
+
|
235 |
+
|
236 |
+
![OpenOrca Logo](https://huggingface.co/datasets/Open-Orca/OpenOrca/resolve/main/OpenOrcaLogo.png "OpenOrca Logo")
|
237 |
+
|
238 |
+
|
239 |
+
# OpenOrca - LlongOrca - 7B - 16k
|
240 |
+
|
241 |
+
We have used our own [OpenOrca dataset](https://huggingface.co/datasets/Open-Orca/OpenOrca) to fine-tune on top of [LLongMA-2-7b-16k](https://huggingface.co/conceptofmind/LLongMA-2-7b-16k).
|
242 |
+
This dataset is our attempt to reproduce the dataset generated for Microsoft Research's [Orca Paper](https://arxiv.org/abs/2306.02707).
|
243 |
+
We use [OpenChat](https://huggingface.co/openchat) packing, trained with [Axolotl](https://github.com/OpenAccess-AI-Collective/axolotl).
|
244 |
+
|
245 |
+
This release is trained on a curated filtered subset of most of our GPT-4 augmented data.
|
246 |
+
It is the same subset of our data as was used in our [OpenOrcaxOpenChat-Preview2-13B model](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B).
|
247 |
+
|
248 |
+
This release reveals that stacking our training on an existing long context fine-tuned model yields significant improvements to model performance.
|
249 |
+
We measured this with BigBench-Hard and AGIEval results, finding **~134%** of the base Llongma2-16k model's performance on average.
|
250 |
+
|
251 |
+
We have run extensive evaluations internally and expect this model to place number 4 on the HuggingFaceH4 Open LLM Leaderboard for 7B models, but with >99% performance of the first place and **place number 1** for longer context 7B models.
|
252 |
+
|
253 |
+
We did this training as part of testing integration of OpenChat's [MultiPack algorithm](https://github.com/imoneoi/multipack_sampler) into the Axolotl trainer.
|
254 |
+
MultiPack achieves 99.85% bin-packing efficiency on our dataset.
|
255 |
+
This has significantly reduced training time, with efficiency improvement of 3-10X over traditional methods.
|
256 |
+
|
257 |
+
|
258 |
+
<img src="https://raw.githubusercontent.com/imoneoi/openchat/master/assets/logo_new.png" style="width: 300px">
|
259 |
+
|
260 |
+
|
261 |
+
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).
|
262 |
+
|
263 |
+
|
264 |
+
[<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)
|
265 |
+
|
266 |
+
|
267 |
+
Many thanks to @EnricoShippole, @theemozilla, and @kaiokendev1 for the fine work on creating the LlongMA-2-7b-16k model this was trained on top of!
|
268 |
+
|
269 |
+
We are in-process with training more models, so keep a look out on our org for releases coming soon with exciting partners.
|
270 |
+
|
271 |
+
We will also give sneak-peak announcements on our Discord, which you can find here:
|
272 |
+
|
273 |
+
https://AlignmentLab.ai
|
274 |
+
|
275 |
+
# Prompt Template
|
276 |
+
|
277 |
+
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.
|
278 |
+
|
279 |
+
# Evaluation
|
280 |
+
|
281 |
+
We have evaluated using the methodology and tools for the HuggingFace Leaderboard, and find that we have significantly improved upon the base long context model.
|
282 |
+
As well, we should place #4 among all 7B models (and #1 for a model with long context) at release time!
|
283 |
+
|
284 |
+
## AGIEval Performance
|
285 |
+
|
286 |
+
We present our performance on AGI Eval in comparison to base Llama2-7B and to [Llongma2-7b-16k](https://huggingface.co/conceptofmind/LLongMA-2-7b-16k), which we trained on top of.
|
287 |
+
This demonstrates the benefits of stacking OpenOrca dataset training on existing models.
|
288 |
+
Most notably, there is a very dramatic improvement of nearly 3X in the English writing performance.
|
289 |
+
|
290 |
+
![LlongOrca 7B 16k AGIEval Performance](https://huggingface.co/Open-Orca/LlongOrca-7B-16k/resolve/main/Images/LlongOrca7BAGIEval.png "AGIEval Performance")
|
291 |
+
|
292 |
+
## BigBench-Hard Performance
|
293 |
+
|
294 |
+
We present our performance on BigBench-Hard in comparison to base Llama2-7B and to [Llongma2-7b-16k](https://huggingface.co/conceptofmind/LLongMA-2-7b-16k), which we trained on top of.
|
295 |
+
This demonstrates the benefits of stacking OpenOrca dataset training on existing models.
|
296 |
+
|
297 |
+
![LlongOrca 7B 16k BigBench-Hard Performance](https://huggingface.co/Open-Orca/LlongOrca-7B-16k/resolve/main/Images/LlongOrca7BBigBenchHard.png "BigBench-Hard Performance")
|
298 |
+
|
299 |
+
## HuggingFaceH4 Open LLM Leaderboard Performance
|
300 |
+
|
301 |
+
We have run our own tests using parameters matching the [HuggingFaceH4 Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard) evals.
|
302 |
+
|
303 |
+
We place #4 for all 7B models at release time, and #1 for long context models.
|
304 |
+
|
305 |
+
![LlongOrca 7B 16k Leaderboard Internal Performance](https://huggingface.co/Open-Orca/LlongOrca-7B-16k/resolve/main/Images/LlongOrca7BHFLeaderboard.png "HuggingFace Leaderboard Internal Performance")
|
306 |
+
|
307 |
+
|
308 |
+
# Dataset
|
309 |
+
|
310 |
+
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.
|
311 |
+
Further details of our curation practices will be forthcoming with our full model releases.
|
312 |
+
|
313 |
+
|
314 |
+
# Training
|
315 |
+
|
316 |
+
[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
|
317 |
+
|
318 |
+
We trained with 8x A6000-48GB (first-gen) GPUs for 37 hours, completing 4 epochs of full fine tuning on our dataset in one training run.
|
319 |
+
Commodity cost was ~$200.
|
320 |
+
Axolotl training parameters can be found in [configs/oo7b.yml](https://huggingface.co/Open-Orca/LlongOrca-7B-16k/blob/main/configs/oo-7b.yml).
|
321 |
+
We used the `packing-attn` branch of Axolotl during training.
|
322 |
+
|
323 |
+
# Citation
|
324 |
+
|
325 |
+
```bibtex
|
326 |
+
@software{lian2023llongorca7b,
|
327 |
+
title = {LlongOrca7B: Llama2-7B Model Instruct-tuned for Long Context on Filtered OpenOrcaV1 GPT-4 Dataset},
|
328 |
+
author = {Wing Lian and Bleys Goodson and Guan Wang and Eugene Pentland and Austin Cook and Chanvichet Vong and "Teknium"},
|
329 |
+
year = {2023},
|
330 |
+
publisher = {HuggingFace},
|
331 |
+
journal = {HuggingFace repository},
|
332 |
+
howpublished = {\url{https://https://huggingface.co/Open-Orca/LlongOrca-7B-16k},
|
333 |
+
}
|
334 |
+
@software{openchat,
|
335 |
+
title = {{OpenChat: Advancing Open-source Language Models with Imperfect Data}},
|
336 |
+
author = {Wang, Guan and Cheng, Sijie and Yu, Qiying and Liu, Changling},
|
337 |
+
doi = {10.5281/zenodo.8105775},
|
338 |
+
url = {https://github.com/imoneoi/openchat},
|
339 |
+
version = {pre-release},
|
340 |
+
year = {2023},
|
341 |
+
month = {7},
|
342 |
+
}
|
343 |
+
@misc{mukherjee2023orca,
|
344 |
+
title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
|
345 |
+
author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
|
346 |
+
year={2023},
|
347 |
+
eprint={2306.02707},
|
348 |
+
archivePrefix={arXiv},
|
349 |
+
primaryClass={cs.CL}
|
350 |
+
}
|
351 |
+
@misc{longpre2023flan,
|
352 |
+
title={The Flan Collection: Designing Data and Methods for Effective Instruction Tuning},
|
353 |
+
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},
|
354 |
+
year={2023},
|
355 |
+
eprint={2301.13688},
|
356 |
+
archivePrefix={arXiv},
|
357 |
+
primaryClass={cs.AI}
|
358 |
+
}
|
359 |
+
@misc{touvron2023llama,
|
360 |
+
title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
|
361 |
+
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},
|
362 |
+
year={2023},
|
363 |
+
eprint={2307.09288},
|
364 |
+
archivePrefix={arXiv},
|
365 |
+
}
|
366 |
+
```
|