Update README
Browse files
README.md
CHANGED
@@ -3,9 +3,6 @@ base_model: deepseek-ai/deepseek-math-7b-base
|
|
3 |
tags:
|
4 |
- alignment-handbook
|
5 |
- generated_from_trainer
|
6 |
-
datasets:
|
7 |
-
- AI-MO/numina-problems-sft-v1.7-preproc
|
8 |
-
- AI-MO/tora-chosen-v0.7
|
9 |
widget:
|
10 |
- example_title: Math problem
|
11 |
messages:
|
@@ -25,13 +22,15 @@ model-index:
|
|
25 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
26 |
should probably proofread and complete it, then remove this comment. -->
|
27 |
|
28 |
-
<img src="https://
|
29 |
|
30 |
-
# Model Card for Numina-Math-7B
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
This model is a fine-tuned version of [deepseek-ai/deepseek-math-7b-base](https://huggingface.co/deepseek-ai/deepseek-math-7b-base) with two stages of
|
|
|
|
|
|
|
35 |
|
36 |
|
37 |
![image/png](https://cdn-uploads.huggingface.co/production/uploads/6200d0a443eb0913fa2df7cc/NyhBs_gzg40iwL995DO9L.png)
|
@@ -39,9 +38,9 @@ This model is a fine-tuned version of [deepseek-ai/deepseek-math-7b-base](https:
|
|
39 |
|
40 |
## Model description
|
41 |
|
42 |
-
- **Model type:** A 7B parameter Math model fine-tuned in two stages of training, first on a dataset with
|
43 |
- **Language(s) (NLP):** Primarily English
|
44 |
-
- **License:**
|
45 |
- **Finetuned from model:** [deepseek-ai/deepseek-math-7b-base](https://huggingface.co/deepseek-ai/deepseek-math-7b-base)
|
46 |
|
47 |
### Model Sources
|
@@ -49,7 +48,6 @@ This model is a fine-tuned version of [deepseek-ai/deepseek-math-7b-base](https:
|
|
49 |
<!-- Provide the basic links for the model. -->
|
50 |
|
51 |
- **Repository:** Coming soon to https://github.com/huggingface/alignment-handbook
|
52 |
-
- **Demo:** https://huggingface.co/spaces/AI-MO/math-olympiad-solver
|
53 |
|
54 |
## Intended uses & limitations
|
55 |
|
@@ -76,18 +74,19 @@ gen_config = {
|
|
76 |
|
77 |
outputs = pipe(prompt, **gen_config)
|
78 |
text = outputs[0]["generated_text"]
|
79 |
-
|
80 |
print(text)
|
81 |
-
|
82 |
# WARNING: This code will execute the python code in the string. We show this for eductional purposes only.
|
83 |
# Please refer to our full pipeline for a safer way to execute code.
|
|
|
84 |
exec(python_code)
|
85 |
|
86 |
```
|
87 |
## Bias, Risks, and Limitations
|
88 |
|
89 |
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
90 |
-
|
|
|
91 |
|
92 |
|
93 |
## Training procedure
|
@@ -123,19 +122,4 @@ The following hyperparameters were used during training:
|
|
123 |
- Transformers 4.40.1
|
124 |
- Pytorch 2.3.1
|
125 |
- Datasets 2.18.0
|
126 |
-
- Tokenizers 0.19.1
|
127 |
-
|
128 |
-
## Citation
|
129 |
-
|
130 |
-
If you find Numina-Math useful in your work, please cite it with:
|
131 |
-
|
132 |
-
```
|
133 |
-
@misc{beeching2024numina-math,
|
134 |
-
title={Numina Math},
|
135 |
-
author={Edward Beeching and Lewis Tunstall and Roman Soletskyi and Kashif Rasul and Shengyi Huang and Jia Li},
|
136 |
-
year={2024},
|
137 |
-
publisher = {Hugging Face},
|
138 |
-
journal = {Hugging Face repository},
|
139 |
-
howpublished = {\url{https://huggingface.co/AI-MO/Numina-Math-7B}}
|
140 |
-
}
|
141 |
-
```
|
|
|
3 |
tags:
|
4 |
- alignment-handbook
|
5 |
- generated_from_trainer
|
|
|
|
|
|
|
6 |
widget:
|
7 |
- example_title: Math problem
|
8 |
messages:
|
|
|
22 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
23 |
should probably proofread and complete it, then remove this comment. -->
|
24 |
|
25 |
+
<img src="https://huggingface.co/AI-MO/Numina-Math-7B/blob/main/thumbnail.png" alt="Numina Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
|
26 |
|
|
|
27 |
|
28 |
+
# Model Card for NuminaMath 7B
|
29 |
+
|
30 |
+
NuminaMath is a series of language models that are trained to solve math problems using tool-integrated reasoning. NuminaMath 7B won the first progress prize of the [AI Math Olympiad (AIMO)](https://aimoprize.com), with a score of 29/50 on the public and private tests sets. This model is a fine-tuned version of [deepseek-ai/deepseek-math-7b-base](https://huggingface.co/deepseek-ai/deepseek-math-7b-base) with two stages of supervised fine-tuning:
|
31 |
+
|
32 |
+
* **Stage 1:** fine-tune the base model on a large, diverse dataset of natural language math problems and solutions, where each solution is templated with Chain of Thought (CoT) to facilitate learning.
|
33 |
+
* **Stage 2:** fine-tune the model from Stage 1 on a synthetic dataset of tool-integrated reasoning, where each math problem is decomposed into a sequence of rationales, Python programs, and their outputs. Here we followed [Microsoft’s ToRA paper](https://arxiv.org/abs/2309.17452) and prompted GPT-4 to produce solutions in the ToRA format with code execution feedback. Fine-tuning on this data produces a reasoning agent that can solve mathematical problems via a mix of natural language reasoning and use of the Python REPL to compute intermediate results.
|
34 |
|
35 |
|
36 |
![image/png](https://cdn-uploads.huggingface.co/production/uploads/6200d0a443eb0913fa2df7cc/NyhBs_gzg40iwL995DO9L.png)
|
|
|
38 |
|
39 |
## Model description
|
40 |
|
41 |
+
- **Model type:** A 7B parameter Math model fine-tuned in two stages of training, first on a dataset with math problem-solution pairs and then on a dataset with examples of multi-step synthetic generations using tool integrated reasoning.
|
42 |
- **Language(s) (NLP):** Primarily English
|
43 |
+
- **License:** Apacahe 2.0
|
44 |
- **Finetuned from model:** [deepseek-ai/deepseek-math-7b-base](https://huggingface.co/deepseek-ai/deepseek-math-7b-base)
|
45 |
|
46 |
### Model Sources
|
|
|
48 |
<!-- Provide the basic links for the model. -->
|
49 |
|
50 |
- **Repository:** Coming soon to https://github.com/huggingface/alignment-handbook
|
|
|
51 |
|
52 |
## Intended uses & limitations
|
53 |
|
|
|
74 |
|
75 |
outputs = pipe(prompt, **gen_config)
|
76 |
text = outputs[0]["generated_text"]
|
|
|
77 |
print(text)
|
78 |
+
|
79 |
# WARNING: This code will execute the python code in the string. We show this for eductional purposes only.
|
80 |
# Please refer to our full pipeline for a safer way to execute code.
|
81 |
+
python_code = re.findall(r"```python(.*?)```", text, re.DOTALL)[0]
|
82 |
exec(python_code)
|
83 |
|
84 |
```
|
85 |
## Bias, Risks, and Limitations
|
86 |
|
87 |
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
88 |
+
|
89 |
+
NuminaMath 7B was created to solve problems in the narrow domain of competition-level mathematics. As a result, the model should not be used for general chat applications. With greedy decoding, we find the model is capable of solving problems at the level of [AMC 12](https://artofproblemsolving.com/wiki/index.php/2023_AMC_12A_Problems), but often struggles generate a valid solution on harder problems at the AIME and Math Olympiad level.
|
90 |
|
91 |
|
92 |
## Training procedure
|
|
|
122 |
- Transformers 4.40.1
|
123 |
- Pytorch 2.3.1
|
124 |
- Datasets 2.18.0
|
125 |
+
- Tokenizers 0.19.1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|