[Paper Review] OpenMathInstruct-1: A 1.8 Million Math Instruction Tuning Dataset
This paper introduces OpenMathInstruct-1, a 1.8 million problem-solution pair dataset for math instruction tuning, generated by prompting the permissively licensed Mixtral 8x7B model to produce code-interpreter style solutions for GSM8K and MATH benchmarks. By incorporating text solutions into few-shot prompts, the method achieves 99.9% coverage on GSM8K and 93% on MATH, enabling the fine-tuned OpenMath-CodeLlama-70B model to reach 84.6% on GSM8K and 50.7% on MATH—competitive with GPT-4 distilled models.
Recent work has shown the immense potential of synthetically generated datasets for training large language models (LLMs), especially for acquiring targeted skills. Current large-scale math instruction tuning datasets such as MetaMathQA (Yu et al., 2024) and MAmmoTH (Yue et al., 2024) are constructed using outputs from closed-source LLMs with commercially restrictive licenses. A key reason limiting the use of open-source LLMs in these data generation pipelines has been the wide gap between the mathematical skills of the best closed-source LLMs, such as GPT-4, and the best open-source LLMs. Building on the recent progress in open-source LLMs, our proposed prompting novelty, and some brute-force scaling, we construct OpenMathInstruct-1, a math instruction tuning dataset with 1.8M problem-solution pairs. The dataset is constructed by synthesizing code-interpreter solutions for GSM8K and MATH, two popular math reasoning benchmarks, using the recently released and permissively licensed Mixtral model. Our best model, OpenMath-CodeLlama-70B, trained on a subset of OpenMathInstruct-1, achieves a score of 84.6% on GSM8K and 50.7% on MATH, which is competitive with the best gpt-distilled models. We release our code, models, and the OpenMathInstruct-1 dataset under a commercially permissive license.
Motivation & Objective
- To close the performance gap between open-source and closed-source LLMs in math instruction tuning by enabling high-quality synthetic data generation using open-source models.
- To overcome the limitations of existing open-source math datasets, which are smaller and often rely on proprietary models for data creation.
- To develop a scalable, reproducible, and commercially permissive pipeline for generating high-coverage math reasoning datasets using only open-source components.
- To demonstrate that with targeted prompting and brute-force sampling, open-source LLMs can produce synthetic data competitive with that from closed-source models like GPT-4.
- To release a large-scale, permissively licensed dataset and models to foster reproducible, open research in mathematical reasoning LLMs.
Proposed method
- Generated code-interpreter style solutions for 1.8M problem-solution pairs by prompting the Mixtral 8x7B model on GSM8K and MATH benchmarks.
- Used brute-force sampling with temperature=1.0 and top_p=0.95 to increase solution diversity and training set coverage (TSC).
- Introduced subject-specific few-shot prompts for MATH’s mathematical topics to better target the model’s latent reasoning capabilities.
- Enhanced prompting by incorporating ground-truth text solutions from benchmark datasets into few-shot examples, significantly improving solution quality and TSC.
- Combined solutions from multiple sampling strategies and prompting techniques to maximize coverage across both benchmarks.
- Fine-tuned the CodeLlama-70B model on a subset of OpenMathInstruct-1 to evaluate downstream performance on standard math benchmarks.

Experimental results
Research questions
- RQ1Can open-source LLMs like Mixtral 8x7B generate synthetic math solutions with coverage approaching that of GPT-4 when using targeted prompting?
- RQ2Does incorporating text solutions from benchmark datasets into few-shot prompts improve the quality and coverage of code-interpreter style solutions?
- RQ3To what extent can brute-force sampling and prompting engineering close the performance gap between open-source and closed-source LLMs in math reasoning?
- RQ4Can a fine-tuned open-source model trained on a synthetic dataset achieve performance competitive with GPT-4 distilled models on standard math benchmarks?
- RQ5Is it feasible to build a large-scale, permissively licensed math instruction tuning dataset without relying on proprietary models?
Key findings
- OpenMathInstruct-1 achieves 99.9% training set coverage on GSM8K and 93% on MATH, indicating high-quality solution generation.
- The best model, OpenMath-CodeLlama-70B, achieves 84.6% accuracy on GSM8K and 50.7% on MATH, matching the performance of GPT-4 distilled models.
- Incorporating text solutions into few-shot prompts led to a substantial improvement in solution coverage, outperforming subject-specific prompting alone.
- The Mixtral 8x7B model, despite being open-source and permissively licensed, achieves 8x higher solution coverage on GSM8K and 12x on MATH compared to GPT-4 when using sufficient sampling.
- The dataset is 4x larger than the next largest open-source math instruction tuning dataset, MetaMathQA, and is the only one with a permissive license.
- The entire pipeline, including code, models, and dataset, is released under a commercially permissive license, enabling full reproducibility and broad adoption.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.