File size: 7,795 Bytes
f48ade5 872ff40 8c650be 872ff40 8c650be 872ff40 8c650be 872ff40 8c650be 872ff40 8c650be 872ff40 8c650be 872ff40 8c650be 872ff40 f48ade5 5ac5279 872ff40 f48ade5 872ff40 f48ade5 872ff40 f48ade5 872ff40 f48ade5 872ff40 f48ade5 872ff40 f48ade5 872ff40 f48ade5 6c1c928 f48ade5 872ff40 f48ade5 872ff40 f48ade5 6c1c928 f48ade5 872ff40 f48ade5 872ff40 f48ade5 6c1c928 f48ade5 872ff40 f48ade5 6c1c928 f48ade5 872ff40 f48ade5 872ff40 f48ade5 6c1c928 f48ade5 6c1c928 f48ade5 872ff40 f48ade5 872ff40 f48ade5 872ff40 f48ade5 6c1c928 872ff40 6c1c928 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
---
license: mit
datasets:
- zwhe99/DeepMath-103K
language:
- en
metrics:
- accuracy
base_model:
- nvidia/OpenMath-Nemotron-1.5B
tags:
- math
- reasoning
- rl
- qwen
- qwen2
model-index:
- name: DeepMath-1.5B
results:
- task:
type: text-generation
dataset:
name: MATH500
type: MATH500
metrics:
- type: pass@1
value: 0.932
name: pass@1
verified: false
- task:
type: text-generation
dataset:
name: AMC23
type: AMC23
metrics:
- type: pass@1
value: 0.942
name: pass@1
verified: false
- task:
type: text-generation
dataset:
name: OlympiadBench
type: OlympiadBench
metrics:
- type: pass@1
value: 0.734
name: pass@1
verified: false
- task:
type: text-generation
dataset:
name: MinervaMath
type: MinervaMath
metrics:
- type: pass@1
value: 0.283
name: pass@1
verified: false
- task:
type: text-generation
dataset:
name: AIME24
type: AIME24
metrics:
- type: pass@1
value: 0.640
name: pass@1
verified: false
- task:
type: text-generation
dataset:
name: AIME25
type: AIME25
metrics:
- type: pass@1
value: 0.573
name: pass@1
verified: false
---
# DeepMath-Omn-1.5B
<table>
<tr>
<td style="padding: 0;">
<a href="https://huggingface.co/datasets/zwhe99/DeepMath-103K">
<img src="https://img.shields.io/badge/Data-4d5eff?style=for-the-badge&logo=huggingface&logoColor=ffffff&labelColor" alt="Data">
</a>
</td>
<td style="padding: 0;">
<a href="https://huggingface.co/collections/zwhe99/deepmath-6816e139b7f467f21a459a9a">
<img src="https://img.shields.io/badge/Model-4d5eff?style=for-the-badge&logo=huggingface&logoColor=ffffff&labelColor" alt="Data">
</a>
</td>
<td style="padding: 0;">
<a href="https://github.com/zwhe99/DeepMath">
<img src="https://img.shields.io/badge/Code-000000?style=for-the-badge&logo=github&logoColor=white" alt="Code">
</a>
</td>
<td style="padding: 0;">
<a href="https://arxiv.org/abs/2504.11456">
<img src="https://img.shields.io/badge/arXiv-2504.11456-b31b1b.svg?style=for-the-badge" alt="arXiv">
</a>
</td>
</tr>
</table>
<!-- Provide a quick summary of what the model is/does. -->
DeepMath-Omn-1.5B is created by finetuning nvidia/OpenMath-Nemotron-1.5B on DeepMath-103K dataset via RL.
## 📖 Overview
**`DeepMath-103K`** is meticulously curated to push the boundaries of mathematical reasoning in language models. Key features include:
**1. Challenging Problems**: DeepMath-103K has a strong focus on difficult mathematical problems (primarily Levels 5-9), significantly raising the complexity bar compared to many existing open datasets.
<div align="center"> <img src="./assets/github-difficulty.png" width="90%"/>
<sub>Difficulty distribution comparison.</sub> </div>
**2. Data Diversity and Novelty**: DeepMath-103K spans a wide spectrum of mathematical subjects, including Algebra, Calculus, Number Theory, Geometry, Probability, and Discrete Mathematics.
<div align="center"> <img src="./assets/github-domain.png" width="50%"/>
<sub>Hierarchical breakdown of mathematical topics covered in DeepMath-103K.</sub></div>
The problems in DeepMath-103K are novel and unique, whereas many existing datasets are similar and overlap.
<div align="center"> <img src="./assets/github-tsne.png" width="70%"/>
<sub>Embedding distributions of different datasets.</sub></div>
**3. Rigorous Decontamination**: Built from diverse sources, DeepMath-103K underwent meticulous decontamination against common benchmarks using semantic matching. This minimizes test set leakage and promotes fair model evaluation.
<div align="center"> <img src="./assets/github-contamination-case.png" width="80%"/>
<sub>Detected contamination examples. Subtle conceptual overlaps can also be identified.</sub> </div>
**4. Rich Data Format**: Each sample in DeepMath-103K is structured with rich information to support various research applications:
<div align="center"> <img src="./assets/github-data-sample.png" width="90%"/>
<sub>An example data sample from DeepMath-103K.</sub> </div>
- **Question**: The mathematical problem statement.
- **Final Answer**: A reliably verifiable final answer, enabling robust rule-based reward functions for RL.
- **Difficulty**: A numerical score for difficulty-aware training or analysis.
- **Topic**: Hierarchical classification for topic-specific applications.
- **R1 Solutions**: Three distinct reasoning paths from DeepSeek-R1, valuable for supervised fine-tuning (SFT) or knowledge distillation.
## 📊Main Results
DeepMath serise models achieve many **SOTA** results on challenging math benchmarks:
<div align="center"> <img src="./assets/github-main.png" width="90%"/>
<sub>Math reasoning performance.</sub> </div>
## 🎯Quick Start
#### Environment Preparation
```shell
git clone --recurse-submodules https://github.com/zwhe99/DeepMath.git && cd DeepMath
conda create -y -n deepmath python=3.12.2 && conda activate deepmath
pip3 install ray[default]
pip3 install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu124
pip3 install flash-attn==2.7.4.post1 --no-build-isolation
pip3 install omegaconf==2.4.0.dev3 hydra-core==1.4.0.dev1 antlr4-python3-runtime==4.11.0 vllm==0.7.3
pip3 install math-verify[antlr4_11_0]==0.7.0 fire deepspeed tensorboardX prettytable datasets transformers==4.49.0
pip3 install -e verl
```
#### Evaluation
```shell
VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 VLLM_ATTENTION_BACKEND=XFORMERS VLLM_USE_V1=1 VLLM_WORKER_MULTIPROC_METHOD=spawn python3 uni_eval.py \
--base_model zwhe99/DeepMath-Zero-7B \
--chat_template_name orz \
--system_prompt_name simplerl \
--output_dir \
--bf16 True \
--tensor_parallel_size 8 \
--data_id zwhe99/MATH \
--split math500 \
--max_model_len 32768 \
--temperature 0.6 \
--top_p 0.95 \
--n 16
```
#### Training
* Data Preparation
```shell
DATA_DIR=/path/to/your/data
python3 verl/examples/data_preprocess/deepmath_103k.py --local_dir $DATA_DIR
```
* Start Ray
```shell
# Head node (×1)
ray start --head --port=6379 --node-ip-address=$HEAD_ADDR --num-gpus=8
# Worker nodes (×7 or ×11)
ray start --address=$HEAD_ADDR:6379 --node-ip-address=$WORKER_ADDR --num-gpus=8
```
* Launch training at head node. See `scripts/train` for training scripts.
## 🙏 Acknowledgements
This work can not be done without the help of the following works:
- **[verl](https://github.com/volcengine/verl)**: A very fast reinforcement learning framework.
- **[Vivacem/MMIQC](https://huggingface.co/datasets/Vivacem/MMIQC)**: A mixture of question-response pairs extracted from Mathematics Stack Exchange pages.
- **[TIGER-Lab/WebInstructSub](https://huggingface.co/datasets/TIGER-Lab/WebInstructSub)**: Instruction data from MathStackExchange and ScienceStackExchange.
- **[AI-MO/NuminaMath-CoT](https://huggingface.co/datasets/AI-MO/NuminaMath-CoT)**: Approximately 860k math problems.
## 📚 Citation
```bibtex
@article{deepmath,
title={DeepMath-103K: A Large-Scale, Challenging, Decontaminated, and Verifiable Mathematical Dataset for Advancing Reasoning},
author={He, Zhiwei and Liang, Tian and Xu, Jiahao and Liu, Qiuzhi and Chen, Xingyu and Wang, Yue and Song, Linfeng and Yu, Dian and Liang, Zhenwen and Wang, Wenxuan and Zhang, Zhuosheng and Wang, Rui and Tu, Zhaopeng and Mi, Haitao and Yu, Dong},
year={2025},
eprint={2504.11456},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2504.11456},
}
```
|