Skip to content
RAG Repo

MegaMath is an open pretraining corpus built specifically for mathematics. It draws on a range of maths-focused sources, including filtered web text, code, and synthetically generated material, and totals more than 300 billion tokens.

That scale puts it among the largest open mathematics corpora, several times bigger than earlier collections such as OpenWebMath and Proof-Pile-2. It is aimed at training and continued pretraining of maths-capable language models, but the same breadth makes it a rich knowledge base for maths and reasoning RAG.

The dataset is released on Hugging Face by the LLM360 project under ODC-By 1.0, a permissive open-data licence that allows commercial use with attribution.

mathematicspretraininglarge-corpusweb-crawl

Related sources