Upload README.md
Browse files
README.md
ADDED
@@ -0,0 +1,453 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: https://huggingface.co/allenai/tulu-13b
|
3 |
+
datasets:
|
4 |
+
- databricks/databricks-dolly-15k
|
5 |
+
- OpenAssistant/oasst1
|
6 |
+
- sahil2801/CodeAlpaca-20k
|
7 |
+
inference: false
|
8 |
+
language:
|
9 |
+
- en
|
10 |
+
license: other
|
11 |
+
model_creator: Allen Institute for AI
|
12 |
+
model_name: Tulu 13B
|
13 |
+
model_type: llama
|
14 |
+
prompt_template: '<|user|>
|
15 |
+
|
16 |
+
{prompt}
|
17 |
+
|
18 |
+
<|assistant|>
|
19 |
+
|
20 |
+
'
|
21 |
+
quantized_by: TheBloke
|
22 |
+
---
|
23 |
+
|
24 |
+
<!-- header start -->
|
25 |
+
<!-- 200823 -->
|
26 |
+
<div style="width: auto; margin-left: auto; margin-right: auto">
|
27 |
+
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
28 |
+
</div>
|
29 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
30 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
31 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
|
32 |
+
</div>
|
33 |
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
34 |
+
<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>
|
35 |
+
</div>
|
36 |
+
</div>
|
37 |
+
<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>
|
38 |
+
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
39 |
+
<!-- header end -->
|
40 |
+
|
41 |
+
# Tulu 13B - AWQ
|
42 |
+
- Model creator: [Allen Institute for AI](https://huggingface.co/allenai)
|
43 |
+
- Original model: [Tulu 13B](https://huggingface.co/allenai/tulu-13b)
|
44 |
+
|
45 |
+
<!-- description start -->
|
46 |
+
## Description
|
47 |
+
|
48 |
+
This repo contains AWQ model files for [Allen AI's Tulu 13B](https://huggingface.co/allenai/tulu-13b).
|
49 |
+
|
50 |
+
|
51 |
+
### About AWQ
|
52 |
+
|
53 |
+
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.
|
54 |
+
|
55 |
+
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.
|
56 |
+
<!-- description end -->
|
57 |
+
<!-- repositories-available start -->
|
58 |
+
## Repositories available
|
59 |
+
|
60 |
+
* [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/tulu-13B-AWQ)
|
61 |
+
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/tulu-13B-GPTQ)
|
62 |
+
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/tulu-13B-GGUF)
|
63 |
+
* [Allen Institute for AI's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/TheBloke/tulu-13B-fp16)
|
64 |
+
<!-- repositories-available end -->
|
65 |
+
|
66 |
+
<!-- prompt-template start -->
|
67 |
+
## Prompt template: Tulu
|
68 |
+
|
69 |
+
```
|
70 |
+
<|user|>
|
71 |
+
{prompt}
|
72 |
+
<|assistant|>
|
73 |
+
|
74 |
+
```
|
75 |
+
|
76 |
+
<!-- prompt-template end -->
|
77 |
+
<!-- licensing start -->
|
78 |
+
## Licensing
|
79 |
+
|
80 |
+
The creator of the source model has listed its license as `other`, and this quantization has therefore used that same license.
|
81 |
+
|
82 |
+
As this model is based on Llama 2, it is also subject to the Meta Llama 2 license terms, and the license files for that are additionally included. It should therefore be considered as being claimed to be licensed under both licenses. I contacted Hugging Face for clarification on dual licensing but they do not yet have an official position. Should this change, or should Meta provide any feedback on this situation, I will update this section accordingly.
|
83 |
+
|
84 |
+
In the meantime, any questions regarding licensing, and in particular how these two licenses might interact, should be directed to the original model repository: [Allen AI's Tulu 13B](https://huggingface.co/allenai/tulu-13b).
|
85 |
+
<!-- licensing end -->
|
86 |
+
<!-- README_AWQ.md-provided-files start -->
|
87 |
+
## Provided files and AWQ parameters
|
88 |
+
|
89 |
+
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.
|
90 |
+
|
91 |
+
Models are released as sharded safetensors files.
|
92 |
+
|
93 |
+
| Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
|
94 |
+
| ------ | ---- | -- | ----------- | ------- | ---- |
|
95 |
+
| [main](https://huggingface.co/TheBloke/tulu-13B-AWQ/tree/main) | 4 | 128 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 4096 | 7.25 GB
|
96 |
+
|
97 |
+
<!-- README_AWQ.md-provided-files end -->
|
98 |
+
|
99 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
100 |
+
## Serving this model from vLLM
|
101 |
+
|
102 |
+
Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
|
103 |
+
|
104 |
+
- When using vLLM as a server, pass the `--quantization awq` parameter, for example:
|
105 |
+
|
106 |
+
```shell
|
107 |
+
python3 python -m vllm.entrypoints.api_server --model TheBloke/tulu-13B-AWQ --quantization awq
|
108 |
+
```
|
109 |
+
|
110 |
+
When using vLLM from Python code, pass the `quantization=awq` parameter, for example:
|
111 |
+
|
112 |
+
```python
|
113 |
+
from vllm import LLM, SamplingParams
|
114 |
+
|
115 |
+
prompts = [
|
116 |
+
"Hello, my name is",
|
117 |
+
"The president of the United States is",
|
118 |
+
"The capital of France is",
|
119 |
+
"The future of AI is",
|
120 |
+
]
|
121 |
+
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
|
122 |
+
|
123 |
+
llm = LLM(model="TheBloke/tulu-13B-AWQ", quantization="awq")
|
124 |
+
|
125 |
+
outputs = llm.generate(prompts, sampling_params)
|
126 |
+
|
127 |
+
# Print the outputs.
|
128 |
+
for output in outputs:
|
129 |
+
prompt = output.prompt
|
130 |
+
generated_text = output.outputs[0].text
|
131 |
+
print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
|
132 |
+
```
|
133 |
+
<!-- README_AWQ.md-use-from-vllm start -->
|
134 |
+
|
135 |
+
<!-- README_AWQ.md-use-from-python start -->
|
136 |
+
## How to use this AWQ model from Python code
|
137 |
+
|
138 |
+
### Install the necessary packages
|
139 |
+
|
140 |
+
Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.0.2 or later
|
141 |
+
|
142 |
+
```shell
|
143 |
+
pip3 install autoawq
|
144 |
+
```
|
145 |
+
|
146 |
+
If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
|
147 |
+
|
148 |
+
```shell
|
149 |
+
pip3 uninstall -y autoawq
|
150 |
+
git clone https://github.com/casper-hansen/AutoAWQ
|
151 |
+
cd AutoAWQ
|
152 |
+
pip3 install .
|
153 |
+
```
|
154 |
+
|
155 |
+
### You can then try the following example code
|
156 |
+
|
157 |
+
```python
|
158 |
+
from awq import AutoAWQForCausalLM
|
159 |
+
from transformers import AutoTokenizer
|
160 |
+
|
161 |
+
model_name_or_path = "TheBloke/tulu-13B-AWQ"
|
162 |
+
|
163 |
+
# Load model
|
164 |
+
model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
|
165 |
+
trust_remote_code=False, safetensors=True)
|
166 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
|
167 |
+
|
168 |
+
prompt = "Tell me about AI"
|
169 |
+
prompt_template=f'''<|user|>
|
170 |
+
{prompt}
|
171 |
+
<|assistant|>
|
172 |
+
|
173 |
+
'''
|
174 |
+
|
175 |
+
print("\n\n*** Generate:")
|
176 |
+
|
177 |
+
tokens = tokenizer(
|
178 |
+
prompt_template,
|
179 |
+
return_tensors='pt'
|
180 |
+
).input_ids.cuda()
|
181 |
+
|
182 |
+
# Generate output
|
183 |
+
generation_output = model.generate(
|
184 |
+
tokens,
|
185 |
+
do_sample=True,
|
186 |
+
temperature=0.7,
|
187 |
+
top_p=0.95,
|
188 |
+
top_k=40,
|
189 |
+
max_new_tokens=512
|
190 |
+
)
|
191 |
+
|
192 |
+
print("Output: ", tokenizer.decode(generation_output[0]))
|
193 |
+
|
194 |
+
# Inference can also be done using transformers' pipeline
|
195 |
+
from transformers import pipeline
|
196 |
+
|
197 |
+
print("*** Pipeline:")
|
198 |
+
pipe = pipeline(
|
199 |
+
"text-generation",
|
200 |
+
model=model,
|
201 |
+
tokenizer=tokenizer,
|
202 |
+
max_new_tokens=512,
|
203 |
+
do_sample=True,
|
204 |
+
temperature=0.7,
|
205 |
+
top_p=0.95,
|
206 |
+
top_k=40,
|
207 |
+
repetition_penalty=1.1
|
208 |
+
)
|
209 |
+
|
210 |
+
print(pipe(prompt_template)[0]['generated_text'])
|
211 |
+
```
|
212 |
+
<!-- README_AWQ.md-use-from-python end -->
|
213 |
+
|
214 |
+
<!-- README_AWQ.md-compatibility start -->
|
215 |
+
## Compatibility
|
216 |
+
|
217 |
+
The files provided are tested to work with [AutoAWQ](https://github.com/casper-hansen/AutoAWQ), and [vLLM](https://github.com/vllm-project/vllm).
|
218 |
+
|
219 |
+
[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).
|
220 |
+
<!-- README_AWQ.md-compatibility end -->
|
221 |
+
|
222 |
+
<!-- footer start -->
|
223 |
+
<!-- 200823 -->
|
224 |
+
## Discord
|
225 |
+
|
226 |
+
For further support, and discussions on these models and AI in general, join us at:
|
227 |
+
|
228 |
+
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
229 |
+
|
230 |
+
## Thanks, and how to contribute
|
231 |
+
|
232 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
233 |
+
|
234 |
+
Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
|
235 |
+
|
236 |
+
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.
|
237 |
+
|
238 |
+
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.
|
239 |
+
|
240 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
241 |
+
|
242 |
+
* Patreon: https://patreon.com/TheBlokeAI
|
243 |
+
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
244 |
+
|
245 |
+
**Special thanks to**: Aemon Algiz.
|
246 |
+
|
247 |
+
**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
|
248 |
+
|
249 |
+
|
250 |
+
Thank you to all my generous patrons and donaters!
|
251 |
+
|
252 |
+
And thank you again to a16z for their generous grant.
|
253 |
+
|
254 |
+
<!-- footer end -->
|
255 |
+
|
256 |
+
# Original model card: Allen AI's Tulu 13B
|
257 |
+
|
258 |
+
|
259 |
+
<!-- header start -->
|
260 |
+
<div style="width: 100%;">
|
261 |
+
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
262 |
+
</div>
|
263 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
264 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
265 |
+
<p><a href="https://discord.gg/Jq4vkcDakD">Chat & support: my new Discord server</a></p>
|
266 |
+
</div>
|
267 |
+
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
268 |
+
<p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
|
269 |
+
</div>
|
270 |
+
</div>
|
271 |
+
<!-- header end -->
|
272 |
+
|
273 |
+
# Allen AI's Tulu 13B fp16
|
274 |
+
|
275 |
+
These files are pytorch format fp16 model files for [Allen AI's Tulu 13B](https://huggingface.co/allenai/tulu-13b).
|
276 |
+
|
277 |
+
It is the result of merging and/or converting the source repository to float16.
|
278 |
+
|
279 |
+
## Repositories available
|
280 |
+
|
281 |
+
* [4-bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/tulu-13B-GPTQ)
|
282 |
+
* [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/tulu-13B-GGML)
|
283 |
+
* [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/TheBloke/tulu-13B-fp16)
|
284 |
+
|
285 |
+
## Prompt template
|
286 |
+
|
287 |
+
The following template should be used:
|
288 |
+
|
289 |
+
```
|
290 |
+
<|user|>
|
291 |
+
prompt goes here
|
292 |
+
<|assistant|>
|
293 |
+
|
294 |
+
```
|
295 |
+
|
296 |
+
**Note**: There should be a newline after `<|assistant|>`. This appears to be very important for getting this model to respond correctly.
|
297 |
+
|
298 |
+
In other words, the prompt is:
|
299 |
+
|
300 |
+
```
|
301 |
+
<|user|>\nprompt goes here\n<|assistant|>\n
|
302 |
+
```
|
303 |
+
|
304 |
+
<!-- footer start -->
|
305 |
+
## Discord
|
306 |
+
|
307 |
+
For further support, and discussions on these models and AI in general, join us at:
|
308 |
+
|
309 |
+
[TheBloke AI's Discord server](https://discord.gg/Jq4vkcDakD)
|
310 |
+
|
311 |
+
## Thanks, and how to contribute.
|
312 |
+
|
313 |
+
Thanks to the [chirper.ai](https://chirper.ai) team!
|
314 |
+
|
315 |
+
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.
|
316 |
+
|
317 |
+
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.
|
318 |
+
|
319 |
+
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
320 |
+
|
321 |
+
* Patreon: https://patreon.com/TheBlokeAI
|
322 |
+
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
323 |
+
|
324 |
+
**Special thanks to**: Luke from CarbonQuill, Aemon Algiz, Dmitriy Samsonov.
|
325 |
+
|
326 |
+
**Patreon special mentions**: Oscar Rangel, Eugene Pentland, Talal Aujan, Cory Kujawski, Luke, Asp the Wyvern, Ai Maven, Pyrater, Alps Aficionado, senxiiz, Willem Michiel, Junyu Yang, trip7s trip, Sebastain Graf, Joseph William Delisle, Lone Striker, Jonathan Leane, Johann-Peter Hartmann, David Flickinger, Spiking Neurons AB, Kevin Schuppel, Mano Prime, Dmitriy Samsonov, Sean Connelly, Nathan LeClaire, Alain Rossmann, Fen Risland, Derek Yates, Luke Pendergrass, Nikolai Manek, Khalefa Al-Ahmad, Artur Olbinski, John Detwiler, Ajan Kanaga, Imad Khwaja, Trenton Dambrowitz, Kalila, vamX, webtim, Illia Dulskyi.
|
327 |
+
|
328 |
+
Thank you to all my generous patrons and donaters!
|
329 |
+
|
330 |
+
<!-- footer end -->
|
331 |
+
|
332 |
+
# Original model card: Allen AI's Tulu 13B
|
333 |
+
|
334 |
+
|
335 |
+
# Tulu 13B
|
336 |
+
|
337 |
+
This model is a 13B LLaMa model finetuned on a mixture of instruction datasets (FLAN V2, CoT, Dolly, Open Assistant 1, GPT4-Alpaca, Code-Alpaca, and ShareGPT).
|
338 |
+
*Please note this is a model diff - see below for usage instructions*.
|
339 |
+
|
340 |
+
This was trained as part of the paper [How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resources](https://arxiv.org/abs/2306.04751).
|
341 |
+
The codebase used to train and evaluate this model can be found at [https://github.com/allenai/open-instruct](https://github.com/allenai/open-instruct).
|
342 |
+
|
343 |
+
This model is licensed under the AI model license given in LICENSE.txt along with the original Llama license (llama_license.txt).
|
344 |
+
|
345 |
+
## Usage
|
346 |
+
|
347 |
+
We assume you have access to a LLaMa model in HF format already. You can find details on getting access and converting the model here:
|
348 |
+
[https://huggingface.co/docs/transformers/main/model_doc/llama](https://huggingface.co/docs/transformers/main/model_doc/llama)
|
349 |
+
|
350 |
+
Clone [https://github.com/allenai/open-instruct](https://github.com/allenai/open-instruct) and install the required dependencies, or just copy `scripts/weight_diff.py`
|
351 |
+
and install the minimal requirements listed in `weight-diff-requirements.txt`. Then download or clone this model diff to the same machine.
|
352 |
+
|
353 |
+
Then, run:
|
354 |
+
```bash
|
355 |
+
python scripts/weight_diff.py recover --path_raw ${hf_llama_path} --path_tuned ${output_path} --path_diff ${diff_location}
|
356 |
+
```
|
357 |
+
|
358 |
+
And you will have a recovered model! Note this takes up a decent amount of RAM, especially for the larger models.
|
359 |
+
|
360 |
+
## Input Format
|
361 |
+
|
362 |
+
The model is trained to use the following format (note the newlines):
|
363 |
+
```
|
364 |
+
<|user|>
|
365 |
+
Your message here!
|
366 |
+
<|assistant|>
|
367 |
+
```
|
368 |
+
|
369 |
+
For best results, format all inputs in this manner.
|
370 |
+
|
371 |
+
## Performance
|
372 |
+
|
373 |
+
Here is the performance of this model across benchmarks explored in our paper [How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resources](https://arxiv.org/abs/2306.04751):
|
374 |
+
|
375 |
+
| MMLU 0-shot | MMLU 5-shot | GSM Direct | GSM CoT | BBH Direct | BBH CoT | TydiQA Gold-Passage | TydiQA Closed-book | Codex-Eval Pass@1 | Codex-Eval Pass@10 | AlpacaFarm vs Davinci-003 | Average |
|
376 |
+
|:-----------:|:-----------:|:----------:|:-------:|:----------:|:-------:|:-------------------:|:------------------:|:-----------------:|:------------------:|:-------------------------:|---------|
|
377 |
+
| 49.2 | 51.8 | 5.0 | 36.5 | 41.3 | 42.8 | 46.1 | 9.2 | 21.3 | 35.0 | 53.9 |37.2 |
|
378 |
+
|
379 |
+
If you use this model, please cite our work, the llama paper, and the original datasets:
|
380 |
+
|
381 |
+
```
|
382 |
+
@misc{wang2023far,
|
383 |
+
title={How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resources},
|
384 |
+
author={Yizhong Wang and Hamish Ivison and Pradeep Dasigi and Jack Hessel and Tushar Khot and Khyathi Raghavi Chandu and David Wadden and Kelsey MacMillan and Noah A. Smith and Iz Beltagy and Hannaneh Hajishirzi},
|
385 |
+
year={2023},
|
386 |
+
eprint={2306.04751},
|
387 |
+
archivePrefix={arXiv},
|
388 |
+
primaryClass={cs.CL}
|
389 |
+
}
|
390 |
+
```
|
391 |
+
|
392 |
+
```
|
393 |
+
@misc{touvron2023llama,
|
394 |
+
title={LLaMA: Open and Efficient Foundation Language Models},
|
395 |
+
author={Hugo Touvron and Thibaut Lavril and Gautier Izacard and Xavier Martinet and Marie-Anne Lachaux and Timothée Lacroix and Baptiste Rozière and Naman Goyal and Eric Hambro and Faisal Azhar and Aurelien Rodriguez and Armand Joulin and Edouard Grave and Guillaume Lample},
|
396 |
+
year={2023},
|
397 |
+
eprint={2302.13971},
|
398 |
+
archivePrefix={arXiv},
|
399 |
+
primaryClass={cs.CL}
|
400 |
+
}
|
401 |
+
```
|
402 |
+
|
403 |
+
```
|
404 |
+
@misc{dolly,
|
405 |
+
author = {Databricks},
|
406 |
+
title = {Free Dolly: Introducing the World's First Truly Open Instruction-Tuned LLM},
|
407 |
+
year = {2023},
|
408 |
+
publisher = {GitHub},
|
409 |
+
journal = {GitHub repository},
|
410 |
+
howpublished = {Blog post},
|
411 |
+
url = {https://www.databricks.com/blog/2023/04/12/dolly-first-open-commercially-viable-instruction-tuned-llm}
|
412 |
+
}
|
413 |
+
```
|
414 |
+
|
415 |
+
```
|
416 |
+
@article{longpre2023flan,
|
417 |
+
title={The Flan Collection: Designing Data and Methods for Effective Instruction Tuning},
|
418 |
+
author={Longpre, Shayne and Hou, Le and Vu, Tu and Webson, Albert and Chung, Hyung Won and Tay, Yi and Zhou, Denny and Le, Quoc V and Zoph, Barret and Wei, Jason and others},
|
419 |
+
journal={arXiv preprint arXiv:2301.13688},
|
420 |
+
year={2023}
|
421 |
+
}
|
422 |
+
```
|
423 |
+
|
424 |
+
```
|
425 |
+
@misc{köpf2023openassistant,
|
426 |
+
title={OpenAssistant Conversations -- Democratizing Large Language Model Alignment},
|
427 |
+
author={Andreas Köpf and Yannic Kilcher and Dimitri von Rütte and Sotiris Anagnostidis and Zhi-Rui Tam and Keith Stevens and Abdullah Barhoum and Nguyen Minh Duc and Oliver Stanley and Richárd Nagyfi and Shahul ES and Sameer Suri and David Glushkov and Arnav Dantuluri and Andrew Maguire and Christoph Schuhmann and Huu Nguyen and Alexander Mattick},
|
428 |
+
year={2023},
|
429 |
+
eprint={2304.07327},
|
430 |
+
archivePrefix={arXiv},
|
431 |
+
primaryClass={cs.CL}
|
432 |
+
}
|
433 |
+
```
|
434 |
+
|
435 |
+
```
|
436 |
+
@article{peng2023instruction,
|
437 |
+
title={Instruction Tuning with GPT-4},
|
438 |
+
author={Peng, Baolin and Li, Chunyuan and He, Pengcheng and Galley, Michel and Gao, Jianfeng},
|
439 |
+
journal={arXiv preprint arXiv:2304.03277},
|
440 |
+
year={2023}
|
441 |
+
}
|
442 |
+
```
|
443 |
+
|
444 |
+
```
|
445 |
+
@misc{codealpaca,
|
446 |
+
author = {Sahil Chaudhary},
|
447 |
+
title = {Code Alpaca: An Instruction-following LLaMA model for code generation},
|
448 |
+
year = {2023},
|
449 |
+
publisher = {GitHub},
|
450 |
+
journal = {GitHub repository},
|
451 |
+
howpublished = {\url{https://github.com/sahil280114/codealpaca}},
|
452 |
+
}
|
453 |
+
```
|