# MATH (2021)

> 12,500 competition problems (AMC, AIME and others) in 7 subjects and 5 difficulty levels.

Page: https://mralbu.github.io/ai-datasets/d/math

## Key facts

- Category: LLMs
- Task: Competition mathematics with worked solutions
- Creators: Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, Jacob Steinhardt
- Size: 12,500 problems
- Splits: train 7,500, test 5,000
- Input: A problem written in LaTeX
- Labels: A step-by-step solution with the final answer in \boxed{}
- License: MIT
- Paper: [Measuring Mathematical Problem Solving With the MATH Dataset](https://arxiv.org/abs/2103.03874)
- Homepage: https://github.com/hendrycks/math
- Hugging Face: [EleutherAI/hendrycks_math](https://huggingface.co/datasets/EleutherAI/hendrycks_math)
- Sampled at Hub revision 21a5633873b6a120296cce3e2df9d5550074f4a3 (2026-11-07)

## Why it matters

GSM8K tests arithmetic word problems; MATH tests the kind of problem solving needed in high-school competitions. At release, large models solved only a few percent, and the authors doubted that scale alone would close the gap. Minerva reached 50% in 2022, and reasoning models trained with reinforcement learning now solve almost all of it. The 500-problem MATH-500 subset is the version most reports use.

## Worth knowing

- Problems come from AMC 10, AMC 12, AIME and similar contests, collected through the Art of Problem Solving community.
- Every answer is in \boxed{}, so grading is automatic, but answers must be normalized first (1/2, 0.5 and \frac{1}{2} are all the same answer).
- Geometry problems draw their figures in Asymptote code, so a model has to read the drawing as code. The samples below leave it out.
- Level 1 is easiest and level 5 hardest, within each subject.

## Get the data

```bash
# pip install -U huggingface_hub
hf download EleutherAI/hendrycks_math --repo-type dataset \
  --local-dir math
```

```python
from datasets import load_dataset   # pip install datasets

ds = load_dataset("EleutherAI/hendrycks_math", "algebra")  # or any of: counting_and_probability, geometry, intermediate_algebra, number_theory, prealgebra, …
print(ds)
```

```python
import polars as pl

df = pl.read_parquet("hf://datasets/EleutherAI/hendrycks_math@~parquet/algebra/test/*.parquet")
print(df.shape)
```

## Related datasets

- [GSM8K](https://huggingface.co/datasets/openai/gsm8k): 2021, grade-school word problems (on this site: https://mralbu.github.io/ai-datasets/d/gsm8k)
- [MATH-500](https://huggingface.co/datasets/HuggingFaceH4/MATH-500): 2023, the subset used in most reports
- [AIME 2025](https://huggingface.co/datasets/MathArena/aime_2025): 2025, fresh competition problems for reasoning models (on this site: https://mralbu.github.io/ai-datasets/d/aime-2025)

## Landmark papers

- [Solving Quantitative Reasoning Problems with Language Models (Minerva)](https://arxiv.org/abs/2206.14858) (2022)
- [Let's Verify Step by Step](https://arxiv.org/abs/2305.20050) (2023)

## Papers on this site that use it

- [Let's Verify Step by Step (2023)](https://mralbu.github.io/ai-datasets/p/lets-verify.md): Grade every step of a solution, not just the final answer, and a verifier picks correct math solutions far more reliably.
- [LLaMA (2023)](https://mralbu.github.io/ai-datasets/p/llama.md): Smaller models trained longer on public data alone, matching models many times their size, with the weights given to researchers.
- [DeepSeek-R1 (2025)](https://mralbu.github.io/ai-datasets/p/deepseek-r1.md): Reasoning learned through reinforcement learning on checkable answers, released with open weights.
- [Muon (2025)](https://mralbu.github.io/ai-datasets/p/muon.md): Shows that Muon, which orthogonalizes each weight matrix's update, trains large language models with about half the compute AdamW needs.
- [SWE-RL (2025)](https://mralbu.github.io/ai-datasets/p/swe-rl.md): Trained an open model to fix GitHub issues with reinforcement learning on public pull requests, rewarding patches by how closely they match the real fix.
