Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
---
|
5 |
+
|
6 |
+
# Open-Instruct GPT-4 Alpaca 7B
|
7 |
+
|
8 |
+
This model is a 7B LLaMa model finetuned on the GPT-4 Alpaca dataset. *Please note this is a model diff - see below for usage instructions*.
|
9 |
+
|
10 |
+
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).
|
11 |
+
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).
|
12 |
+
|
13 |
+
This model is licensed under the AI model license given in LICENSE.txt along with the original Llama license (llama_license.txt).
|
14 |
+
|
15 |
+
## Usage
|
16 |
+
|
17 |
+
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:
|
18 |
+
[https://huggingface.co/docs/transformers/main/model_doc/llama](https://huggingface.co/docs/transformers/main/model_doc/llama)
|
19 |
+
|
20 |
+
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`
|
21 |
+
and install the minimal requirements listed in `weight-diff-requirements.txt`. Then download or clone this model diff to the same machine.
|
22 |
+
|
23 |
+
Then, run:
|
24 |
+
```bash
|
25 |
+
python scripts/weight_diff.py recover --path_raw ${hf_llama_path} --path_tuned ${output_path} --path_diff ${diff_location}
|
26 |
+
```
|
27 |
+
|
28 |
+
And you will have a recovered model! Note this takes up a decent amount of RAM, especially for the larger models.
|
29 |
+
|
30 |
+
## Input Format
|
31 |
+
|
32 |
+
The model is trained to use the following format (note the newlines):
|
33 |
+
```
|
34 |
+
<|user|>
|
35 |
+
Your message here!
|
36 |
+
<|assistant|>
|
37 |
+
```
|
38 |
+
|
39 |
+
For best results, format all inputs in this manner.
|
40 |
+
|
41 |
+
## Performance
|
42 |
+
|
43 |
+
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):
|
44 |
+
|
45 |
+
| 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 |
|
46 |
+
|:-----------:|:-----------:|:----------:|:-------:|:----------:|:-------:|:-------------------:|:------------------:|:-----------------:|:------------------:|:-------------------------:|---------|
|
47 |
+
| 42.6 | 38.3 | 6.5 | 10.0 | 28.5 | 32.3 | 23.6 | 5.8 | 13.2 | 25.0 | 57.0 | 28.3 |
|
48 |
+
|
49 |
+
If you use this model, please cite our work, the llama paper, and the original dataset:
|
50 |
+
|
51 |
+
```
|
52 |
+
@misc{wang2023far,
|
53 |
+
title={How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resources},
|
54 |
+
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},
|
55 |
+
year={2023},
|
56 |
+
eprint={2306.04751},
|
57 |
+
archivePrefix={arXiv},
|
58 |
+
primaryClass={cs.CL}
|
59 |
+
}
|
60 |
+
```
|
61 |
+
|
62 |
+
```
|
63 |
+
@misc{touvron2023llama,
|
64 |
+
title={LLaMA: Open and Efficient Foundation Language Models},
|
65 |
+
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},
|
66 |
+
year={2023},
|
67 |
+
eprint={2302.13971},
|
68 |
+
archivePrefix={arXiv},
|
69 |
+
primaryClass={cs.CL}
|
70 |
+
}
|
71 |
+
```
|
72 |
+
|
73 |
+
```
|
74 |
+
@article{peng2023instruction,
|
75 |
+
title={Instruction Tuning with GPT-4},
|
76 |
+
author={Peng, Baolin and Li, Chunyuan and He, Pengcheng and Galley, Michel and Gao, Jianfeng},
|
77 |
+
journal={arXiv preprint arXiv:2304.03277},
|
78 |
+
year={2023}
|
79 |
+
}
|
80 |
+
```
|