﻿# RedPajama Data v1: reconstruct a source mixture with provenance

Reconstruct RedPajama v1 as a source mixture, preserve subset metadata, and account for the book configuration that is no longer available.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/data-guide-redpajama-v1-source-mixture/
Language: en

## Identify the historical mixture

RedPajama Data v1 is useful for studying how a heterogeneous pretraining recipe was assembled from web text, code, reference material and scientific documents. The [RedPajama paper](https://arxiv.org/abs/2411.12372) distinguishes this reproduction-oriented release from the later web-only release. Reproducing the recipe means specifying its source composition and processing, rather than assuming that any archive carrying the family name contains identical examples.

## Use the matching code branch

The [rp_v1 branch](https://github.com/togethercomputer/RedPajama-Data/tree/rp_v1) contains the original preparation code, tokenization example and source table. The repository default branch now describes a different release. Pin the historical branch to a commit in an experiment record. Its example tokenizer is GPT-NeoX; source weights calculated with another tokenizer need to be recalculated before comparing token exposure. Document counts alone cannot reconstruct weights when source document lengths differ substantially.

## Preserve subset-specific metadata

The [owner card](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T) describes records containing text, meta and red_pajama_subset. The nested metadata can include URL, timestamp, source and language, but should not be treated as a universal complete schema for every component. Retain the subset identifier when packing text. It enables source-level loss inspection and makes an unexpectedly dominant component visible after filtering, rather than only before it.

## Explain processing differences

The preparation recipe handles components differently: web paragraphs, repository files, scientific source and question-answer material do not share one natural document boundary. In a proposed source-mixture ablation, freeze each component's processed inventory before changing sampling weights. Group related files or posts appropriately for a held-out partition, using the [document split guide](/journal/document-level-data-split-leakage/). A random split of final packed sequences would obscure shared upstream documents and prevent a clear component comparison.

## Account for unavailable components

The current card marks the book configuration as defunct following a reported copyright issue. The historical source table therefore does not describe an automatically obtainable present-day package. State which components were actually available and which were omitted; do not silently redistribute missing weight across the others and call it the same mixture. Source terms also remain component-specific. The [provenance guide](/journal/document-markdown-json-provenance/) helps preserve those distinctions through conversion. This corpus is a pretraining supply, not a labeled downstream test with an independent ground-truth answer field.
