primenumbersam/OpenMathInstruct-1
收藏Hugging Face2026-04-05 更新2026-04-12 收录
下载链接:
https://hf-mirror.com/datasets/primenumbersam/OpenMathInstruct-1
下载链接
链接失效反馈官方服务:
资源简介:
---
license: other
license_name: nvidia-license
task_categories:
- question-answering
- text-generation
language:
- en
tags:
- math
- code
- nvidia
pretty_name: OpenMathInstruct-1
size_categories:
- 1M<n<10M
---
# OpenMathInstruct-1
OpenMathInstruct-1 is a math instruction tuning dataset with 1.8M problem-solution pairs
generated using permissively licensed [Mixtral-8x7B](https://huggingface.co/mistralai/Mixtral-8x7B-v0.1) model.
The problems are from [GSM8K](https://github.com/openai/grade-school-math)
and [MATH](https://github.com/hendrycks/math) training subsets and the solutions
are synthetically generated by allowing Mixtral model to use a mix of text reasoning and
code blocks executed by Python interpreter.
The dataset is split into train and validation subsets that we used in the ablations experiments.
These two subsets combined together cover the full training set of GSM8K and MATH.
OpenMathInstruct-1 dataset contains of the following fields:
- **question**: original question from either GSM8K or MATH training set.
- **generated_solution**: the synthetically generated solution that uses a mix of text reasoning and code blocks.
- **expected_answer**: the ground-truth answer provided in the original dataset.
- **predicted_answer**: the answer predicted by Mixtral model in the corresponding solution (extracted from `\boxed{}`).
- **error_message**: `<not_executed>` if code was not used. Otherwise it's empty or contains a Python exception
from the corresponding code block. A `timeout` string indicates that code block took longer than 10 seconds to
execute. In the current dataset version we always stop generation after any error or a timeout.
- **is_correct**: whether the final answer was considered correct by our grading script.
- **dataset**: gsm8k or math.
- **generation_type**: `without_reference_solution` or `masked_reference_solution`.
We also release the masked solutions used to produce `generation_type="masked_reference_solution"`
portion of the dataset ([GSM8K-Masked](https://huggingface.co/datasets/nvidia/OpenMath-GSM8K-masked),
[MATH-Masked](https://huggingface.co/datasets/nvidia/OpenMath-MATH-masked)).
See our [paper](https://arxiv.org/abs/2402.10176) to learn more details!
## OpenMath models
To demonstrate the quality of this dataset, we release a series of OpenMath models
trained on this data (a combination of train and validation splits to allow comparison with prior work).
<table border="1">
<tr>
<td></td>
<td colspan="2" style="text-align: center;">greedy</td>
<td colspan="2" style="text-align: center;">majority@50</td>
</tr>
<tr>
<td style="text-align: center;">model</td>
<td style="text-align: center;">GSM8K</td>
<td style="text-align: center;">MATH</td>
<td style="text-align: center;">GMS8K</td>
<td style="text-align: center;">MATH</td>
</tr>
<tr>
<td style="text-align: right;">OpenMath-CodeLlama-7B (<a href="https://huggingface.co/nvidia/OpenMath-CodeLlama-7b-Python">nemo</a> | <a href="https://huggingface.co/nvidia/OpenMath-CodeLlama-7b-Python-hf">HF</a>)</td>
<td style="text-align: center;">75.9</td>
<td style="text-align: center;">43.6</td>
<td style="text-align: center;">84.8</td>
<td style="text-align: center;">55.6</td>
</tr>
<tr>
<td style="text-align: right;">OpenMath-Mistral-7B (<a href="https://huggingface.co/nvidia/OpenMath-Mistral-7B-v0.1">nemo</a> | <a href="https://huggingface.co/nvidia/OpenMath-Mistral-7B-v0.1-hf">HF</a>)</td>
<td style="text-align: center;">80.2</td>
<td style="text-align: center;">44.5</td>
<td style="text-align: center;">86.9</td>
<td style="text-align: center;">57.2</td>
</tr>
<tr>
<td style="text-align: right;">OpenMath-CodeLlama-13B (<a href="https://huggingface.co/nvidia/OpenMath-CodeLlama-13b-Python">nemo</a> | <a href="https://huggingface.co/nvidia/OpenMath-CodeLlama-13b-Python-hf">HF</a>)</td>
<td style="text-align: center;">78.8</td>
<td style="text-align: center;">45.5</td>
<td style="text-align: center;">86.8</td>
<td style="text-align: center;">57.6</td>
</tr>
<tr>
<td style="text-align: right;">OpenMath-CodeLlama-34B (<a href="https://huggingface.co/nvidia/OpenMath-CodeLlama-34b-Python">nemo</a> | <a href="https://huggingface.co/nvidia/OpenMath-CodeLlama-34b-Python-hf">HF</a>)</td>
<td style="text-align: center;">80.7</td>
<td style="text-align: center;">48.3</td>
<td style="text-align: center;">88.0</td>
<td style="text-align: center;">60.2</td>
</tr>
<tr>
<td style="text-align: right;">OpenMath-Llama2-70B (<a href="https://huggingface.co/nvidia/OpenMath-Llama-2-70b">nemo</a> | <a href="https://huggingface.co/nvidia/OpenMath-Llama-2-70b-hf">HF</a>)</td>
<td style="text-align: center;"><b>84.7</b></td>
<td style="text-align: center;">46.3</td>
<td style="text-align: center;">90.1</td>
<td style="text-align: center;">58.3</td>
</tr>
<tr>
<td style="text-align: right;">OpenMath-CodeLlama-70B (<a href="https://huggingface.co/nvidia/OpenMath-CodeLlama-70b-Python">nemo</a> | <a href="https://huggingface.co/nvidia/OpenMath-CodeLlama-70b-Python-hf">HF</a>)</td>
<td style="text-align: center;">84.6</td>
<td style="text-align: center;"><b>50.7</b></td>
<td style="text-align: center;"><b>90.8</b></td>
<td style="text-align: center;"><b>60.4</b></td>
</tr>
</table>
The pipeline we used to produce the data and models is fully open-sourced!
- [Code](https://github.com/Kipok/NeMo-Skills)
- [Models](https://huggingface.co/collections/nvidia/openmath-65c5619de2ba059be0775014)
- [Dataset](https://huggingface.co/datasets/nvidia/OpenMathInstruct-1)
## Reproducing our results
We provide [all instructions](https://github.com/Kipok/NeMo-Skills/blob/main/docs/reproducing-results.md)
to fully reproduce our results, including data generation.
## Generating similar datasets
To generate similar datasets for other tasks or to learn more about our code, read through the docs below.
- [NeMo-Skills Pipeline](https://github.com/Kipok/NeMo-Skills)
- [Generating synthetic data](https://github.com/Kipok/NeMo-Skills/blob/main/docs/synthetic-data-generation.md)
- [Finetuning models](https://github.com/Kipok/NeMo-Skills/blob/main/docs/finetuning.md)
- [Evaluating models](https://github.com/Kipok/NeMo-Skills/blob/main/docs/evaluation.md)
## Citation
If you find our work useful, please consider citing us!
```bibtex
@article{toshniwal2024openmath,
title = {OpenMathInstruct-1: A 1.8 Million Math Instruction Tuning Dataset},
author = {Shubham Toshniwal and Ivan Moshkov and Sean Narenthiran and Daria Gitman and Fei Jia and Igor Gitman},
year = {2024},
journal = {arXiv preprint arXiv: Arxiv-2402.10176}
}
```
## License
The use of this dataset is governed by the [NVIDIA License](LICENSE) which permits commercial usage.
---
许可证:其他
许可证名称:NVIDIA(英伟达)许可证
任务类别:
- 问答
- 文本生成
语言:
- 英语
标签:
- 数学
- 代码
- NVIDIA(英伟达)
展示名称:OpenMathInstruct-1
规模区间:100万 < 样本数 < 1000万
---
# OpenMathInstruct-1 数据集
OpenMathInstruct-1 是一款数学指令微调数据集,包含180万道问题-解决方案配对样本,由采用宽松许可证的Mixtral-8x7B模型(https://huggingface.co/mistralai/Mixtral-8x7B-v0.1)生成。
数据集的问题取自GSM8K(https://github.com/openai/grade-school-math)与MATH(https://github.com/hendrycks/math)的训练子集,解决方案则通过让Mixtral模型结合文本推理与Python解释器执行的代码块进行合成生成。
本数据集被划分为训练集与验证集子集,用于我们的消融实验。二者合并后可覆盖GSM8K与MATH的完整训练集。
OpenMathInstruct-1 数据集包含以下字段:
- **question(问题)**:取自GSM8K或MATH训练集的原始问题。
- **generated_solution(生成的解决方案)**:结合文本推理与代码块合成生成的解决方案。
- **expected_answer(预期答案)**:原始数据集提供的标准答案(ground-truth)。
- **predicted_answer(预测答案)**:Mixtral模型在对应解决方案中生成的答案(从`oxed{}`标记中提取)。
- **error_message(错误信息)**:若未使用代码,则取值为`<not_executed>`;否则为空,或包含对应代码块产生的Python异常信息。若取值为`timeout`,则表示代码块执行时长超过10秒。在当前版本的数据集中,若出现任何错误或超时,我们都会终止生成过程。
- **is_correct(正确性标记)**:表示最终答案是否被我们的评分脚本判定为正确。
- **dataset(数据集来源)**:取值为`gsm8k`或`math`。
- **generation_type(生成类型)**:取值为`without_reference_solution(无参考解决方案)`或`masked_reference_solution(掩码参考解决方案)`。
我们还发布了用于生成数据集中`generation_type="masked_reference_solution"`部分的掩码解决方案([GSM8K-Masked](https://huggingface.co/datasets/nvidia/OpenMath-GSM8K-masked)、[MATH-Masked](https://huggingface.co/datasets/nvidia/OpenMath-MATH-masked))。
如需了解更多细节,请参阅我们的[论文](https://arxiv.org/abs/2402.10176)!
## OpenMath 模型系列
为展示本数据集的质量,我们发布了基于该数据集训练的一系列OpenMath模型(我们使用训练集与验证集的合并子集进行训练,以便与先前工作进行对比)。
<table border="1">
<tr>
<td></td>
<td colspan="2" style="text-align: center;">贪心解码</td>
<td colspan="2" style="text-align: center;">多数投票@50</td>
</tr>
<tr>
<td style="text-align: center;">模型</td>
<td style="text-align: center;">GSM8K</td>
<td style="text-align: center;">MATH</td>
<td style="text-align: center;">GMS8K</td>
<td style="text-align: center;">MATH</td>
</tr>
<tr>
<td style="text-align: right;">OpenMath-CodeLlama-7B([NeMo](https://huggingface.co/nvidia/OpenMath-CodeLlama-7b-Python) | [Hugging Face(HF)](https://huggingface.co/nvidia/OpenMath-CodeLlama-7b-Python-hf))</td>
<td style="text-align: center;">75.9</td>
<td style="text-align: center;">43.6</td>
<td style="text-align: center;">84.8</td>
<td style="text-align: center;">55.6</td>
</tr>
<tr>
<td style="text-align: right;">OpenMath-Mistral-7B([NeMo](https://huggingface.co/nvidia/OpenMath-Mistral-7B-v0.1) | [Hugging Face(HF)](https://huggingface.co/nvidia/OpenMath-Mistral-7B-v0.1-hf))</td>
<td style="text-align: center;">80.2</td>
<td style="text-align: center;">44.5</td>
<td style="text-align: center;">86.9</td>
<td style="text-align: center;">57.2</td>
</tr>
<tr>
<td style="text-align: right;">OpenMath-CodeLlama-13B([NeMo](https://huggingface.co/nvidia/OpenMath-CodeLlama-13b-Python) | [Hugging Face(HF)](https://huggingface.co/nvidia/OpenMath-CodeLlama-13b-Python-hf))</td>
<td style="text-align: center;">78.8</td>
<td style="text-align: center;">45.5</td>
<td style="text-align: center;">86.8</td>
<td style="text-align: center;">57.6</td>
</tr>
<tr>
<td style="text-align: right;">OpenMath-CodeLlama-34B([NeMo](https://huggingface.co/nvidia/OpenMath-CodeLlama-34b-Python) | [Hugging Face(HF)](https://huggingface.co/nvidia/OpenMath-CodeLlama-34b-Python-hf))</td>
<td style="text-align: center;">80.7</td>
<td style="text-align: center;">48.3</td>
<td style="text-align: center;">88.0</td>
<td style="text-align: center;">60.2</td>
</tr>
<tr>
<td style="text-align: right;">OpenMath-Llama2-70B([NeMo](https://huggingface.co/nvidia/OpenMath-Llama-2-70b) | [Hugging Face(HF)](https://huggingface.co/nvidia/OpenMath-Llama-2-70b-hf))</td>
<td style="text-align: center;"><b>84.7</b></td>
<td style="text-align: center;">46.3</td>
<td style="text-align: center;">90.1</td>
<td style="text-align: center;">58.3</td>
</tr>
<tr>
<td style="text-align: right;">OpenMath-CodeLlama-70B([NeMo](https://huggingface.co/nvidia/OpenMath-CodeLlama-70b-Python) | [Hugging Face(HF)](https://huggingface.co/nvidia/OpenMath-CodeLlama-70b-Python-hf))</td>
<td style="text-align: center;">84.6</td>
<td style="text-align: center;"><b>50.7</b></td>
<td style="text-align: center;"><b>90.8</b></td>
<td style="text-align: center;"><b>60.4</b></td>
</tr>
</table>
我们用于生成数据集与模型的完整流程已完全开源!
- [代码仓库](https://github.com/Kipok/NeMo-Skills)
- [模型集合](https://huggingface.co/collections/nvidia/openmath-65c5619de2ba059be0775014)
- [数据集页面](https://huggingface.co/datasets/nvidia/OpenMathInstruct-1)
## 复现实验结果
我们提供了[完整复现流程说明](https://github.com/Kipok/NeMo-Skills/blob/main/docs/reproducing-results.md),可复现我们的全部实验结果,包括数据集生成流程。
## 生成同类数据集
如需为其他任务生成同类数据集,或了解更多关于我们代码的细节,请参阅以下文档。
- [NeMo-Skills 流程](https://github.com/Kipok/NeMo-Skills)
- [合成数据生成](https://github.com/Kipok/NeMo-Skills/blob/main/docs/synthetic-data-generation.md)
- [模型微调](https://github.com/Kipok/NeMo-Skills/blob/main/docs/finetuning.md)
- [模型评估](https://github.com/Kipok/NeMo-Skills/blob/main/docs/evaluation.md)
## 引用声明
如果您觉得我们的工作有帮助,请考虑引用我们的论文!
bibtex
@article{toshniwal2024openmath,
title = {OpenMathInstruct-1: A 1.8 Million Math Instruction Tuning Dataset},
author = {Shubham Toshniwal and Ivan Moshkov and Sean Narenthiran and Daria Gitman and Fei Jia and Igor Gitman},
year = {2024},
journal = {arXiv preprint arXiv: Arxiv-2402.10176}
}
## 许可证
本数据集的使用受[NVIDIA许可证(LICENSE)](LICENSE)约束,该许可证允许商业使用。
提供机构:
primenumbersam


