# RedPajama

RedPajama 是 [Together AI](https://www.edgepedia.org/zh/together-ai) 发布的一对开放许可的大语言模型预训练语料库：RedPajama-V1 于 2023 年 4 月发布，是对 Meta 的 LLaMA 系列模型背后数据集配方的 1.2 万亿 token 复现；RedPajama-V2 于 2024 年发布，是仅含网页内容的语料库，从 84 个 [Common Crawl](https://www.edgepedia.org/zh/common-crawl) 快照中提取了超过 1000 亿份文档。<sup>[1](https://arxiv.org/html/2411.12372v1)</sup><sup> • </sup><sup>[2](https://www.together.ai/blog/redpajama)</sup> 该项目最初是对一个实际问题的净室回应：LLaMA 及其微调衍生模型（Alpaca、Vicuna、Koala）被限制为非商业研究用途，因此没有人能够合法地基于该数据混合构建商业产品。Together AI 宣称的目标是提供一个完全开放、可用于商业应用的复现版本。<sup>[2](https://www.together.ai/blog/redpajama)</sup> 其方法论和对比分析后来在 NeurIPS 2024 数据集与基准赛道中通过了同行评审。<sup>[3](https://proceedings.neurips.cc/paper_files/paper/2024/file/d34497330b1fd6530f7afd86d0df9f76-Paper-Datasets_and_Benchmarks_Track.pdf)</sup>

| 事实 | 数值 |
|---|---|
| RedPajama-V1 规模 | 约 1.2T token，七个来源，压缩后约 3TB / 解压后约 5TB，2023 年 4 月发布<sup>[2](https://www.together.ai/blog/redpajama)</sup> |
| V1 最大切片 | CommonCrawl，1.2T token 中占 878B<sup>[2](https://www.together.ai/blog/redpajama)</sup> |
| RedPajama-V2 规模 | 来自 84 个 Common Crawl 快照（2014–2023）的 100B+ 文档，五种语言；论文对比表中为 270TB<sup>[1](https://arxiv.org/html/2411.12372v1)</sup><sup> • </sup><sup>[4](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-V2)</sup> |
| V2 去重后 head_middle 部分 | 20.8B 文档 / 30.4T token，其中英语为 14.5B 文档 / 20.5T token<sup>[4](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-V2)</sup> |
| 质量信号 | 针对 50T token 子集（30B 文档）发布；原始数据刻意未去重<sup>[1](https://arxiv.org/html/2411.12372v1)</sup><sup> • </sup><sup>[5](https://www.together.ai/blog/redpajama-v2-faq)</sup> |
| 许可 | 处理代码采用 Apache 2.0；数据受 Common Crawl 基金会使用条款约束<sup>[4](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-V2)</sup> |
| 基于其训练的模型 | RedPajama-INCITE、OpenELM、OLMo、Snowflake Arctic<sup>[1](https://arxiv.org/html/2411.12372v1)</sup> |

## 内容与构成

**RedPajama-V1** 复现了 Meta 为 LLaMA 描述的七源混合配方。发布时各切片的 token 数为：CommonCrawl 878B、C4 175B、GitHub 59B、Books 26B、[ArXiv](https://www.edgepedia.org/zh/arxiv) 28B、[Wikipedia](https://www.edgepedia.org/zh/wikipedia) 24B、StackExchange 20B，合计 1.2T token。<sup>[2](https://www.together.ai/blog/redpajama)</sup> Together 调整了每个切片的质量过滤器，使其接近 Meta 报告的数量：CommonCrawl 878B 对 Meta 的 852B，C4 175B 对 190B，GitHub 59B 对 100B，Books 26B 对 25B，ArXiv 28B 对 33B，Wikipedia 24B 对 25B，StackExchange 20B 对 27B，总计 1.2T 对 Meta 的 1.25T。<sup>[2](https://www.together.ai/blog/redpajama)</sup>

**RedPajama-V2** 仅含网页内容，规模大得多。它包含来自 84 个 Common Crawl 快照的超过 100B 文本文档，时间跨度为 2014 年至 2023 年，涵盖五种语言：英语、法语、西班牙语、德语和意大利语。<sup>[1](https://arxiv.org/html/2411.12372v1)</sup> 其中 30B 文档带有质量信号，重复 ID 支持一个 20B 文档的去重集合。<sup>[4](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-V2)</sup> 去重后的 head_middle 部分——即大多数用户会用于训练的部分——按语言分解为：英语 14.5B 文档 / 20.5T token，德语 1.9B / 3.0T，西班牙语 1.8B / 2.8T，法语 1.6B / 2.7T，意大利语 0.9B / 1.5T，合计 20.8B 文档 / 30.4T token。<sup>[4](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-V2)</sup> 包含尾部在内的完整去重语料库更大，为 32.9B 文档 / 50.6T token。<sup>[4](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-V2)</sup>

## 构建与策展方式

对于 V1，Together 使用开放工具遵循了 LLaMA 论文的配方。CommonCrawl 切片使用了五个 Common Crawl 转储，通过官方 cc_net 流水线处理，随后进行段落级去重，并使用一个训练用于区分 Wikipedia 参考段落与随机 Common Crawl 样本的线性分类器进行过滤。<sup>[6](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T)</sup> GitHub 数据来自 Google BigQuery，在文件级别去重，仅保留 MIT、BSD 或 Apache 许可的项目。<sup>[6](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T)</sup> 所有预处理和质量过滤器均发布在 GitHub 上，以便任何人复现该数据集。<sup>[2](https://www.together.ai/blog/redpajama)</sup>

这次复现明确是尽力而为的。同行评审论文记录了 LLaMA 技术报告中数据集描述的缺口和模糊之处，并列出了重建过程中遇到的不确定性；确切的过滤阈值和某些按来源的处理细节仍属推测，这就是为什么各切片计数只能近似于 Meta 的数值。<sup>[1](https://arxiv.org/html/2411.12372v1)</sup>

V2 采取了不同的策展理念。文档使用 CCNet 流水线处理，但原始数据集刻意不去重；相反，Together 将去重作为信号提供，通过对原始 .wet 文档哈希的 Bloomfilter 实现精确重复检测，以及预计算的 minhash 签名实现不同相似度级别的模糊去重。<sup>[5](https://www.together.ai/blog/redpajama-v2-faq)</sup> 其陈述的理由是，最优过滤取决于预期用途，因此 V2 是一个高召回池，从业者利用附带的质量信号从中构建自定义混合，而非一个可直接训练的数据集。<sup>[5](https://www.together.ai/blog/redpajama-v2-faq)</sup> 论文包含消融研究，表明这些质量信号支持不同质量的子集及相应的模型性能。<sup>[1](https://arxiv.org/html/2411.12372v1)</sup>

## SlimPajama 及其衍生

[SlimPajama](https://www.edgepedia.org/zh/slimpajama) 是 RedPajama-V1 的清洗和去重版本，在论文对比表中大小为 0.9TB，而 V1 为 3.0TB。<sup>[1](https://arxiv.org/html/2411.12372v1)</sup> Zyda 是在包括 SlimPajama 在内的开放数据集基础上进一步精炼的成果。<sup>[3](https://proceedings.neurips.cc/paper_files/paper/2024/file/d34497330b1fd6530f7afd86d0df9f76-Paper-Datasets_and_Benchmarks_Track.pdf)</sup> 本文可获得的来源未记录 SlimPajama 的构建者、其去重率，或除整体规模缩减外去重具体移除了什么。

## 许可与来源

处理代码采用 Apache 2.0 许可，数据本身则请用户参阅 Common Crawl 基金会使用条款。<sup>[4](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-V2)</sup> GitHub 仓库带有 Apache 2.0 许可，附有 2023 年 Together Computer 版权声明。<sup>[7](https://github.com/togethercomputer/redpajama-data)</sup> 这种许可姿态正是项目的创立动机：由于 LLaMA 的数据和权重被限制为非商业研究用途，RedPajama 的构建旨在为商业用户提供等效的混合数据。<sup>[2](https://www.together.ai/blog/redpajama)</sup> 在 V1 内部，GitHub 切片附加了自身的来源约束，仅限于 MIT、BSD 或 Apache 许可的项目。<sup>[6](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T)</sup> 所保留的来源未记录这些要点之外的按来源溯源信息，也未涉及退出机制或网页抓取部分的法律风险；读者应将这些视为未决问题而非已有定论。

## 在具名模型中的使用及实测结果

RedPajama 数据已为多个开源大语言模型提供了预训练数据，包括 [OpenELM](https://www.edgepedia.org/zh/openelm)、OLMo、Snowflake 的 Arctic，以及 Together 自家的 RedPajama-INCITE 系列。<sup>[1](https://arxiv.org/html/2411.12372v1)</sup> 根据 Together 自身的报告，在用 800B token 训练 RedPajama-Base-INCITE-3B 后，其在 HELM classic 上以 3–5 分的优势超越了同等规模的开放模型（GPT-Neo 和 Pythia-2.8B），在 Eleuther AI 的 LM 评估工具部分任务上以 2–7 分的优势领先。<sup>[1](https://arxiv.org/html/2411.12372v1)</sup> 这些是厂商报告的数字；所保留的来源未包含对早期 INCITE 基准声明的独立验证。

V2 的采用率，同样据 Together 报告，在 2024 年每月下载量超过 20,000 次，Snowflake 的 Arctic 被引为基于该语料库训练的模型。<sup>[5](https://www.together.ai/blog/redpajama-v2-faq)</sup>

## 与其他开放语料库的对比

同行评审论文的对比表列出了主要开放语料库的规模如下：DCLM-Pool 340.0TB、RedPajama-V2 270.0TB、FineWeb 93.4TB、[mC4](https://www.edgepedia.org/zh/mc4) 9.7TB、FineWeb-EDU 8.8TB、Dolma v1.7 4.5TB、ROOTS 1.6TB、[RefinedWeb](https://www.edgepedia.org/zh/refinedweb) 2.8TB（开放子集）、SlimPajama 0.9TB、[The Pile](https://www.edgepedia.org/zh/the-pile) 0.8TB、C4 0.3TB、RedPajama-V1 3.0TB。<sup>[1](https://arxiv.org/html/2411.12372v1)</sup> 在透明度和多功能性标志上，RedPajama-V2 是列表中唯一一个开放获取、开放代码、原始数据发布和多语言覆盖全部勾选的语料库；FineWeb、C4、DCLM 基线、RefinedWeb 和 The Pile 缺少原始数据发布，而 Dolma、SlimPajama 和 ROOTS 缺少多语言覆盖。<sup>[1](https://arxiv.org/html/2411.12372v1)</sup> 所保留的来源未提供的是下游表现的直接对比：本证据集中没有独立研究在 RedPajama 与 FineWeb、Dolma、DCLM 或 RefinedWeb 上分别训练模型并报告基准差异，因此无法从这些来源得出关于哪个语料库能产生更好模型的结论。

## References

1. RedPajama: an Open Dataset for Training Large Language Models (arXiv, November 2024; NeurIPS 2024 Datasets and Benchmarks Track). https://arxiv.org/html/2411.12372v1
2. RedPajama: an Open Dataset for Training Large Language Models (Together AI launch post, April 2023). https://www.together.ai/blog/redpajama
3. RedPajama paper, NeurIPS 2024 Datasets and Benchmarks Track (proceedings). https://proceedings.neurips.cc/paper_files/paper/2024/file/d34497330b1fd6530f7afd86d0df9f76-Paper-Datasets_and_Benchmarks_Track.pdf
4. togethercomputer/RedPajama-Data-V2 dataset card (Hugging Face). https://huggingface.co/datasets/togethercomputer/RedPajama-Data-V2
5. RedPajama-V2 FAQ (Together AI). https://www.together.ai/blog/redpajama-v2-faq
6. togethercomputer/RedPajama-Data-1T dataset card (Hugging Face). https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T
7. togethercomputer/redpajama-data (GitHub). https://github.com/togethercomputer/redpajama-data

---
*Initially written Sep 17, 2026 · Edited: Oct 11, 2026; Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 现代人工智能：基础模型、生成式人工智能与人工智能产业 › Foundation-model methods and training › Pretraining data and corpora

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/redpajama

English original: https://www.edgepedia.org/redpajama
