# 训练数据整理

**训练数据整理**是指收集、清洗、过滤、去重并将样本组织成数据集的一系列实践，目的是支撑高效的机器学习。对于在数万亿 token 的网络抓取数据上训练的大语言模型（LLM）而言，整理涵盖了一条从原始抓取数据的提取、经质量过滤和去重、到最终混合数据源的流水线，而每一步所做的选择都会可测量地改变模型的准确率、训练成本和行为。<sup>[1](https://aclanthology.org/2024.emnlp-main.596.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 主要原始来源 | Common Crawl 是一家非营利档案机构，收录自 2008 年以来收集的超过 10 PB 的网络抓取数据，大约每月发布一次抓取，每次通常包含 20 亿以上网页；其数据已被超过 12,000 篇研究论文引用。<sup>[2](https://www.commoncrawl.org/about)</sup> |
| 典型缩减比例 | 经过去重、质量过滤和毒性去除后，Common Crawl 数据通常缩减至原始规模的大约 1% 到 5%。<sup>[3](https://llmbook.icsgen-ai.org/part-2-understanding-llms/module-06-pretraining-scaling-laws/section-6.4.html)</sup> |
| 去重的效果 | 在使用 CCNet 流水线的研究中，对 Common Crawl 进行激进去重可将原始数据集规模缩减 70% 以上，同时提升下游模型质量。<sup>[4](https://www.turing.com/resources/data-collection-methods-and-tools-for-llms)</sup> |
| 对算力的依赖 | 独立于训练算力的过滤决策往往并非最优：整理良好的数据在重复使用时效用会下降，而在未过滤的 Common Crawl 上训练的模型，在重复 40 次以上后可超过在 LAION 数据集上训练的模型。<sup>[5](https://mlanthology.org/iclrw/2024/goyal2024iclrw-science/)</sup> |
| 仅凭网络数据即可 | RefinedWeb 数据集表明，仅经过适当过滤和去重的网络数据就能训练出强大的模型；其作者从 Common Crawl 中提取了 5 万亿 token。<sup>[6](https://arxiv.org/abs/2306.01116)</sup> |
| 供给上限 | Epoch AI 预测，可供 AI 语言模型使用的公开训练数据将在 2026 年至 2032 年间耗尽。<sup>[7](https://apnews.com/article/9676145bac0d30ecce1513c20561b87d)</sup> |
| 工作量占比 | 研究一致发现，AI 项目中高达 80% 的时间用于数据准备，而非模型训练或部署。<sup>[4](https://www.turing.com/resources/data-collection-methods-and-tools-for-llms)</sup> |

## 数据从何而来

大多数大规模整理都始于网络抓取数据。[Common Crawl](https://www.edgepedia.org/zh/common-crawl) 由 Gil Elbaz（吉尔·埃尔巴兹）于 2007 年创立，旨在让缺乏自有抓取基础设施的研究人员也能获得网络规模的抓取数据；自 2019 年 Google 基于单次 Common Crawl 快照构建的 Colossal Clean Crawled Corpus（C4）被用于训练 T5 模型系列以来，它一直是 LLM 预训练语料的支柱。<sup>[2](https://www.commoncrawl.org/about)</sup> 2020 年，OpenAI 的 GPT-3 论文报告其大部分训练 token 来自经过过滤的 Common Crawl 数据，使该数据集受到广泛关注。<sup>[2](https://www.commoncrawl.org/about)</sup> 2025 年的一项分析报告称，64% 的 LLM 是在 Common Crawl 数据上训练的。<sup>[2](https://www.commoncrawl.org/about)</sup>

爬虫本身也是整理问题的一部分。Common Crawl 的 CCBot 基于 Apache Nutch，遵守 robots.txt 指令并对发往单个服务器的请求限速，每个抓取周期处理约 30 亿个页面。<sup>[2](https://www.commoncrawl.org/about)</sup> 这种规模的抓取受 Common Crawl 基金会研究员 Pedro Ortiz Suarez（佩德罗·奥尔蒂斯·苏亚雷斯）所称的“一套不成文规则”约束：爬虫缓慢移动以免服务器过载，并尊重 robots.txt 的排除项；没有这些限制的大规模批量收集则被称为抓取（scraping）。<sup>[8](https://www.lemonde.fr/en/opinion/article/2026/06/16/why-ai-systems-which-rely-on-the-internet-poorly-reflect-the-diversity-of-human-knowledge_6754561_23.html)</sup>

## 整理流水线

一套完整的文本处理流水线包含六个大致阶段，NVIDIA 的 LLM 数据处理指南对此有描述。<sup>[9](https://developer.nvidia.com/blog/?p=91738)</sup>

1. **下载与提取。** 原始抓取数据以 .warc.gz 等压缩格式到达，必须转换为 .jsonl 或 .parquet 等易于管理的格式。<sup>[9](https://developer.nvidia.com/blog/?p=91738)</sup>
2. **初步清洗。** Unicode 修复纠正因编码错误产生的乱码字符序列（例如 “café” 显示为 “cafÃ©”），语言识别则按语言分离文档，这是必要前提，因为启发式过滤器和质量分类器都是针对特定语言的。<sup>[9](https://developer.nvidia.com/blog/?p=91738)</sup>
3. **启发式过滤。** 标准和自定义过滤器移除垃圾信息、关键词列表页面、机器生成的乱语以及大部分由符号构成的页面。<sup>[9](https://developer.nvidia.com/blog/?p=91738)</sup><sup> • </sup><sup>[10](https://learngenai.sunmintz.com/learn/pretraining/notes-03-data-curation-and-mixtures/)</sup>
4. **去重**，包括精确、模糊和语义层面，细至全语料库的段落级哈希。<sup>[9](https://developer.nvidia.com/blog/?p=91738)</sup>
5. **基于模型的质量过滤**，包括个人身份信息（PII）脱敏、任务去污染和分布式数据分类。<sup>[9](https://developer.nvidia.com/blog/?p=91738)</sup> 现代实践常用大型 LLM 作为评判者：FineWeb-Edu 使用 Llama 3 70B 按 0 到 5 分评估文档的教育价值，而 DCLM 则以指令风格数据作为正例训练了一个 fastText 分类器；无论哪种方式，整个语料库都会被打分并保留得分最高的部分。<sup>[10](https://learngenai.sunmintz.com/learn/pretraining/notes-03-data-curation-and-mixtures/)</sup>
6. **混合与打乱**，将来自多个来源的整理后数据集混合成统一的训练分布。<sup>[9](https://developer.nvidia.com/blog/?p=91738)</sup>

NVIDIA 的作者报告称，使用 [NeMo Curator](https://www.edgepedia.org/zh/nemo-curator) 处理一个越南语数据集使准确率提升了 10%，数据集规模缩减了 60%，训练速度提升至原来的三倍；在多节点 GPU 系统上，同样的工具将一位用户的处理时间从 3 周缩短到 2 天，总拥有成本降低了 50%。<sup>[9](https://developer.nvidia.com/blog/?p=91738)</sup>

## 整理为何重要

收益的规模与收益的存在同样重要。Common Crawl 语料库包含超过 2500 亿个网页，经过整理后缩减至原始规模的大约 1% 到 5%。<sup>[3](https://llmbook.icsgen-ai.org/part-2-understanding-llms/module-06-pretraining-scaling-laws/section-6.4.html)</sup> 即使经过这样的过滤，近似重复仍然存在：据估计，C4 语料库在 URL 级去重后仍含有 3% 到 7% 的近似重复文档。<sup>[3](https://llmbook.icsgen-ai.org/part-2-understanding-llms/module-06-pretraining-scaling-laws/section-6.4.html)</sup> NVIDIA 研究人员对完整预训练集构建流水线所做的消融研究发现，去重和质量过滤后模型准确率均有提升，而关于网络抓取快照的属性信息（毒性、质量、言语类型和领域）可用于进一步精炼预训练集。<sup>[1](https://aclanthology.org/2024.emnlp-main.596.pdf)</sup>

**整理可以替代精选来源。** RefinedWeb 团队表明，仅用经过重度过滤和去重的网络数据训练的模型就胜过了在 [The Pile](https://www.edgepedia.org/zh/the-pile)（一个混合书籍、社交媒体和论文的精选语料库）上训练的模型，并在此过程中从 Common Crawl 中提取了 5 万亿 token；他们公开发布了一个 6000 亿 token 的提取子集。<sup>[6](https://arxiv.org/abs/2306.01116)</sup> 这挑战了“必须将精选高质量语料库混入网络数据才能使模型具备泛化能力”的信念。<sup>[6](https://arxiv.org/abs/2306.01116)</sup>

**质量可以替代数量。** Google Ads 的一项主动学习整理流程在由成对人类专家评分的 250 到 450 个样本上训练分类器，其结果匹配或超过了在 100,000 个众包样本上训练的模型——在更大的 3.25B 参数模型上，模型与人类的对齐度提升了 55% 到 65%，而使用的数据量少了三个数量级。该团队观察到，成对 Cohen's Kappa 标签质量需高于 0.8 才能可靠地超越众包数据。<sup>[11](https://research.google/blog/achieving-10000x-training-data-reduction-with-high-fidelity-labels/)</sup>

## 整理与算力相互关联

过滤与模型训练时长相互作用。Goyal、Maini、Lipton、Raghunathan 和 Kolter 在 ICLR 2024 研讨会上展示的工作表明，整理良好的数据在重复使用时效用迅速下降，最终低于未见过的低质量数据的效用；在未过滤的 Common Crawl 上训练的模型，在重复 40 次以上后准确率高于在 LAION（仅保留约 10% 的抓取数据）上训练的模型。<sup>[5](https://mlanthology.org/iclrw/2024/goyal2024iclrw-science/)</sup> 他们提出了 FADU（Filter by Assessing Diminishing Utility，按效用递减评估过滤），针对特定算力预算整理数据池，并勾勒出整理选择的帕累托前沿。<sup>[5](https://mlanthology.org/iclrw/2024/goyal2024iclrw-science/)</sup> 教训在于：最优过滤器取决于训练预算——经过严格过滤的子集最适合短时间训练，但延长训练则倾向于不那么激进的过滤。<sup>[5](https://mlanthology.org/iclrw/2024/goyal2024iclrw-science/)</sup>

与此相关，一个活跃的研究方向是在训练过程中对数据重新加权，而非离线过滤。ADAPT 是一个动态在线框架，根据从相似度导出的质量信号，单独调整每个训练样本的学习率，保持样本数量不变，并实现了比离线整理方法更强的泛化能力。<sup>[12](https://arxiv.org/abs/2605.05227)</sup> 关于合成数据的工作同样主张，除逐样本效用估计外，还需考虑样本间交互的整理信号（组级信号）。<sup>[13](https://arxiv.org/abs/2610.00779)</sup>

## 网络规模整理的局限与批评

源自网络的训练语料库带有网络本身的偏见和缺口。《华盛顿邮报》对一份广泛使用的公开数据集的分析显示，某些文化、群体和主题被过度采样，而许多其他内容则被忽视，互联网文化的偏见和有毒内容也出现在训练数据中。<sup>[14](https://www.axios.com/2023/04/24/ai-chatgpt-blogs-web-writing-training-data)</sup> [互联网档案馆](https://www.edgepedia.org/zh/internet-archive)及其他机构的研究人员指出，从未被数字化的较旧来源在训练数据集中缺席，而未持续更新的数据集无法包含最新材料，因此部分信息丢失且无法从中恢复。<sup>[8](https://www.lemonde.fr/en/opinion/article/2026/06/16/why-ai-systems-which-rely-on-the-internet-poorly-reflect-the-diversity-of-human-knowledge_6754561_23.html)</sup>

整理选择也缺乏充分记录。一项对 2021 至 2023 年在 NeurIPS 数据集与基准赛道发表的 60 个数据集的研究，依据整理生命周期模型和 FAIR 数据原则评估了数据集开发实践，发现了在整理执行和报告方式上需要改进的方面。<sup>[15](https://arxiv.org/abs/2410.22473)</sup> 在临床和观察性研究中，通过 46 位专家参与的改良德尔菲流程制定的 DAQCORD 指南，规定了 46 项指标，用于记录设计、训练/测试、运行和采集后各阶段的数据整理，以回应整理的复杂性和工作量仍被严重低估的现状。<sup>[16](https://www.cambridge.org/core/journals/journal-of-clinical-and-translational-science/article/guidelines-for-data-acquisition-quality-and-curation-for-observational-research-designs-daqcord/3F04FB67C0A9635687C9F21C8209DBDF)</sup> 具体到机器学习领域，数据集质量综述围绕收集和标注阶段组织评估，使用选择偏差、数据重复率和标注准确率等指标来刻画数据集是否适合某项任务。<sup>[17](https://www.sciencedirect.com/science/article/pii/S0950584923001222)</sup>

## 数据供给与整理的未来

两大趋势正在重塑这一领域。第一，需求持续上升：斯坦福大学《2025 年 AI 指数报告》发现，训练 LLM 的数据集规模每八个月翻一番，而用于训练的计算量自 2010 年以来增长了约一百亿倍。<sup>[18](https://www.techradar.com/pro/ais-overlooked-storage-opportunity)</sup><sup> • </sup><sup>[19](https://epoch.ai/publications/compute-trends)</sup> 第二，供给是有限的。[Epoch AI](https://www.edgepedia.org/zh/epoch-ai) 预测科技公司将在 2026 年至 2032 年间耗尽公开的人类撰写训练数据，各公司已在签署协议以获取 Reddit 论坛和新闻媒体等来源。<sup>[7](https://apnews.com/article/9676145bac0d30ecce1513c20561b87d)</sup>

这种稀缺正推动整理走向新方向：使用 Nemotron-4 等 LLM 生成合成数据，通过生成、评判和过滤阶段为低资源语言和专业领域扩展训练数据。<sup>[9](https://developer.nvidia.com/blog/?p=91738)</sup> 它也提升了高保真标注和主动学习的价值，后者可将微调所需数据减少几个数量级。<sup>[11](https://research.google/blog/achieving-10000x-training-data-reduction-with-high-fidelity-labels/)</sup> 一个专业的数据精炼行业已经出现，包括 [Scale AI](https://www.edgepedia.org/zh/scale-ai)、Sama 和 [Labelbox](https://www.edgepedia.org/zh/labelbox) 等公司，旨在让不易获取的数据可用于训练。<sup>[20](https://time.com/7006382/ai-training-data-oil/)</sup>

## References

1. [Parmar et al. (2024). Data, Data Everywhere: A Guide for Pretraining Dataset Construction. EMNLP 2024.](https://aclanthology.org/2024.emnlp-main.596.pdf)
2. [About, Common Crawl](https://www.commoncrawl.org/about)
3. [Section 6.4: Data Curation at Scale, LLM training textbook](https://llmbook.icsgen-ai.org/part-2-understanding-llms/module-06-pretraining-scaling-laws/section-6.4.html)
4. [LLM Training Data Collection: Methods, Sources & Tools, Turing](https://www.turing.com/resources/data-collection-methods-and-tools-for-llms)
5. [Goyal et al. (2024). The Science of Data Filtering: Data Curation Cannot Be Compute Agnostic. ICLR 2024 Workshops.](https://mlanthology.org/iclrw/2024/goyal2024iclrw-science/)
6. [Penedo et al. (2023). The RefinedWeb Dataset for Falcon LLM. arXiv:2306.01116.](https://arxiv.org/abs/2306.01116)
7. [AI 'gold rush' for chatbot training data could run out of human-written text, AP News (2024)](https://apnews.com/article/9676145bac0d30ecce1513c20561b87d)
8. [Why AI systems, which rely on the internet, poorly reflect the diversity of human knowledge, Le Monde (2026)](https://www.lemonde.fr/en/opinion/article/2026/06/16/why-ai-systems-which-rely-on-the-internet-poorly-reflect-the-diversity-of-human-knowledge_6754561_23.html)
9. [Bleiweiss & Luo (2024). Mastering LLM Techniques: Text Data Processing. NVIDIA Technical Blog.](https://developer.nvidia.com/blog/?p=91738)
10. [Data Curation & Mixtures, Learn GenAI](https://learngenai.sunmintz.com/learn/pretraining/notes-03-data-curation-and-mixtures/)
11. [Krause & Chang. Achieving 10,000x training data reduction with high-fidelity labels. Google Research blog.](https://research.google/blog/achieving-10000x-training-data-reduction-with-high-fidelity-labels/)
12. [Rethinking Data Curation in LLM Training: Online Reweighting Offers Better Generalization than Offline Methods. arXiv:2605.05227.](https://arxiv.org/abs/2605.05227)
13. [Effective Synthetic Data Curation Requires Group-Level Signals. arXiv:2610.00779.](https://arxiv.org/abs/2610.00779)
14. [How we all became AI's brain donors, Axios (2023)](https://www.axios.com/2023/04/24/ai-chatgpt-blogs-web-writing-training-data)
15. [The State of Data Curation at NeurIPS: An Assessment of Dataset Development Practices in the Datasets and Benchmarks Track. arXiv:2410.22473.](https://arxiv.org/abs/2410.22473)
16. [Guidelines for Data Acquisition, Quality and Curation for Observational Research Designs (DAQCORD), Journal of Clinical and Translational Science](https://www.cambridge.org/core/journals/journal-of-clinical-and-translational-science/article/guidelines-for-data-acquisition-quality-and-curation-for-observational-research-designs-daqcord/3F04FB67C0A9635687C9F21C8209DBDF)
17. [A survey on dataset quality in machine learning, Information and Software Technology (2023)](https://www.sciencedirect.com/science/article/pii/S0950584923001222)
18. [AI's overlooked storage opportunity, TechRadar (2025)](https://www.techradar.com/pro/ais-overlooked-storage-opportunity)
19. [Sevilla et al. (2022). Compute Trends Across Three Eras of Machine Learning. Epoch AI.](https://epoch.ai/publications/compute-trends)
20. [Is AI About to Run Out of Data? The History of Oil Says No, TIME (2024)](https://time.com/7006382/ai-training-data-oil/)

---
*Initially written Oct 26, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Machine learning and neural computation

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/training-data-curation

English original: https://www.edgepedia.org/training-data-curation
