Datasets, Documents, and Repetitions: The Practicalities of Unequal Data Quality

Alex Fang, Hadi Pouransari, Matt Jordan, Alexander Toshev, Vaishaal Shankar, Ludwig Schmidt, Tom Gunter · OpenReview

Abstract

Data filtering has become a powerful tool for improving model performance while reducing computational cost. However, as large language model compute budgets continue to grow, the limited data volume provided by heavily filtered and deduplicated datasets will become a practical constraint. In efforts to better understand how to proceed, we study model performance at various compute budgets and across multiple pre-training datasets created through data filtering and deduplication. We find that, given appropriate modifications to the training recipe, repeating existing aggressively filtered datasets for up to ten epochs can outperform training on the ten times larger superset for a single epoch across multiple compute budget orders of magnitude. While this finding relies on repeating the dataset for many epochs, we also investigate repeats within these datasets at the document level. We find that not all documents within a dataset are equal, and we can create better datasets relative to a token budget by explicitly manipulating the counts of individual documents. We conclude by arguing that even as large language models scale, data filtering remains an important direction of research.

Introduction

As Large Language Models (LLMs) continue to scale, researchers are increasingly encountering a "data wall." High-quality, human-generated text is a finite resource, and the standard recipe of simply increasing data volume alongside compute is reaching its practical limits. Aggressive data filtering has emerged as a solution to improve model performance, but it creates a new problem: it drastically shrinks the available pool of tokens. This research investigates whether we can overcome data scarcity by prioritizing quality over quantity through strategic data repetition and document-level manipulation.

The Repetition Trade-off: Quality vs. Scale

The central question addressed is whether a smaller, high-quality dataset can outperform a much larger, lower-quality one if the model is allowed to see the high-quality data multiple times.

Comparing DCLM-baseline (an aggressively filtered dataset representing the top 10% of RefinedWeb) against its parent, RefinedWeb (RW v2), the researchers found a striking result: repeating the filtered dataset for up to 10 epochs consistently outperformed a single epoch of the 10x larger superset. This suggests that the "data wall" may be less of a barrier if we refine our approach to data reuse. The benefits of this repetition are most pronounced when the "tokens-per-parameter" ratio is high, effectively "overtraining" the model relative to traditional Chinchilla-optimal points to achieve superior performance.

The "Secret Sauce": Scaling Weight Decay

Multi-epoch training typically leads to rapid overfitting and diminishing returns. However, this study identifies a critical adjustment to the training recipe: weight decay scaling.

To prevent performance degradation during repetition, the authors suggest a heuristic of scaling weight decay by approximately the square root of the number of repeats. This increased regularization acts as a dampener on overfitting, allowing the model to continue learning meaningful patterns from the same data over multiple passes. For a 12.6B parameter model trained on 252B tokens, this approach allowed 10 epochs of DCLM-baseline to achieve significantly higher accuracy than a single epoch of the much larger RefinedWeb.

Beyond Deduplication: Unequal Document Value

Standard pre-processing often treats deduplication as a binary choice: a document is either kept once or discarded. This research challenges that assumption, arguing that not all documents are created equal.

By analyzing document quality (using FastText classifiers) and natural duplication counts, the authors found that documents that appear more frequently in the wild often contain higher-quality signals. Instead of uniform deduplication, they experimented with "count manipulation"—resampling documents based on their perceived value.

Strategies tested included:

  • Greedy: Retaining only the highest-scoring documents.
  • Linear: Increasing the frequency of high-quality documents while maintaining diversity by keeping some lower-quality ones.
  • Ensemble: Combining quality scores and duplication counts to determine frequency.

This ensemble strategy improved the DCLM "centered core metric" (an average of 22 diverse tasks) from 44.4 to 46.1, proving that seeing the "best" documents more often is more beneficial than seeing a wider variety of mediocre data.

Conclusion and Future Directions

The study demonstrates that data filtering and strategic repetition are essential tools for the next generation of LLMs. By focusing on high-signal data and adjusting regularization techniques like weight decay, researchers can push model performance further even as unique data becomes scarce.

While these trends hold up to the 12.6B parameter scale, future work is needed to confirm if these findings persist at the 100B+ parameter scale of frontier models. Additionally, the "repeatability" of data may vary across domains such as mathematics or code, suggesting that future data pipelines may require domain-specific curriculum learning to maximize the utility of every available token.

Summary updated

BibTeX
@inproceedings{fang2025datasets,
  author = {Alex Fang and Hadi Pouransari and Matt Jordan and Alexander Toshev and Vaishaal Shankar and Ludwig Schmidt and Tom Gunter},
  title = {{Datasets, Documents, and Repetitions: The Practicalities of Unequal Data Quality}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=zZecO3RZ7Z},
}
Figure