ZeusLabs/MetaMathQA
收藏Hugging Face2026-04-02 更新2026-04-05 收录
下载链接:
https://hf-mirror.com/datasets/ZeusLabs/MetaMathQA
下载链接
链接失效反馈官方服务:
资源简介:
---
tags:
- math
- math-qa
license: mit
---
View the project page:
https://meta-math.github.io/
see our paper at https://arxiv.org/abs/2309.12284
## Note
All MetaMathQA data are augmented from the training sets of GSM8K and MATH.
<span style="color:red"><b>None of the augmented data is from the testing set.</b></span>
You can check the `original_question` in `meta-math/MetaMathQA`, each item is from the GSM8K or MATH train set.
## Model Details
MetaMath-Mistral-7B is fully fine-tuned on the MetaMathQA datasets and based on the powerful Mistral-7B model. It is glad to see using MetaMathQA datasets and changing the base model from llama-2-7B to Mistral-7b can boost the GSM8K performance from 66.5 to **77.7**.
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.
More training details and scripts can be seen at [https://github.com/meta-math/MetaMath](https://github.com/meta-math/MetaMath).
## Installation
```
pip install transformers==4.35.0
pip install torch==2.0.1
pip install sentencepiece==0.1.99
pip install tokenizers==0.13.3
pip install accelerate==0.21.0
pip install bitsandbytes==0.40.0
pip install vllm
pip install fraction
pip install protobuf
```
## Model Usage
prompting template:
'''
"Below is an instruction that describes a task. "
"Write a response that appropriately completes the request.\n\n"
"### Instruction:\n{instruction}\n\n### Response: Let's think step by step."
'''
where you need to use your query question to replace the {instruction}
There is another interesting repo about Arithmo-Mistral-7B at [https://huggingface.co/akjindal53244/Arithmo-Mistral-7B](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.
We would also try to train the combination of **MetaMathQA** and **MathInstruct** datasets, and also open all the results and training details.
## Experiments
| Model | GSM8k Pass@1 | MATH Pass@1 |
|---------------------|--------------|-------------|
| MPT-7B | 6.8 | 3.0 |
| Falcon-7B | 6.8 | 2.3 |
| LLaMA-1-7B | 11.0 | 2.9 |
| LLaMA-2-7B | 14.6 | 2.5 |
| MPT-30B | 15.2 | 3.1 |
| LLaMA-1-13B | 17.8 | 3.9 |
| GPT-Neo-2.7B | 19.5 | -- |
| Falcon-40B | 19.6 | 2.5 |
| Baichuan-chat-13B | 23.9 | -- |
| Vicuna-v1.3-13B | 27.6 | -- |
| LLaMA-2-13B | 28.7 | 3.9 |
| InternLM-7B | 31.2 | -- |
| ChatGLM-2-6B | 32.4 | -- |
| GPT-J-6B | 34.9 | -- |
| LLaMA-1-33B | 35.6 | 3.9 |
| LLaMA-2-34B | 42.2 | 6.24 |
| RFT-7B | 50.3 | -- |
| LLaMA-1-65B | 50.9 | 10.6 |
| Qwen-7B | 51.6 | -- |
| WizardMath-7B | 54.9 | 10.7 |
| LLaMA-2-70B | 56.8 | 13.5 |
| WizardMath-13B | 63.9 | 14.0 |
| MAmmoTH-7B (COT) | 50.5 | 10.4 |
| MAmmoTH-7B (POT+COT)| 53.6 | 31.5 |
| Arithmo-Mistral-7B | 74.7 | 25.3 |
| MetaMath-7B | 66.5 | 19.8 |
| MetaMath-13B | 72.3 | 22.4 |
| 🔥 **MetaMath-Mistral-7B** | **77.7** | **28.2** |
We encourage anyone to use our MetaMathQA datasets. We are very happy to see the following models trained by MetaMathQA achieve a very promising performance!
OpenChat-3.5 (https://huggingface.co/openchat/openchat_3.5)
CausalLM (https://huggingface.co/CausalLM/14B)
zephyr (https://huggingface.co/qblocks/zephyr-7b-alpha_metamathqa)
Ziya2 (https://huggingface.co/IDEA-CCNL/Ziya2-13B-Base)
# Citation
```bibtex
@article{yu2023metamath,
title={MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Models},
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},
journal={arXiv preprint arXiv:2309.12284},
year={2023}
}
```
提供机构:
ZeusLabs
搜集汇总
数据集介绍

构建方式
在数学推理领域,高质量指令数据的稀缺性制约了大型语言模型的专业能力提升。MetaMathQA数据集的构建采用了创新的自我引导方法,通过从原始数学问题出发,利用大语言模型生成多样化的推理路径和答案变体。具体而言,研究者设计了多种数据增强策略,例如问题重述、逆向问题生成以及逐步推理的改写,从而将一个单一的数学问题扩展为多个蕴含相同数学原理但表达形式各异的训练样本。这种方法有效放大了有限种子问题的覆盖面,构建了一个规模庞大且富含逻辑变体的数学指令数据集。
特点
该数据集的核心特征在于其专注于提升模型在数学问题上的推理与泛化能力。其内容经过精心设计,不仅覆盖了广泛的数学主题,更重要的是每个问题都配备了多种正确但表述不同的推理过程。这种结构迫使模型超越对表面语言模式的记忆,转而深入理解问题背后的抽象数学逻辑和运算规则。数据集的构建理念直指当前语言模型在数学领域常见的“表面模仿”缺陷,旨在通过暴露于逻辑等价但形式多样的训练样本中,锤炼模型举一反三的深层推理能力。
使用方法
对于希望提升模型数学能力的研究者与开发者,MetaMathQA可作为高效的微调数据源。典型的使用流程是,将数据集以标准指令遵循格式加载,并用于对基础预训练语言模型进行有监督的微调。在训练过程中,模型通过学习同一问题的多种解法,内化其不变的数学内核。实践表明,在此数据集上微调后的模型,在MATH、GSM8K等多个外部数学基准测试上均能展现出显著的性能提升,尤其在需要多步推理和泛化的复杂问题上表现更为稳健。
背景与挑战
背景概述
MetaMathQA数据集由上海交通大学、微软研究院及华东师范大学的研究团队于2023年联合构建,旨在应对大语言模型在数学推理任务中普遍存在的泛化能力不足问题。该数据集聚焦于数学问题求解的核心研究,通过精心设计的元数据增强与多样化问题重构策略,显著提升了模型对复杂数学逻辑的理解与推导能力。其创新性的数据构建方法不仅推动了数学推理领域的技术进步,也为后续相关研究提供了高质量的基准资源,对促进人工智能在科学计算与教育应用方面的发展产生了深远影响。
当前挑战
MetaMathQA数据集致力于解决大语言模型在数学推理任务中面临的泛化挑战,特别是模型对未见问题类型的适应能力较弱,以及容易陷入表面模式匹配而缺乏深度逻辑推导的问题。在构建过程中,研究团队需克服数学问题表述的多样性与复杂性,确保增强后的问题既保持原意的完整性,又能有效引导模型进行逐步推理。此外,生成高质量、多样化的数学问题变体,并避免引入偏差或错误,也是数据构建中的关键难点,这要求精细的算法设计与严格的人工验证相结合。
常用场景
经典使用场景
在数学推理领域,MetaMathQA数据集为大型语言模型提供了高质量的指令微调资源,其经典使用场景聚焦于提升模型在复杂数学问题上的逐步推理能力。通过精心构建的数学问题及其对应的推导过程,该数据集支持模型学习从问题陈述到最终答案的逻辑链条,尤其在涉及代数、几何和算术的多步骤推理任务中,模型能够模仿人类解题思维,生成清晰且连贯的中间步骤,从而显著增强其数学问题解决的准确性与可解释性。
解决学术问题
MetaMathQA旨在解决大型语言模型在数学推理中常见的幻觉与泛化不足问题,通过提供多样化的数学问题重构与增强版本,它促进了模型对数学概念深层理解的研究。该数据集的意义在于填补了数学指令微调数据的空白,推动了模型从单纯记忆向逻辑推理的转变,其影响延伸至自动化教育、智能辅导系统等领域,为开发更可靠、可解释的AI推理工具奠定了数据基础。
衍生相关工作
基于MetaMathQA数据集,衍生了一系列经典研究工作,包括针对数学推理的微调框架如MetaMath模型,这些工作探索了数据增强与指令优化策略,以提升模型的泛化能力。相关研究还扩展至多语言数学问题求解和跨领域推理任务,促进了开源社区中数学AI工具的发展,为后续数据集如MathInstruct等的构建提供了灵感,共同推动了数学推理AI技术的进步与创新。
以上内容由遇见数据集搜集并总结生成



