Improving Pretraining Data Using Perplexity Correlations

Tristan Thrush, Christopher Potts, Tatsunori Hashimoto
9/9/2024
cs.CLcs.LGstat.ML

Official code: TristanThrush/perplexity-correlations (31 stars, MIT, last commit 2025-06-09).

Abstract

Quality pretraining data is often seen as the key to high-performance language models. However, progress in understanding pretraining data has been slow due to the costly pretraining runs required for data selection experiments. We present a framework that avoids these costs and selects high-quality pretraining data without any LLM training of our own. Our work is based on a simple observation: LLM losses on many pretraining texts are correlated with downstream benchmark performance, and selecting high-correlation documents is an effective pretraining data selection method. We build a new statistical framework for data selection centered around estimates of perplexity-benchmark correlations and perform data selection using a sample of 90 LLMs taken from the Open LLM Leaderboard on texts from tens of thousands of web domains. In controlled pretraining experiments at the 160M parameter scale on 8 benchmarks, our approach outperforms DSIR on every benchmark, while matching the best data selector found in DataComp-LM, a hand-engineered bigram classifier. We have now also updated this paper to include results from preregistered experiments with new pretraining data on an aggregation of 22 benchmarks up to the 1.4B scale, showing increasing improvements of our method over others with more scale. A pip package with full documentation can be found here: https://github.com/TristanThrush/perplexity-correlations.

View on arXivView PDF

Code Implementations(1)

MIT

Simple and scalable tools for data-driven pretraining data selection.

312PythonSep 16, 20241 years agoMIT

Similar Papers

Cite this paper

@article{thrush2024improving,
  title  = {Improving Pretraining Data Using Perplexity Correlations},
  author = {Tristan Thrush and Christopher Potts and Tatsunori Hashimoto},
  year   = {2024},
  eprint = {2409.05816},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.05816v2},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.05816.svg)](https://codeofpaper.com/paper/2409.05816)

Discussion