MegaMath: Pushing the Limits of Open Math Corpora

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Zhou, Fan, Wang, Zengzhi, Ranjan, Nikhil, Cheng, Zhoujun, Tang, Liping, He, Guowei, Liu, Zhengzhong, Xing, Eric P.
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866912307695583232
author Zhou, Fan
Wang, Zengzhi
Ranjan, Nikhil
Cheng, Zhoujun
Tang, Liping
He, Guowei
Liu, Zhengzhong
Xing, Eric P.
author_facet Zhou, Fan
Wang, Zengzhi
Ranjan, Nikhil
Cheng, Zhoujun
Tang, Liping
He, Guowei
Liu, Zhengzhong
Xing, Eric P.
contents Mathematical reasoning is a cornerstone of human intelligence and a key benchmark for advanced capabilities in large language models (LLMs). However, the research community still lacks an open, large-scale, high-quality corpus tailored to the demands of math-centric LLM pre-training. We present MegaMath, an open dataset curated from diverse, math-focused sources through following practices: (1) Revisiting web data: We re-extracted mathematical documents from Common Crawl with math-oriented HTML optimizations, fasttext-based filtering and deduplication, all for acquiring higher-quality data on the Internet. (2) Recalling Math-related code data: We identified high quality math-related code from large code training corpus, Stack-V2, further enhancing data diversity. (3) Exploring Synthetic data: We synthesized QA-style text, math-related code, and interleaved text-code blocks from web data or code data. By integrating these strategies and validating their effectiveness through extensive ablations, MegaMath delivers 371B tokens with the largest quantity and top quality among existing open math pre-training datasets.
format Preprint
id arxiv_https___arxiv_org_abs_2504_02807
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle MegaMath: Pushing the Limits of Open Math Corpora
Zhou, Fan
Wang, Zengzhi
Ranjan, Nikhil
Cheng, Zhoujun
Tang, Liping
He, Guowei
Liu, Zhengzhong
Xing, Eric P.
Computation and Language
Artificial Intelligence
Machine Learning
Mathematical reasoning is a cornerstone of human intelligence and a key benchmark for advanced capabilities in large language models (LLMs). However, the research community still lacks an open, large-scale, high-quality corpus tailored to the demands of math-centric LLM pre-training. We present MegaMath, an open dataset curated from diverse, math-focused sources through following practices: (1) Revisiting web data: We re-extracted mathematical documents from Common Crawl with math-oriented HTML optimizations, fasttext-based filtering and deduplication, all for acquiring higher-quality data on the Internet. (2) Recalling Math-related code data: We identified high quality math-related code from large code training corpus, Stack-V2, further enhancing data diversity. (3) Exploring Synthetic data: We synthesized QA-style text, math-related code, and interleaved text-code blocks from web data or code data. By integrating these strategies and validating their effectiveness through extensive ablations, MegaMath delivers 371B tokens with the largest quantity and top quality among existing open math pre-training datasets.
title MegaMath: Pushing the Limits of Open Math Corpora
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2504.02807