NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

The Pile: An 800GB Dataset of Diverse Text for Language Modeling

Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe, Charles Foster, Jason Phang, Horace He, Anish Thite, Noa Nabeshima, Shawn Presser, Connor LeahyarXiv 2021

Abstract

EleutherAI introduces The Pile, a massive 825 GiB English text dataset specifically engineered to improve the diversity and cross-domain generalization of large language models (LLMs). By combining 22 high-quality subsets—ranging from academic journals to source code—The Pile provides a more rigorous training ground and benchmark than traditional, noisy web-crawled datasets.

Introduction

As language models scale, their "hunger" for data has led researchers to rely heavily on the Common Crawl, a massive but often low-quality scrape of the entire internet. While the scale is impressive, web-crawled data is often repetitive, noisy, and lacks depth in specialized fields like medicine, law, or mathematics.

Dataset diversity is just as critical as raw size. Models trained primarily on general web text often struggle to generalize to "out-of-distribution" tasks, such as technical writing or logical reasoning. There is a clear need for a curated, high-quality, and diverse corpus that could push LLMs beyond simple mimicry of internet prose.

Methodology

The construction of The Pile involved a "mixture of experts" approach to data curation. Instead of a single scrape, the team aggregated 22 distinct subsets. Key methodological choices include:

  • Weighted Sampling: The authors assigned weights to different subsets based on perceived quality. High-quality sources like Wikipedia were up-sampled (seen up to 3 times during training), while others were down-sampled.
  • Pile-CC: A custom pipeline using the jusText algorithm was developed to extract higher-quality text from Common Crawl compared to standard un-filtered versions.
  • Evaluation Proxy: To validate the dataset without the massive cost of training a GPT-3 from scratch, the authors trained a 1.3-billion parameter model on The Pile and compared it against models trained on other standard datasets.
  • Documentation and Ethics: Following the "Datasheets for Datasets" framework, the authors performed deep dives into the topical distribution, sentiment, and biases (gender, religion, race) present in the data.

Dataset Composition

The Pile consists of 825.18 GiB of raw text across several categories, including academic journals, books, and code. The authors found an "Academic Gap" where existing models like GPT-3 perform significantly worse on technical components than on general web text, suggesting LLMs are under-trained on specialized human knowledge.

Detailed breakdown of the 22 components comprising The Pile, showing raw size, sampling weights, and effective training size.

Including GitHub data helps models develop better reasoning capabilities that translate back into natural language tasks. The authors also released the code used to construct these subsets, allowing for reproduction and modification of the mixture.

Key Results

Models trained on The Pile significantly outperformed those trained on raw Common Crawl or CC-100 across all 22 components. Even though GPT-2 and GPT-3 were not trained on The Pile, they showed a clear "scaling law" on it—larger models consistently had lower perplexity, confirming The Pile's utility as a broad-coverage benchmark.

Zero-shot scaling law for GPT-2 and GPT-3 models evaluated on The Pile, demonstrating consistent performance gains with model size.

After accounting for weighted sampling, the "effective size" of The Pile for training purposes is roughly 1.25 TB, providing a substantial and diverse foundation for future LLM development.

Discussion and Limitations

While The Pile sets a new standard, it has limitations. The current version is 97.4% English, highlighting the need for a "Multilingual Pile." Despite curation, the dataset contains inherent human biases; cleaning these entirely remains an open research problem. Additionally, due to memory constraints, global cross-subset deduplication was not performed, potentially leading to minor data leakage. Finally, the use of certain datasets involves complex ethical considerations regarding authorial consent.

Summary updated

BibTeX
@misc{gao2021pile,
  author = {Leo Gao and Stella Biderman and Sid Black and Laurence Golding and Travis Hoppe and Charles Foster and Jason Phang and Horace He and Anish Thite and Noa Nabeshima and Shawn Presser and Connor Leahy},
  title = {{The Pile: An 800GB Dataset of Diverse Text for Language Modeling}},
  year = {2021},
  eprint = {2101.00027},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2101.00027},
}
Figure