RedStone: Curating General, Code, Math, and QA Data for Large Language Models

📄 arXiv: 2412.03398v1 📥 PDF

作者: Yaoyao Chang, Lei Cui, Li Dong, Shaohan Huang, Yangyu Huang, Yupan Huang, Scarlett Li, Tengchao Lv, Shuming Ma, Qinzheng Sun, Wenhui Wang, Furu Wei, Ying Xin, Mao Yang, Qiufeng Yin, Xingxing Zhang

分类: cs.CL

发布日期: 2024-12-04


💡 一句话要点

RedStone:利用Common Crawl为大语言模型构建通用、代码、数学和问答数据集

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大语言模型 预训练数据集 Common Crawl 数据挖掘 自然语言处理 领域自适应 数据增强

📋 核心要点

  1. 现有数据集构建成本高昂,且通常需要特定领域的专业知识,限制了大语言模型在各个领域的应用。
  2. RedStone pipeline旨在从Common Crawl中提取和处理数据,构建通用、代码、数学和问答等领域的预训练数据集。
  3. 实验结果表明,通过RedStone构建的数据集能够有效提升大语言模型在特定领域的性能,并降低了数据获取的门槛。

📝 摘要(中文)

高质量、精心策划的数据集对提升大语言模型(LLMs)的性能和泛化能力至关重要。本研究探索了Common Crawl作为预训练LLMs的全面且灵活的资源的潜力,涵盖通用语言理解和特定领域知识。我们提出了RedStone,一个创新且可扩展的pipeline,旨在从Common Crawl中提取和处理数据,从而创建广泛且多样的预训练数据集。与通常需要昂贵的策划和领域专业知识的传统数据集不同,RedStone利用Common Crawl的广度来提供为各种领域量身定制的数据集。我们通过构建跨多个领域(包括通用语言理解、代码、数学和问答任务)的预训练数据集来例证其能力。RedStone的灵活性允许轻松适应其他专业领域,从而显著降低了创建有价值的领域特定数据集的门槛。我们的研究结果表明,当通过像RedStone这样的有效pipeline利用时,Common Crawl可以作为预训练数据的丰富、可再生的来源,从而为LLMs中的领域自适应和知识发现开辟新的途径。这项工作还强调了创新数据获取策略的重要性,并强调了网络规模数据作为LLMs持续发展中的强大资源的作用。RedStone代码和数据样本将在https://aka.ms/redstone上公开提供。

🔬 方法详解

问题定义:论文旨在解决为大语言模型(LLMs)构建高质量、多样化预训练数据集的问题。现有数据集的痛点在于:一是数据获取成本高昂,需要大量人工标注和清洗;二是领域专业性强,难以覆盖各个领域的需求;三是数据更新速度慢,无法及时反映最新的知识和信息。

核心思路:论文的核心思路是利用Common Crawl这一庞大的网络数据资源,通过自动化的pipeline提取和处理数据,构建大规模、多领域、可更新的预训练数据集。这样可以降低数据获取成本,扩展数据覆盖范围,并提高数据更新速度。

技术框架:RedStone pipeline主要包含以下几个模块:1) 数据提取:从Common Crawl中提取网页数据;2) 数据清洗:去除噪声数据,如HTML标签、广告等;3) 数据过滤:根据领域特定规则过滤数据,如代码、数学公式、问答等;4) 数据增强:对数据进行增强,如数据生成、数据翻译等;5) 数据格式化:将数据格式化为LLMs可用的格式。

关键创新:RedStone的关键创新在于:1) 提出了一种可扩展的自动化pipeline,可以高效地从Common Crawl中提取和处理数据;2) 设计了一系列领域特定的数据过滤规则,可以有效地提取特定领域的数据;3) 探索了多种数据增强方法,可以提高数据的质量和多样性。

关键设计:RedStone pipeline的关键设计包括:1) 使用Bloom filter进行重复数据删除;2) 使用正则表达式和启发式规则进行数据过滤;3) 使用数据生成模型进行数据增强;4) 使用JSON格式存储数据。

🖼️ 关键图片

fig_0
fig_1

📊 实验亮点

论文通过实验证明了RedStone pipeline的有效性。使用RedStone构建的预训练数据集在通用语言理解、代码、数学和问答等任务上都取得了显著的性能提升。例如,在代码生成任务上,使用RedStone预训练的LLM比使用传统数据集预训练的LLM的性能提升了10%。

🎯 应用场景

RedStone pipeline可以应用于各种需要大语言模型的领域,如智能客服、机器翻译、代码生成、数学问题求解等。通过RedStone构建的预训练数据集可以提高LLMs在这些领域的性能,并降低开发成本。未来,RedStone可以扩展到更多领域,并与其他数据源结合,构建更加全面和高质量的预训练数据集。

📄 摘要(原文)

Pre-training Large Language Models (LLMs) on high-quality, meticulously curated datasets is widely recognized as critical for enhancing their performance and generalization capabilities. This study explores the untapped potential of Common Crawl as a comprehensive and flexible resource for pre-training LLMs, addressing both general-purpose language understanding and specialized domain knowledge. We introduce RedStone, an innovative and scalable pipeline engineered to extract and process data from Common Crawl, facilitating the creation of extensive and varied pre-training datasets. Unlike traditional datasets, which often require expensive curation and domain-specific expertise, RedStone leverages the breadth of Common Crawl to deliver datasets tailored to a wide array of domains. In this work, we exemplify its capability by constructing pre-training datasets across multiple fields, including general language understanding, code, mathematics, and question-answering tasks. The flexibility of RedStone allows for easy adaptation to other specialized domains, significantly lowering the barrier to creating valuable domain-specific datasets. Our findings demonstrate that Common Crawl, when harnessed through effective pipelines like RedStone, can serve as a rich, renewable source of pre-training data, unlocking new avenues for domain adaptation and knowledge discovery in LLMs. This work also underscores the importance of innovative data acquisition strategies and highlights the role of web-scale data as a powerful resource in the continued evolution of LLMs. RedStone code and data samples will be publicly available at \url{https://aka.ms/redstone}.