Abstract
The training of large language models (LLMs) is expensive. In this paper, we study data-efficient approaches for pre-training LLMs, i.e., techniques that aim to optimize the Pareto frontier of model quality and training resource/data consumption. We seek to understand the tradeoffs associated with data selection routines based on (i) expensive-to-compute data-quality estimates, and (ii) maximization of coverage and diversity-based measures in the feature space. Our first technique, Ask-LLM, leverages the zero-shot reasoning capabilities of instruction-tuned LLMs to directly assess the quality of a training example. To target coverage, we propose Density sampling, which models the data distribution to select a diverse sample. In our comparison of 19 samplers, involving hundreds of evaluation tasks and pre-training runs, we find that Ask-LLM and Density are the best methods in their respective categories. Coverage sampling can recover the performance of the full data, while models trained on Ask-LLM data consistently outperform full-data training -- even when we reject 90% of the original dataset, while converging up to 70% faster.
Introduction
Training Large Language Models (LLMs) is notoriously expensive, both in terms of compute and the sheer volume of data required. While "scaling laws" suggest that more data leads to better models, we are hitting a point of diminishing returns. Simply scraping more of the internet often introduces "noise"—low-quality, repetitive, or non-informative text—that can actually hinder performance.
The core challenge is data curation: how do we decide which training examples are actually worth the electricity? Existing methods often rely on "perplexity filtering" (keeping text that a model finds predictable), but this can accidentally filter out rare but valuable "tail knowledge." This research explores whether we can use the reasoning capabilities of existing LLMs to curate better data for the next generation.
Methodology
The study compares 19 different sampling strategies, focusing on two novel approaches:
Ask-LLM (Quality-focused)
This technique leverages the zero-shot reasoning of an instruction-tuned model (like Flan-T5). For every potential training example, a proxy model is prompted to judge its informativeness for pre-training. The probability of the model answering "yes" becomes the quality score used for Top-K sampling.
Density (Coverage-focused)
Instead of looking at quality, this method aims for diversity. It embeds data into a latent feature space and uses kernel density estimation to identify "crowded" regions. It then uses Inverse Propensity Sampling to downsample redundant, high-density information and prioritize unique, under-represented topics.
Experimental Setup
Models were pre-trained on the C4 (Colossal Clean Crawled Corpus) dataset (184B tokens). Evaluation spanned 111 downstream tasks, including GLUE, SuperGLUE, and SQuAD. The study focused on T5-Small (60M) and T5-Large (800M) architectures to facilitate the hundreds of experimental runs needed to map the Pareto frontier.
Key Insights
- Reasoning vs. Heuristics: Perplexity filters often mistake "niche but high-quality" info for "nonsense." Ask-LLM succeeds because it can recognize context, such as identifying that a list of questions without answers is low-quality, whereas a standard perplexity filter might keep it due to its predictable language.
- The "Less is More" Result: Training on a carefully curated 10% of the data often resulted in a better model than training on 100% of the raw data.
- Small Proxies Work: High-quality scoring does not require massive models. Even a 60M parameter proxy model in the Ask-LLM pipeline outperformed most baseline curation methods.
- Quality vs. Coverage: Coverage-based sampling (Density) is most useful in the mid-data regime (25-50% retention), but Quality-based sampling (Ask-LLM) is superior when data efficiency is critical (keeping <10% of data).
Results
Ask-LLM demonstrates significant efficiency gains. A T5-Large model trained on Ask-LLM curated data reached the performance level of a full-data model up to 70% faster.
Furthermore, models trained on Ask-LLM data consistently outperformed full-data baselines across nearly all 111 tasks. On the "over-scaling" metric, Ask-LLM closed up to 33% of the gap to the next-largest model size. Notably, Ask-LLM scores showed almost zero correlation with perplexity scores, indicating that LLM-based reasoning captures a fundamentally different and more useful notion of quality.
Discussion and Future Work
While effective, Ask-LLM requires a forward pass of a proxy model for every example in the raw dataset. Although this cost is amortized over many training runs, it remains a significant upfront investment. There is also a philosophical risk: if models only select data that "looks like" what they already know, we might filter out the novelty needed for breakthroughs. Future work could explore combining Ask-LLM with advanced reasoning techniques like Chain-of-Thought prompting to further refine data selection.
Summary updated