RedPajama is an open-source initiative that builds and publishes pretraining corpora for large language models, together with models trained on them. In the domain of training data for artificial intelligence, it is best known for RedPajama-Data-1T, a reproduction of the data recipe described for the original LLaMA models, and for RedPajama-Data-V2, a much larger web corpus shipped with precomputed quality signals instead of a single fixed filter.
The project was launched in April 2023 by Together AI with academic and nonprofit partners, including Ontocord.ai, ETH DS3Lab, Stanford CRFM, Hazy Research and MILA. Its central goal was reproducibility: a corpus whose sources, processing scripts and composition are fully documented, so that researchers can study how data choices shape model behavior.
How RedPajama-Data-1T reproduces a known recipe
RedPajama-Data-1T recreates the mixture of seven source slices that the LLaMA paper reported, reaching roughly 1.2 trillion tokens in total. Each slice was collected and cleaned with open scripts, so anyone can rebuild the corpus or swap one component for another.
The table below lists the approximate token counts per slice, which show that filtered web text dominates the mixture while curated sources add specialized knowledge.
| Slice | Approximate tokens | Main processing |
|---|---|---|
| CommonCrawl | 878 billion | CCNet pipeline, quality classifier |
| C4 | 175 billion | Standard C4 cleaning rules |
| GitHub | 59 billion | License filter, file-level deduplication |
| Books | 26 billion | Public-domain books, near-duplicate removal |
| arXiv | 28 billion | LaTeX cleanup, preamble removal |
| Wikipedia | 24 billion | Twenty languages, boilerplate removal |
| StackExchange | 20 billion | Top sites, question and answer pairs |
The web portion was processed with CCNet, which splits pages by language, removes duplicate paragraphs and scores text by perplexity under a reference language model. A linear classifier then kept pages that resembled Wikipedia-referenced content, which approximates the quality filtering used for LLaMA.
RedPajama-Data-V2 and its quality signals
RedPajama-Data-V2, released in October 2023, takes a different approach: it ships raw-but-annotated web data and leaves the final filtering decision to the user. It covers 84 CommonCrawl snapshots and five languages, namely English, French, German, Spanish and Italian, with over 100 billion documents.
After exact and fuzzy deduplication, the released head and middle partitions hold roughly 30 trillion tokens. Every document carries more than 40 quality annotations, such as perplexity scores, word counts, repetition ratios, rule-based heuristics from C4 and Gopher, and classifier scores, plus MinHash signatures for further near-duplicate removal.
The following table groups these signals by purpose, which helps when designing a custom filtering recipe.
| Signal family | Examples | Typical use |
|---|---|---|
| Natural language heuristics | Word count, mean word length, punctuation ratio | Remove fragments and lists |
| Repetition measures | Duplicate n-gram fractions, repeated lines | Drop spam and templated pages |
| Model-based scores | CCNet perplexity, fastText classifiers | Favor well-formed prose |
| Toxicity and content flags | Word-list matches, URL blocklists | Reduce harmful content |
| Deduplication data | MinHash signatures, exact hashes | Fuzzy deduplication at chosen thresholds |
How RedPajama compares with other open corpora
RedPajama belongs to a family of open pretraining corpora that differ mainly in scale, source mix and how much filtering is applied before release. Choosing among them is a question of whether a team wants a ready-made mixture or raw material for its own curation.
| Corpus | Approximate scale | Distinguishing feature |
|---|---|---|
| RedPajama-Data-1T | 1.2 trillion tokens | Reproduction of a published mixture |
| RedPajama-Data-V2 | 30 trillion deduplicated tokens | Annotated web data, filtering left to users |
| The Pile | About 300 billion tokens | Twenty-two curated, diverse sources |
| C4 | About 156 billion tokens | Single cleaned CommonCrawl snapshot |
| Dolma | About 3 trillion tokens | Documented mixture with open tooling |
| FineWeb | About 15 trillion tokens | Heavily ablated web filtering pipeline |
Unlike FineWeb, which publishes one filtered result chosen through ablation experiments, RedPajama-Data-V2 publishes the signals behind such decisions. This makes it suitable for data-centric research, although it requires more engineering effort before training.
Models and practical use
The project also trained the RedPajama-INCITE models with 3 billion and 7 billion parameters, using compute from the INCITE program on the Summit supercomputer. These base, instruction-tuned and chat variants served mainly as evidence that the corpus works rather than as state-of-the-art systems.
In practice, teams use RedPajama in several ways, summarized in the decision table below. The key choice is how much curation work the team is prepared to do itself.
| Situation | Recommended choice | Reason |
|---|---|---|
| Replicating a baseline | RedPajama-Data-1T | Fixed, documented mixture |
| Studying filtering effects | RedPajama-Data-V2 with signals | Filters can be varied cheaply |
| Multilingual European model | RedPajama-Data-V2 language subsets | Five languages with consistent processing |
| Small experiments | Sampled subsets of either release | Full corpora need petabyte-scale storage |
Limitations and common misconceptions
RedPajama is open but not free of legal and quality risks. Its contents come from public sources, yet the individual documents keep their original copyrights and licenses, so training data licensing must still be assessed for each use.
- A reproduction is not the original: RedPajama-Data-1T follows the published recipe, but the exact LLaMA data were never released, so results can differ.
- Unfiltered does not mean unusable: the V2 head and middle partitions are deduplicated, yet they still need user-defined quality filters.
- Signals are not ground truth: perplexity and classifier scores encode the biases of their reference models and can remove dialects or niche topics.
- Benchmark contamination is possible: web snapshots may contain test sets, so decontamination checks remain the responsibility of the model builder.
- The Books slice changed over time: a portion was withdrawn after copyright concerns, so versions of the corpus are not identical.
Stripped to the essentials
Language models learn by reading huge amounts of text. RedPajama is a giant, openly shared library of such text. Anyone can download it and see exactly what went in.
The first version copied a known recipe of text sources. The second version is much larger. It labels each page with quality notes, so each team can decide what to keep. Think of it as a market that sells ingredients with nutrition labels instead of a finished meal.
Where it is applied
A university research group wants to know whether stricter web filtering improves a small language model. It downloads a sample of about 100 billion English tokens from RedPajama-Data-V2, including the quality signals and MinHash signatures, instead of crawling the web itself.
The group builds three subsets: one with only fuzzy deduplication, one that also applies Gopher-style heuristic rules, and one that keeps only documents with low perplexity scores. It then trains three 1-billion-parameter models on 50 billion tokens each and evaluates them on reading comprehension and commonsense benchmarks.
Because every filter is a simple threshold on precomputed signals, the group prepares all three subsets in days rather than weeks. The heuristic subset gives the best average benchmark score, and the team publishes its thresholds so that others can reproduce the result exactly.