MegaMath: Pushing the Limits of Open Math Corpora

AK's Picks LLM PTSAD LNJR
数学推理是人类智能的基石,也是衡量大型语言模型(LLMs)高级能力的关键基准。然而,研究社区仍然缺乏一个开放、大规模、高质量的数据集,专门满足以数学为中心的LLM预训练需求。我们提出了MegaMath,这是一个从多样化且专注于数学的来源中精心整理的开源数据集,其构建遵循以下实践:(1)重新审视网络数据:我们通过针对数学优化的HTML提取、基于fasttext的过滤和去重技术,从Common Crawl中重新提取了数学文档,以获取更高质量的互联网数据。(2)回顾与数学相关的代码数据:我们从大规模代码训练语料库Stack-V2中识别出高质量的数学相关代码,进一步增强了数据的多样性。(3)探索合成数据:我们从网络数据或代码数据中合成了问答风格的文本、数学相关代码以及交错的文本-代码块。通过整合这些策略,并通过广泛的消融实验验证其有效性,MegaMath提供了3710亿个标记,是现有开放数学预训练数据集中规模最大且质量最高的数据集。
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.
许愿