Papers › MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Models

MetaMath: Bootstrap Your Own Mathematical Questions for Large Language Models

21 Sep 2023arXiv:2309.12284archive 2025-07-28

Longhui Yu, Weisen Jiang, Han Shi, Jincheng Yu, Zhengying Liu, Yu Zhang, James T. Kwok, Zhenguo Li, Adrian Weller, Weiyang Liu

Large language models (LLMs) have pushed the limits of natural language understanding and exhibited excellent problem-solving ability. Despite the great success, most existing open-source LLMs (e.g., LLaMA-2) are still far away from satisfactory for solving mathematical problem due to the complex reasoning procedures. To bridge this gap, we propose MetaMath, a fine-tuned language model that specializes in mathematical reasoning. Specifically, we start by bootstrapping mathematical questions by rewriting the question from multiple perspectives without extra knowledge, which results in a new dataset called MetaMathQA. Then we fine-tune the LLaMA-2 models on MetaMathQA. Experimental results on two popular benchmarks (i.e., GSM8K and MATH) for mathematical reasoning demonstrate that MetaMath outperforms a suite of open-source LLMs by a significant margin. Our MetaMath-7B model achieves 66.4% on GSM8K and 19.4% on MATH, exceeding the state-of-the-art models of the same size by 11.5% and 8.7%. Particularly, MetaMath-70B achieves an accuracy of 82.3% on GSM8K, slightly better than GPT-3.5-Turbo. We release all the MetaMathQA dataset, the MetaMath models with different model sizes and the training code for public use.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2309.12284")

Code

Syntology Ran 15 of 22 code samples harvested from 1 repository linked to this paper; 7 have no recorded run. Of those that ran: 1 ran · violated contract; 14 ran · our draft was wrong.

By repository: official repository: 22 samples from 1 repository, 15 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

meta-math/MetaMath officialmentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

22 samples harvested; 15 ran; 0 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · violated contract
14ran · our draft was wrong
7unverified

Licence: 0 of the 22 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from meta-math/MetaMath. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

is_number meta-math/MetaMath/eval_gsm8k.py official repository ran · violated contract Apache-2.0 (permissive) · 0fe9cf6c00ef56ea · report
_fix_a_slash_b meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 5e9ee828a2e2425b · report
_fix_fracs meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 3e4ba8b51b005d2b · report
_fix_sqrt meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 4621fed7d175cce7 · report
_remove_right_units meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 65bd3c41accc64eb · report
_strip_string meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · c6aa3b84fc7a24e9 · report
batch_data meta-math/MetaMath/eval_gsm8k.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 66b3b5450182da3a · report
create_response meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository ran · our draft was wrong Apache-2.0 (permissive) · cdd294b5fa8c76de · report
create_response_chat meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository ran · our draft was wrong Apache-2.0 (permissive) · e56a1c38554053a2 · report
delete_extra_zero meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · b5bd259672545188 · report
extract_math_answer meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 9429b9301289a950 · report
get_answer_from_chat_model meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 2e11d65849756456 · report
jload meta-math/MetaMath/train_math.py official repository ran · our draft was wrong Apache-2.0 (permissive) · d07d04439cd1d44f · report
remove_boxed meta-math/MetaMath/eval_math.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · f3bbe264b05aadd3 · report
wrapper meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository ran · our draft was wrong Apache-2.0 (permissive) · abda8b0048d01129 · report
BackwardReasoning meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository unverified Apache-2.0 (permissive) · a596c25460663eb8 · report
LogUtils meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository unverified Apache-2.0 (permissive) · 71361dae629cb546 · report
PathUtils meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository unverified Apache-2.0 (permissive) · 800ac3b48f19f794 · report
answer_cleansing meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository unverified Apache-2.0 (permissive) · c22739942cdfc7de · report
batch_get_api meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository unverified Apache-2.0 (permissive) · 1fde7ca5a428d3fc · report
batch_get_api_merge meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository unverified Apache-2.0 (permissive) · 462b6fd895d0b3e3 · report
batch_get_chat_api meta-math/MetaMath/code_for_generating_data/code/main_backward_reasoning.py official repository unverified Apache-2.0 (permissive) · 220568f45521e253 · report

Tasks

Arithmetic ReasoningGSM8KLanguage ModelingLanguage ModellingMathMath Word Problem SolvingMathematical ReasoningNatural Language Understanding

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Arithmetic Reasoning GSM8K MetaMath 70B Accuracy 82.3 #60 of 164 Archive leaderboard report
Arithmetic Reasoning GSM8K MetaMath 70B Parameters (Billion) 70 #60 of 164 Archive leaderboard report
Arithmetic Reasoning GSM8K MetaMath-Mistral-7B Accuracy 77.7 #80 of 164 Archive leaderboard report
Arithmetic Reasoning GSM8K MetaMath-Mistral-7B Parameters (Billion) 7 #80 of 164 Archive leaderboard report
Arithmetic Reasoning GSM8K MetaMath 13B Accuracy 71.0 #102 of 164 Archive leaderboard report
Arithmetic Reasoning GSM8K MetaMath 13B Parameters (Billion) 13 #102 of 164 Archive leaderboard report
Arithmetic Reasoning GSM8K MetaMath 7B Accuracy 66.4 #109 of 164 Archive leaderboard report
Arithmetic Reasoning GSM8K MetaMath 7B Parameters (Billion) 7 #109 of 164 Archive leaderboard report
Math Word Problem Solving MATH MetaMath 70B Accuracy 26.0 #95 of 135 Archive leaderboard report
Math Word Problem Solving MATH MetaMath 70B Parameters (Billions) 70 #95 of 135 Archive leaderboard report
Math Word Problem Solving MATH MetaMath 13B Accuracy 22.5 #101 of 135 Archive leaderboard report
Math Word Problem Solving MATH MetaMath 13B Parameters (Billions) 13 #101 of 135 Archive leaderboard report
Math Word Problem Solving MATH MetaMath 7B Accuracy 19.4 #104 of 135 Archive leaderboard report
Math Word Problem Solving MATH MetaMath 7B Parameters (Billions) 7 #104 of 135 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

AdamAttentionAttention DropoutBPECosine AnnealingDense ConnectionsDropoutGPT-3Layer NormalizationLinear LayerLinear Warmup With Cosine AnnealingMulti-Head AttentionResidual ConnectionSoftmaxWeight Decay

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections