TensorX
返回文献探索

Paper · arXiv 2504.02807

MegaMath: Pushing the Limits of Open Math Corpora

Fan Zhou, Zengzhi Wang, Nikhil Ranjan, Zhoujun Cheng, Liping Tang, Guowei He, Zhengzhong Liu, Eric P. Xing

36 upvotesApril 3, 2025arXiv 预印本
AI 摘要

MegaMath is an open dataset designed for math-centric LLM pre-training, combining high-quality web data, math-related code, and synthetic content to enhance diversity and quality.

LLMsMegaMathCommon CrawlHTML optimizationsfastTextdeduplicationStack-V2QA-style textinterleaved text-code blocksmath pre-training datasets

Abstract

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.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
MegaMath: Pushing the Limits of Open Math Corpora | TensorX