[论文解读] OpenWebMath: An Open Dataset of High-Quality Mathematical Web Text
OpenWebMath 是一个开源的 147 亿 token 数据集,包含从 Common Crawl 提取的高质量数学网络文本,保留了 LaTeX 符号并经过质量与相关性筛选。在该数据上进行训练的 14 亿参数模型,其性能优于在 20 倍于通用领域 token 数量的数据上训练的模型,表明领域特定的预训练能显著提升语言模型的数学推理能力。
There is growing evidence that pretraining on high quality, carefully thought-out tokens such as code or mathematics plays an important role in improving the reasoning abilities of large language models. For example, Minerva, a PaLM model finetuned on billions of tokens of mathematical documents from arXiv and the web, reported dramatically improved performance on problems that require quantitative reasoning. However, because all known open source web datasets employ preprocessing that does not faithfully preserve mathematical notation, the benefits of large scale training on quantitive web documents are unavailable to the research community. We introduce OpenWebMath, an open dataset inspired by these works containing 14.7B tokens of mathematical webpages from Common Crawl. We describe in detail our method for extracting text and LaTeX content and removing boilerplate from HTML documents, as well as our methods for quality filtering and deduplication. Additionally, we run small-scale experiments by training 1.4B parameter language models on OpenWebMath, showing that models trained on 14.7B tokens of our dataset surpass the performance of models trained on over 20x the amount of general language data. We hope that our dataset, openly released on the Hugging Face Hub, will help spur advances in the reasoning abilities of large language models.
研究动机与目标
- 为解决缺乏公开可用、高质量的、保留数学符号的网络数学文本数据集的问题。
- 通过提供大规模、精心筛选的开放数据集,推动数学推理、记忆能力和泛化能力的研究。
- 证明在领域特定的高质量数学内容上进行预训练,相比通用领域预训练,能更有效地提升数学推理性能。
- 发布一个可复现的流水线,用于大规模提取、过滤和去重数学网络内容。
提出的方法
- 使用保留 LaTeX 内容并去除 HTML 框架的流水线,从 Common Crawl 中提取了 147 亿 token。
- 采用多阶段过滤方法,结合大语言模型与基于规则的启发式方法,仅保留高质量、英文、数学相关内容。
- 采用聚类与大语言模型分类相结合的方法,分析文档类型及跨领域的主题分布。
- 使用基于嵌入的去重技术,消除近似重复内容。
- 在 OpenWebMath 上训练 14 亿参数语言模型,并与在 The Pile 和 ProofPile 上训练的模型进行性能对比。
- 在 MATH、GSM8k 和 LILA-multiarith 基准测试上评估模型,以衡量下游推理性能。
实验结果
研究问题
- RQ1一个大规模、开源的、保留 LaTeX 符号的网络数学文本数据集,能否提升大语言模型的推理能力?
- RQ2在 OpenWebMath 上进行预训练,与在 20 倍于通用领域数据的文本上进行预训练相比,其数学推理性能如何?
- RQ3将 OpenWebMath 与其他数学数据集结合,对模型性能有何影响?
- RQ4预训练数据的质量与领域特异性在多大程度上影响模型的泛化与记忆能力?
- RQ5所提出的从开放网络中提取并过滤高质量数学内容的流水线,其有效性如何?
主要发现
- 在 OpenWebMath 的 147 亿 token 上训练的模型,在 MATH-Algebra-Easy 和 GSM8k 基准测试中表现优于在 The Pile 的 3000 亿 token 上训练的 Pythia 14 亿参数模型。
- 仅使用 OpenWebMath 训练的模型在 MATH 和 GSM8k 上的困惑度低于在 20 倍于通用领域数据上训练的模型。
- OpenWebMath 与 ProofPile 的 50/50 混合模型在所有测试基准中均取得最佳整体性能。
- 该数据集包含 147 亿 token 的高质量数学内容,其中 88% 的文档属于数学、物理、计算机科学或相关技术领域。
- 论坛内容(如 Math StackExchange)和教育类内容占比最大,12% 的文档无法清晰归类为核心 STEM 学科。
- 该流水线成功保留了 LaTeX 符号,并去除了 90% 的非数学相关框架内容,生成了一个干净、高保真的数据集,适用于预训练。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。