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Pure-Dove
|
7 |
+
- LDJnr/Verified-Camel
|
8 |
+
- PygmalionAI/PIPPA
|
9 |
+
- meta-math/MetaMathQA
|
10 |
+
- riddle_sense
|
11 |
+
inference: false
|
12 |
+
language:
|
13 |
+
- en
|
14 |
+
library_name: transformers
|
15 |
+
license: apache-2.0
|
16 |
+
model_creator: Open Access AI Collective
|
17 |
+
model_name: Jackalope 7B
|
18 |
+
model_type: mistral
|
19 |
+
pipeline_tag: text-generation
|
20 |
+
prompt_template: '<|im_start|>system
|
21 |
+
|
22 |
+
{system_message}<|im_end|>
|
23 |
+
|
24 |
+
<|im_start|>user
|
25 |
+
|
26 |
+
{prompt}<|im_end|>
|
27 |
+
|
28 |
+
<|im_start|>assistant
|
29 |
+
|
30 |
+
'
|
31 |
+
quantized_by: TheBloke
|
32 |
+
---
|
33 |
+
|
34 |
+
<!-- header start -->
|
35 |
+
<!-- 200823 -->
|
36 |
+
<div style="width: auto; margin-left: auto; margin-right: auto">
|
37 |
+
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
38 |
+
</div>
|
39 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
40 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
41 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
|
42 |
+
</div>
|
43 |
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
44 |
+
<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>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
<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>
|
48 |
+
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
49 |
+
<!-- header end -->
|
50 |
+
|
51 |
+
# Jackalope 7B - AWQ
|
52 |
+
- Model creator: [Open Access AI Collective](https://huggingface.co/openaccess-ai-collective)
|
53 |
+
- Original model: [Jackalope 7B](https://huggingface.co/openaccess-ai-collective/jackalope-7b)
|
54 |
+
|
55 |
+
<!-- description start -->
|
56 |
+
## Description
|
57 |
+
|
58 |
+
This repo contains AWQ model files for [Open Access AI Collective's Jackalope 7B](https://huggingface.co/openaccess-ai-collective/jackalope-7b).
|
59 |
+
|
60 |
+
|
61 |
+
### About AWQ
|
62 |
+
|
63 |
+
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.
|
64 |
+
|
65 |
+
It is also now supported by continuous batching server [vLLM](https://github.com/vllm-project/vllm), allowing use of Llama AWQ models for high-throughput concurrent inference in multi-user server scenarios.
|
66 |
+
|
67 |
+
As of September 25th 2023, preliminary Llama-only AWQ support has also been added to [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference).
|
68 |
+
|
69 |
+
Note that, at the time of writing, overall throughput is still lower than running vLLM or TGI 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.
|
70 |
+
<!-- description end -->
|
71 |
+
<!-- repositories-available start -->
|
72 |
+
## Repositories available
|
73 |
+
|
74 |
+
* [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/jackalope-7B-AWQ)
|
75 |
+
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/jackalope-7B-GPTQ)
|
76 |
+
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/jackalope-7B-GGUF)
|
77 |
+
* [Open Access AI Collective's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/openaccess-ai-collective/jackalope-7b)
|
78 |
+
<!-- repositories-available end -->
|
79 |
+
|
80 |
+
<!-- prompt-template start -->
|
81 |
+
## Prompt template: ChatML
|
82 |
+
|
83 |
+
```
|
84 |
+
<|im_start|>system
|
85 |
+
{system_message}<|im_end|>
|
86 |
+
<|im_start|>user
|
87 |
+
{prompt}<|im_end|>
|
88 |
+
<|im_start|>assistant
|
89 |
+
|
90 |
+
```
|
91 |
+
|
92 |
+
<!-- prompt-template end -->
|
93 |
+
|
94 |
+
|
95 |
+
<!-- README_AWQ.md-provided-files start -->
|
96 |
+
## Provided files, and AWQ parameters
|
97 |
+
|
98 |
+
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.
|
99 |
+
|
100 |
+
Models are released as sharded safetensors files.
|
101 |
+
|
102 |
+
| Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
|
103 |
+
| ------ | ---- | -- | ----------- | ------- | ---- |
|
104 |
+
| [main](https://huggingface.co/TheBloke/jackalope-7B-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 4.15 GB
|
105 |
+
|
106 |
+
<!-- README_AWQ.md-provided-files end -->
|
107 |
+
|
108 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
109 |
+
## Serving this model from vLLM
|
110 |
+
|
111 |
+
Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
|
112 |
+
|
113 |
+
Note: at the time of writing, vLLM has not yet done a new release with AWQ support.
|
114 |
+
|
115 |
+
If you try the vLLM examples below and get an error about `quantization` being unrecognised, or other AWQ-related issues, please install vLLM from Github source.
|
116 |
+
|
117 |
+
- When using vLLM as a server, pass the `--quantization awq` parameter, for example:
|
118 |
+
|
119 |
+
```shell
|
120 |
+
python3 python -m vllm.entrypoints.api_server --model TheBloke/jackalope-7B-AWQ --quantization awq --dtype half
|
121 |
+
```
|
122 |
+
|
123 |
+
When using vLLM from Python code, pass the `quantization=awq` parameter, for example:
|
124 |
+
|
125 |
+
```python
|
126 |
+
from vllm import LLM, SamplingParams
|
127 |
+
|
128 |
+
prompts = [
|
129 |
+
"Hello, my name is",
|
130 |
+
"The president of the United States is",
|
131 |
+
"The capital of France is",
|
132 |
+
"The future of AI is",
|
133 |
+
]
|
134 |
+
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
|
135 |
+
|
136 |
+
llm = LLM(model="TheBloke/jackalope-7B-AWQ", quantization="awq", dtype="half")
|
137 |
+
|
138 |
+
outputs = llm.generate(prompts, sampling_params)
|
139 |
+
|
140 |
+
# Print the outputs.
|
141 |
+
for output in outputs:
|
142 |
+
prompt = output.prompt
|
143 |
+
generated_text = output.outputs[0].text
|
144 |
+
print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
|
145 |
+
```
|
146 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
147 |
+
|
148 |
+
<!-- README_AWQ.md-use-from-tgi start -->
|
149 |
+
## Serving this model from Text Generation Inference (TGI)
|
150 |
+
|
151 |
+
Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
|
152 |
+
|
153 |
+
Example Docker parameters:
|
154 |
+
|
155 |
+
```shell
|
156 |
+
--model-id TheBloke/jackalope-7B-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
|
157 |
+
```
|
158 |
+
|
159 |
+
Example Python code for interfacing with TGI (requires huggingface-hub 0.17.0 or later):
|
160 |
+
|
161 |
+
```shell
|
162 |
+
pip3 install huggingface-hub
|
163 |
+
```
|
164 |
+
|
165 |
+
```python
|
166 |
+
from huggingface_hub import InferenceClient
|
167 |
+
|
168 |
+
endpoint_url = "https://your-endpoint-url-here"
|
169 |
+
|
170 |
+
prompt = "Tell me about AI"
|
171 |
+
prompt_template=f'''<|im_start|>system
|
172 |
+
{system_message}<|im_end|>
|
173 |
+
<|im_start|>user
|
174 |
+
{prompt}<|im_end|>
|
175 |
+
<|im_start|>assistant
|
176 |
+
|
177 |
+
'''
|
178 |
+
|
179 |
+
client = InferenceClient(endpoint_url)
|
180 |
+
response = client.text_generation(prompt,
|
181 |
+
max_new_tokens=128,
|
182 |
+
do_sample=True,
|
183 |
+
temperature=0.7,
|
184 |
+
top_p=0.95,
|
185 |
+
top_k=40,
|
186 |
+
repetition_penalty=1.1)
|
187 |
+
|
188 |
+
print(f"Model output: {response}")
|
189 |
+
```
|
190 |
+
<!-- README_AWQ.md-use-from-tgi end -->
|
191 |
+
|
192 |
+
<!-- README_AWQ.md-use-from-python start -->
|
193 |
+
## How to use this AWQ model from Python code
|
194 |
+
|
195 |
+
### Install the necessary packages
|
196 |
+
|
197 |
+
Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.1 or later
|
198 |
+
|
199 |
+
```shell
|
200 |
+
pip3 install autoawq
|
201 |
+
```
|
202 |
+
|
203 |
+
If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
|
204 |
+
|
205 |
+
```shell
|
206 |
+
pip3 uninstall -y autoawq
|
207 |
+
git clone https://github.com/casper-hansen/AutoAWQ
|
208 |
+
cd AutoAWQ
|
209 |
+
pip3 install .
|
210 |
+
```
|
211 |
+
|
212 |
+
### You can then try the following example code
|
213 |
+
|
214 |
+
```python
|
215 |
+
from awq import AutoAWQForCausalLM
|
216 |
+
from transformers import AutoTokenizer
|
217 |
+
|
218 |
+
model_name_or_path = "TheBloke/jackalope-7B-AWQ"
|
219 |
+
|
220 |
+
# Load model
|
221 |
+
model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
|
222 |
+
trust_remote_code=False, safetensors=True)
|
223 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
|
224 |
+
|
225 |
+
prompt = "Tell me about AI"
|
226 |
+
prompt_template=f'''<|im_start|>system
|
227 |
+
{system_message}<|im_end|>
|
228 |
+
<|im_start|>user
|
229 |
+
{prompt}<|im_end|>
|
230 |
+
<|im_start|>assistant
|
231 |
+
|
232 |
+
'''
|
233 |
+
|
234 |
+
print("\n\n*** Generate:")
|
235 |
+
|
236 |
+
tokens = tokenizer(
|
237 |
+
prompt_template,
|
238 |
+
return_tensors='pt'
|
239 |
+
).input_ids.cuda()
|
240 |
+
|
241 |
+
# Generate output
|
242 |
+
generation_output = model.generate(
|
243 |
+
tokens,
|
244 |
+
do_sample=True,
|
245 |
+
temperature=0.7,
|
246 |
+
top_p=0.95,
|
247 |
+
top_k=40,
|
248 |
+
max_new_tokens=512
|
249 |
+
)
|
250 |
+
|
251 |
+
print("Output: ", tokenizer.decode(generation_output[0]))
|
252 |
+
|
253 |
+
"""
|
254 |
+
# Inference should be possible with transformers pipeline as well in future
|
255 |
+
# But currently this is not yet supported by AutoAWQ (correct as of September 25th 2023)
|
256 |
+
from transformers import pipeline
|
257 |
+
|
258 |
+
print("*** Pipeline:")
|
259 |
+
pipe = pipeline(
|
260 |
+
"text-generation",
|
261 |
+
model=model,
|
262 |
+
tokenizer=tokenizer,
|
263 |
+
max_new_tokens=512,
|
264 |
+
do_sample=True,
|
265 |
+
temperature=0.7,
|
266 |
+
top_p=0.95,
|
267 |
+
top_k=40,
|
268 |
+
repetition_penalty=1.1
|
269 |
+
)
|
270 |
+
|
271 |
+
print(pipe(prompt_template)[0]['generated_text'])
|
272 |
+
"""
|
273 |
+
```
|
274 |
+
<!-- README_AWQ.md-use-from-python end -->
|
275 |
+
|
276 |
+
<!-- README_AWQ.md-compatibility start -->
|
277 |
+
## Compatibility
|
278 |
+
|
279 |
+
The files provided are tested to work with:
|
280 |
+
|
281 |
+
- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ)
|
282 |
+
- [vLLM](https://github.com/vllm-project/vllm)
|
283 |
+
- [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
|
284 |
+
|
285 |
+
TGI merged AWQ support on September 25th, 2023: [TGI PR #1054](https://github.com/huggingface/text-generation-inference/pull/1054). Use the `:latest` Docker container until the next TGI release is made.
|
286 |
+
|
287 |
+
<!-- README_AWQ.md-compatibility end -->
|
288 |
+
|
289 |
+
<!-- footer start -->
|
290 |
+
<!-- 200823 -->
|
291 |
+
## Discord
|
292 |
+
|
293 |
+
For further support, and discussions on these models and AI in general, join us at:
|
294 |
+
|
295 |
+
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
296 |
+
|
297 |
+
## Thanks, and how to contribute
|
298 |
+
|
299 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
300 |
+
|
301 |
+
Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
|
302 |
+
|
303 |
+
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.
|
304 |
+
|
305 |
+
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.
|
306 |
+
|
307 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
308 |
+
|
309 |
+
* Patreon: https://patreon.com/TheBlokeAI
|
310 |
+
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
311 |
+
|
312 |
+
**Special thanks to**: Aemon Algiz.
|
313 |
+
|
314 |
+
**Patreon special mentions**: Pierre Kircher, Stanislav Ovsiannikov, Michael Levine, Eugene Pentland, Andrey, 준교 김, Randy H, Fred von Graf, Artur Olbinski, Caitlyn Gatomon, terasurfer, Jeff Scroggin, James Bentley, Vadim, Gabriel Puliatti, Harry Royden McLaughlin, Sean Connelly, Dan Guido, Edmond Seymore, Alicia Loh, subjectnull, AzureBlack, Manuel Alberto Morcote, Thomas Belote, Lone Striker, Chris Smitley, Vitor Caleffi, Johann-Peter Hartmann, Clay Pascal, biorpg, Brandon Frisco, sidney chen, transmissions 11, Pedro Madruga, jinyuan sun, Ajan Kanaga, Emad Mostaque, Trenton Dambrowitz, Jonathan Leane, Iucharbius, usrbinkat, vamX, George Stoitzev, Luke Pendergrass, theTransient, Olakabola, Swaroop Kallakuri, Cap'n Zoog, Brandon Phillips, Michael Dempsey, Nikolai Manek, danny, Matthew Berman, Gabriel Tamborski, alfie_i, Raymond Fosdick, Tom X Nguyen, Raven Klaugh, LangChain4j, Magnesian, Illia Dulskyi, David Ziegler, Mano Prime, Luis Javier Navarrete Lozano, Erik Bjäreholt, 阿明, Nathan Dryer, Alex, Rainer Wilmers, zynix, TL, Joseph William Delisle, John Villwock, Nathan LeClaire, Willem Michiel, Joguhyik, GodLy, OG, Alps Aficionado, Jeffrey Morgan, ReadyPlayerEmma, Tiffany J. Kim, Sebastain Graf, Spencer Kim, Michael Davis, webtim, Talal Aujan, knownsqashed, John Detwiler, Imad Khwaja, Deo Leter, Jerry Meng, Elijah Stavena, Rooh Singh, Pieter, SuperWojo, Alexandros Triantafyllidis, Stephen Murray, Ai Maven, ya boyyy, Enrico Ros, Ken Nordquist, Deep Realms, Nicholas, Spiking Neurons AB, Elle, Will Dee, Jack West, RoA, Luke @flexchar, Viktor Bowallius, Derek Yates, Subspace Studios, jjj, Toran Billups, Asp the Wyvern, Fen Risland, Ilya, NimbleBox.ai, Chadd, Nitin Borwankar, Emre, Mandus, Leonard Tan, Kalila, K, Trailburnt, S_X, Cory Kujawski
|
315 |
+
|
316 |
+
|
317 |
+
Thank you to all my generous patrons and donaters!
|
318 |
+
|
319 |
+
And thank you again to a16z for their generous grant.
|
320 |
+
|
321 |
+
<!-- footer end -->
|
322 |
+
|
323 |
+
# Original model card: Open Access AI Collective's Jackalope 7B
|
324 |
+
|
325 |
+
|
326 |
+
<p><h1>🐰🦌 Jackalope 7B 🐰🦌</h1></p>
|
327 |
+
|
328 |
+
|
329 |
+
![Jackalope Logo](https://huggingface.co/openaccess-ai-collective/jackalope-7b/resolve/main/images/jackalope.jpg "Jackalope Logo")
|
330 |
+
[<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)
|
331 |
+
|
332 |
+
|
333 |
+
# Jackalope 7B
|
334 |
+
|
335 |
+
We have used the [SlimOrca dataset](https://huggingface.co/datasets/Open-Orca/SlimOrca), PIPPA, and various other open datasets
|
336 |
+
to fine-tune on top of [Mistral 7B](https://huggingface.co/mistralai/Mistral-7B-v0.1).
|
337 |
+
|
338 |
+
This dataset is our attempt to reproduce the dataset generated for Microsoft Research's [Orca Paper](https://arxiv.org/abs/2306.02707).
|
339 |
+
We use [OpenChat](https://huggingface.co/openchat) packing, trained with [Axolotl](https://github.com/OpenAccess-AI-Collective/axolotl).
|
340 |
+
|
341 |
+
This release highlights the efficiency of SlimOrca, while improving the ability of the model's multi-turn chat.
|
342 |
+
|
343 |
+
HF Leaderboard evals puts this model only slightly below the MistralOrca release, but can be considered a
|
344 |
+
reasonable tradeoff for a more general model that can handle multi-turn chat.
|
345 |
+
|
346 |
+
If you'd like to try the model now, we have it running on fast GPUs unquantized: https://huggingface.co/spaces/openaccess-ai-collective/jackalope-7b
|
347 |
+
|
348 |
+
|
349 |
+
Join the OpenAccess AI Collective Discord for more information about Axolotl trainer and other OAAIC models here:
|
350 |
+
|
351 |
+
https://discord.gg/5y8STgB3P3
|
352 |
+
|
353 |
+
Also join the AlignmentLab Discord for sneak-peak announcements:
|
354 |
+
|
355 |
+
https://AlignmentLab.ai
|
356 |
+
|
357 |
+
|
358 |
+
|
359 |
+
# Quantized Models
|
360 |
+
|
361 |
+
Quantized versions of this model are generously made available by [TheBloke](https://huggingface.co/TheBloke).
|
362 |
+
|
363 |
+
- AWQ: https://huggingface.co/TheBloke/Jackalope-7B-AWQ
|
364 |
+
- GPTQ: https://huggingface.co/TheBloke/Jackalope-7B-GPTQ
|
365 |
+
- GGUF: https://huggingface.co/TheBloke/Jackalope-7B-GGUF
|
366 |
+
|
367 |
+
|
368 |
+
# Prompt Template
|
369 |
+
|
370 |
+
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.
|
371 |
+
|
372 |
+
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.
|
373 |
+
|
374 |
+
This formatting is also available via a pre-defined [Transformers chat template](https://huggingface.co/docs/transformers/main/chat_templating),
|
375 |
+
which means that lists of messages can be formatted for you with the `apply_chat_template()` method:
|
376 |
+
|
377 |
+
```python
|
378 |
+
chat = [
|
379 |
+
{"role": "system", "content": "You are JackalopeAI, a large language model trained by OpenAccess AI Collective. Write out your reasoning step-by-step to be sure you get the right answers!"}
|
380 |
+
{"role": "user", "content": "How are you?"},
|
381 |
+
{"role": "assistant", "content": "I am doing well!"},
|
382 |
+
{"role": "user", "content": "Please tell me about the mythical creatures called jackalopes."},
|
383 |
+
]
|
384 |
+
tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
|
385 |
+
```
|
386 |
+
|
387 |
+
which will yield:
|
388 |
+
|
389 |
+
```
|
390 |
+
<|im_start|>system
|
391 |
+
You are JackalopeAI. Write out your reasoning step-by-step to be sure you get the right answers!
|
392 |
+
<|im_end|>
|
393 |
+
<|im_start|>user
|
394 |
+
How are you?<|im_end|>
|
395 |
+
<|im_start|>assistant
|
396 |
+
I am doing well!<|im_end|>
|
397 |
+
<|im_start|>user
|
398 |
+
Please tell me about the mythical creatures called jackalopes.<|im_end|>
|
399 |
+
<|im_start|>assistant
|
400 |
+
```
|
401 |
+
|
402 |
+
If you use `tokenize=True` and `return_tensors="pt"` instead, then you will get a tokenized
|
403 |
+
and formatted conversation ready to pass to `model.generate()`.
|
404 |
+
|
405 |
+
|
406 |
+
# Evaluation
|
407 |
+
|
408 |
+
## HuggingFace Leaderboard Performance
|
409 |
+
|
410 |
+
![All benchmarks](https://huggingface.co/openaccess-ai-collective/jackalope-7b/resolve/main/images/bench.png)
|
411 |
+
|
412 |
+
|
413 |
+
| Metric | Value |
|
414 |
+
|-----------------------|--|
|
415 |
+
| MMLU (5-shot) | 63.63 |
|
416 |
+
| ARC (25-shot) | 63.31 |
|
417 |
+
| HellaSwag (10-shot) | 83.29 |
|
418 |
+
| TruthfulQA (0-shot) | 49.99 |
|
419 |
+
| Avg. | 65.06 |
|
420 |
+
|
421 |
+
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.
|
422 |
+
|
423 |
+
# Dataset
|
424 |
+
|
425 |
+
We used a verified, curated, filtered selection of most of the GPT-4 augmented data from the OpenOrca dataset.
|
426 |
+
Additionally we include multi-turn chat from PIPPA, various datasets
|
427 |
+
by LDJ from Nous Research, MetaMathQA, and Chain-of-Thought augmented data from the train split of RiddleSense.
|
428 |
+
|
429 |
+
- [Open-Orca/OpenOrca](https://huggingface.co/datasets/Open-Orca/OpenOrca)
|
430 |
+
- [LDJnr/LessWrong-Amplify-Instruct](https://huggingface.co/datasets/LDJnr/LessWrong-Amplify-Instruct)
|
431 |
+
- [LDJnr/Pure-Dove](https://huggingface.co/datasets/LDJnr/Pure-Dove)
|
432 |
+
- [LDJnr/Verified-Camel](https://huggingface.co/datasets/LDJnr/Verified-Camel)
|
433 |
+
- [PygmalionAI/PIPPA](https://huggingface.co/datasets/PygmalionAI/PIPPA)
|
434 |
+
- [meta-math/MetaMathQA](https://huggingface.co/datasets/meta-math/MetaMathQA)
|
435 |
+
- [riddle_sense](https://huggingface.co/datasets/riddle_sense)
|
436 |
+
|
437 |
+
|
438 |
+
# Training
|
439 |
+
|
440 |
+
We trained with 8x A6000 GPUs for 96 hours, completing 4 epochs of full fine tuning on our dataset in one training run.
|
441 |
+
Commodity cost was ~$650.
|
442 |
+
|
443 |
+
|
444 |
+
# Citation
|
445 |
+
|
446 |
+
```bibtex
|
447 |
+
@software{lian2023jackalope,
|
448 |
+
title = {Jackalope 7B: Mistral-7B Model Multi-Turn Chat tuned on Filtered OpenOrcaV1 GPT-4 Dataset},
|
449 |
+
author = {Wing Lian and Bleys Goodson and Guan Wang and Eugene Pentland and Austin Cook and Chanvichet Vong and "Teknium"},
|
450 |
+
year = {2023},
|
451 |
+
publisher = {HuggingFace},
|
452 |
+
journal = {HuggingFace repository},
|
453 |
+
howpublished = {\url{openaccess-ai-collective/jackalope-7b},
|
454 |
+
}
|
455 |
+
@misc{mukherjee2023orca,
|
456 |
+
title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
|
457 |
+
author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
|
458 |
+
year={2023},
|
459 |
+
eprint={2306.02707},
|
460 |
+
archivePrefix={arXiv},
|
461 |
+
primaryClass={cs.CL}
|
462 |
+
}
|
463 |
+
@misc{longpre2023flan,
|
464 |
+
title={The Flan Collection: Designing Data and Methods for Effective Instruction Tuning},
|
465 |
+
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},
|
466 |
+
year={2023},
|
467 |
+
eprint={2301.13688},
|
468 |
+
archivePrefix={arXiv},
|
469 |
+
primaryClass={cs.AI}
|
470 |
+
}
|
471 |
+
```
|