---
title: MathInstruct
canonical_url: "https://www.modelscope.cn/datasets/AI-ModelScope/MathInstruct"
md_url: "https://www.modelscope.cn/datasets/AI-ModelScope/MathInstruct.md"
repository: AI-ModelScope/MathInstruct
chinese_name: MathInstruct
last_updated: 2023-12-08
license: mit
storage_size: "192 MB"
domain:
  - configs
  - size_categories
  - language
  - pretty_name
  - task_categories
tasks:
  - "{config_name=default, data_files=[{path=MathInstruct.jsonl, split=train}]}"
  - "100K<n<1M"
  - en
  - MathInstruct
  - text-generation
downloads: 9259
stars: 2
---

# MathInstruct

> MathInstruct - AI-ModelScope 在 ModelScope 开源的数据集。🦣 MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuning

AI-ModelScope/MathInstruct 是 ModelScope 魔搭社区上的{config_name=default, data_files=[{path=MathInstruct.jsonl, split=train}]}、100K<n<1M、en数据集，涉及 configs、size_categories、language 领域，存储大小 192 MB，采用 mit 许可。

- **Repository**: AI-ModelScope/MathInstruct
- **License**: mit
- **Tasks**: {config_name=default, data_files=[{path=MathInstruct.jsonl, split=train}]}, 100K<n<1M, en, MathInstruct, text-generation
- **Domain**: configs, size_categories, language, pretty_name, task_categories
- **Storage size**: 192 MB
- **Downloads**: 9259
- **Stars**: 2
- **Last updated**: 2023-12-08

Source: https://www.modelscope.cn/datasets/AI-ModelScope/MathInstruct

---

# 🦣 MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuning

MathInstruct is a meticulously curated instruction tuning dataset that is lightweight yet generalizable. MathInstruct is compiled from 13 math rationale datasets, six of which are newly curated by this work. It uniquely focuses on the hybrid use of chain-of-thought (CoT) and program-of-thought (PoT) rationales, and ensures extensive coverage of diverse mathematical fields. 

Project Page: [https://tiger-ai-lab.github.io/MAmmoTH/](https://tiger-ai-lab.github.io/MAmmoTH/)

Paper: [https://arxiv.org/pdf/2309.05653.pdf](https://arxiv.org/pdf/2309.05653.pdf)

Code: [https://github.com/TIGER-AI-Lab/MAmmoTH](https://github.com/TIGER-AI-Lab/MAmmoTH)

Models:
|     | **Base Model: Llama-2**                                       | **Base Model: Code Llama**                                               |
|---
--|---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
|---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
--|
| 7B  | 🦣 [MAmmoTH-7B](https://huggingface.co/TIGER-Lab/MAmmoTH-7B)   | 🦣 [MAmmoTH-Coder-7B](https://huggingface.co/TIGER-Lab/MAmmoTH-Coder-7B)  |
| 13B | 🦣 [MAmmoTH-13B](https://huggingface.co/TIGER-Lab/MAmmoTH-13B) | 🦣 [MAmmoTH-Coder-13B](https://huggingface.co/TIGER-Lab/MAmmoTH-Coder-13B)|
| 34B | -                                                             | 🦣 [MAmmoTH-Coder-34B](https://huggingface.co/TIGER-Lab/MAmmoTH-Coder-34B)|
| 70B | 🦣 [MAmmoTH-70B](https://huggingface.co/TIGER-Lab/MAmmoTH-70B) | -                                                                        |

## **License**
Please check out the license of each subset in our curated dataset MathInstruct.
| Dataset Name 	| License Type   	|
|---
---
---
---
--|---
---
---
---
---
-|
| GSM8K        	| MIT            	|
| GSM8K-RFT    	| Non listed      |
| AQuA-RAT     	| Apache 2.0     	|
| MATH         	| MIT            	|
| TheoremQA    	| MIT            	|
| Camel-Math   	| Attribution-NonCommercial 4.0 International    	|
| NumGLUE      	| Apache-2.0          	|
| MathQA       	| Apache-2.0     	|
| Our Curated   | MIT             |

## 示例代码
```python
from modelscope import MsDataset
from modelscope.utils.constant import DownloadMode

ds = MsDataset.load('AI-ModelScope/MathInstruct',subset_name='default', split='train', download_mode=DownloadMode.FORCE_REDOWNLOAD)  
print(next(iter(ds)))
```

## **Citation**

Please cite our paper if you use our data, model or code. Please also kindly cite the original dataset papers. 

```
@article{yue2023mammoth,
  title={MAmmoTH: Building Math Generalist Models through Hybrid Instruction Tuning},
  author={Xiang Yue, Xingwei Qu, Ge Zhang, Yao Fu, Wenhao Huang, Huan Sun, Yu Su, Wenhu Chen},
  journal={arXiv preprint arXiv:2309.05653},
  year={2023}
}
```
