Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,93 @@
|
|
1 |
---
|
2 |
-
license:
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
license: llama2
|
3 |
+
datasets:
|
4 |
+
- meta-math/MetaMathQA
|
5 |
---
|
6 |
+
arxiv.org/abs/2309.12284
|
7 |
+
|
8 |
+
View the project page:
|
9 |
+
https://meta-math.github.io/
|
10 |
+
|
11 |
+
## Model Details
|
12 |
+
|
13 |
+
MetaMath-Mistral-7B is fully fine-tuned on the MetaMathQA datasets and based on the very strong Mistral-7B model. It is glad to see using MetaMathQA datasets and change the base model from llama-2-7B to Mistral-7b can boost the GSM8K performance from 66.5 to 77.7.
|
14 |
+
|
15 |
+
For everyone who wants to fine-tune Mistral-7B, I would suggest using a smaller learning rate(usually 1/5 to 1/10 of the lr for LlaMa-2-7B) and staying other training args unchanged.
|
16 |
+
More training details and scripts can be seen at https://github.com/meta-math/MetaMath
|
17 |
+
|
18 |
+
## Installation
|
19 |
+
|
20 |
+
```
|
21 |
+
pip install transformers ==4.35.0
|
22 |
+
pip instal vllm==0.1.4
|
23 |
+
pip instal torch==2.0.1
|
24 |
+
pip instal sentencepiece==0.1.99
|
25 |
+
pip instal tokenizers==0.13.3
|
26 |
+
pip instal accelerate==0.21.0
|
27 |
+
pip instal bitsandbytes==0.40.0
|
28 |
+
pip instal fraction
|
29 |
+
pip install protobuf
|
30 |
+
```
|
31 |
+
|
32 |
+
## Model Usage
|
33 |
+
|
34 |
+
'''
|
35 |
+
"Below is an instruction that describes a task. "
|
36 |
+
"Write a response that appropriately completes the request.\n\n"
|
37 |
+
"### Instruction:\n{instruction}\n\n### Response: Let's think step by step."
|
38 |
+
'''
|
39 |
+
where you need to use your query question to replace the {instruction}
|
40 |
+
|
41 |
+
There are another interesting repo about Arithmo-Mistral-7B in https://huggingface.co/akjindal53244/Arithmo-Mistral-7B, where they combine our MetaMathQA dataset and MathInstruct datasets to train a powerful model. Thanks agian for their contributions.
|
42 |
+
We would also try to train the combination of **MetaMathQA** and **MathInstruct** datasets, and also open all the results and training detalis.
|
43 |
+
|
44 |
+
## Experiments
|
45 |
+
|
46 |
+
| Model | GSM8k Pass@1 | MATH Pass@1 |
|
47 |
+
|---------------------|--------------|-------------|
|
48 |
+
| MPT-7B | 6.8 | 3.0 |
|
49 |
+
| Falcon-7B | 6.8 | 2.3 |
|
50 |
+
| LLaMA-1-7B | 11.0 | 2.9 |
|
51 |
+
| LLaMA-2-7B | 14.6 | 2.5 |
|
52 |
+
| MPT-30B | 15.2 | 3.1 |
|
53 |
+
| LLaMA-1-13B | 17.8 | 3.9 |
|
54 |
+
| GPT-Neo-2.7B | 19.5 | -- |
|
55 |
+
| Falcon-40B | 19.6 | 2.5 |
|
56 |
+
| Baichuan-chat-13B | 23.9 | -- |
|
57 |
+
| Vicuna-v1.3-13B | 27.6 | -- |
|
58 |
+
| LLaMA-2-13B | 28.7 | 3.9 |
|
59 |
+
| InternLM-7B | 31.2 | -- |
|
60 |
+
| ChatGLM-2-6B | 32.4 | -- |
|
61 |
+
| GPT-J-6B | 34.9 | -- |
|
62 |
+
| LLaMA-1-33B | 35.6 | 3.9 |
|
63 |
+
| LLaMA-2-34B | 42.2 | 6.24 |
|
64 |
+
| RFT-7B | 50.3 | -- |
|
65 |
+
| LLaMA-1-65B | 50.9 | 10.6 |
|
66 |
+
| Qwen-7B | 51.6 | -- |
|
67 |
+
| WizardMath-7B | 54.9 | 10.7 |
|
68 |
+
| LLaMA-2-70B | 56.8 | 13.5 |
|
69 |
+
| WizardMath-13B | 63.9 | 14.0 |
|
70 |
+
| MAmmoTH-7B (COT) | 50.5 | 10.4 |
|
71 |
+
| MAmmoTH-7B (POT) | 51.6 | 28.7 |
|
72 |
+
| Arithmo-Mistral-7B | 74.7 | 25.3 |
|
73 |
+
| MetaMath-7B | 66.5 | 19.8 |
|
74 |
+
| MetaMath-13B | 72.3 | 22.4 |
|
75 |
+
| 🔥 **MetaMath-Mistral-7B** | **77.7** | **28.2** |
|
76 |
+
|
77 |
+
## Citation
|
78 |
+
|
79 |
+
```bibtex
|
80 |
+
@article{yu2023metamath,
|
81 |
+
title={MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Models},
|
82 |
+
author={Yu, Longhui and Jiang, Weisen and Shi, Han and Yu, Jincheng and Liu, Zhengying and Zhang, Yu and Kwok, James T and Li, Zhenguo and Weller, Adrian and Liu, Weiyang},
|
83 |
+
journal={arXiv preprint arXiv:2309.12284},
|
84 |
+
year={2023}
|
85 |
+
}
|
86 |
+
|
87 |
+
@article{jiang2023mistral,
|
88 |
+
title={Mistral 7B},
|
89 |
+
author={Jiang, Albert Q and Sablayrolles, Alexandre and Mensch, Arthur and Bamford, Chris and Chaplot, Devendra Singh and Casas, Diego de las and Bressand, Florian and Lengyel, Gianna and Lample, Guillaume and Saulnier, Lucile and others},
|
90 |
+
journal={arXiv preprint arXiv:2310.06825},
|
91 |
+
year={2023}
|
92 |
+
}
|
93 |
+
```
|