FAQ

Data strategy

Data quality versus quantity: the published evidence

Five published results at different scales, including the one that shows aggressive filtering can backfire.

This argument is usually conducted on intuition. It does not need to be: there are several well-documented results at different scales, and they agree on a nuanced answer rather than a slogan.

At instruction-tuning scale, quality wins decisively

LIMA is the sharpest result. A 65B base model fine-tuned on exactly 1,000 curated examples was judged equivalent or preferable to GPT-4 in 43% of comparisons, 58% against Bard and 65% against DaVinci003.

The ablations matter more than the headline. Doubling the Stack Exchange training set did not improve response quality. Using diverse sources did improve it significantly. Filtered versus unfiltered data from the same source produced a measurable difference. And adding just 30 multi-turn dialogue chains raised excellent responses from 45.2% to 76.1%.

The mechanism is that every instruction example is a demonstration of behaviour. Adding a good one helps; adding a bad one actively teaches something you do not want, and the good one does not cancel it. That asymmetry is why curation dominates at this stage.

Train on a quarter, a half and all of your data, then read the shape. It answers “how much data do I need” for your task rather than in general.

At pretraining scale, the filter is a bigger lever than the pool

DCLM ran the controlled version of this experiment: hold the data pool fixed, vary only the filter. At 7B scale, MMLU across filter choices ranged from 35% to 44%.

A Sankey diagram from DCLM-Pool (Common Crawl) on the left through heuristic cleaning (19.9% kept; English filter 50.8%, other filters 9.0%, page length 7.9%, repetition 9.6%, word removal 2.0%, URL 0.8% removed), deduplication (13.7% kept) and model-based filtering with a fastText filter, ending in DCLM-Baseline at 1.4%.
How DCLM-Baseline is cut from DCLM-Pool, a Common Crawl extraction: the English filter alone removes 50.8% of documents, the heuristic filters leave 19.9%, deduplication 13.7%, and a fastText quality classifier keeps 1.4% of the original documents. The authors find that last, model-based filter is the key step, so the same pool can yield very different training sets. Image: Figure 4 of the paper · CC BY 4.0 · from “DataComp-LM: In search of the next generation of training sets for language models”, arXiv:2406.11794
A line chart of MMLU accuracy (about 29 to 38%) against training tokens (0 to 360 billion) for FineWeb-Edu (orange), Matrix (blue) and FineWeb (pink). The orange line rises fastest and is annotated 'reaches 0.336 at 38B tokens'; the blue and pink lines climb slowly to about 34 and 33.
MMLU accuracy against training tokens for models trained on FineWeb-Edu, FineWeb and Matrix. FineWeb-Edu, the part of FineWeb kept by an educational-quality classifier, reaches 33.6% at 38 billion tokens; Matrix, the next best, needs about 300 billion to get there, and unfiltered FineWeb has not reached it at 350 billion. The filter, not the volume, sets the slope. Image: Figure 11 of the paper · CC BY 4.0 · from Penedo et al. 2024, “The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scale”, arXiv:2406.17557

Nine points of MMLU from the filter alone, with the same underlying data. Its resulting baseline — 3.8T tokens selected from a 240T-token pool — trained a 7B model to 64% MMLU, a 6.6 point improvement on the previous best open-data model with 40% less compute. At only 280B tokens it beat Llama 2 7B on MMLU by five points with roughly seven times less compute.

FineWeb-Edu is the same lesson by a different route. Scoring documents for educational quality and keeping only the top band removed 92% of FineWeb, leaving 1.3T tokens — and that remainder outperforms the full corpus on MMLU, ARC and OpenBookQA, matching the final MMLU of the Matrix corpus with almost ten times fewer tokens, per the paper. Worth knowing: the paper picked that threshold as a trade-off against HellaSwag, and the dataset card says stricter thresholds significantly degrade HellaSwag and PIQA, so it is not free.

A four-stage pipeline diagram lettered A to D: 'Choose scale' with a nested-squares icon for small, medium, large and xlarge; 'Select data' with CommonPool and external data-source cylinders feeding a candidate dataset via a dashed 'Filtering track' and a 'Bring your own data track'; 'Train' a CLIP model with fixed architecture and hyper-parameters; and 'Evaluate' on 38 zero-shot downstream tasks.
A benchmark that fixes the model and varies only the data selection. Holding architecture and hyperparameters constant is the only way to attribute a result to the dataset rather than to the run. Image: mlfoundations/datacomp · MIT repository

Deliberately written data beats scraped data

phi-1 pushed the quality argument furthest. A 1.3B-parameter model, slightly over 50 billion total tokens seen, trained on about 6B tokens of filtered code plus under 1B tokens of generated Python textbooks and around 180M tokens of generated exercises.

It reached 50.6% pass@1 on HumanEval and 55.5% on MBPP, trained in four days on eight A100s plus a further seven hours. Models orders of magnitude larger, trained on far more scraped code, did worse.

Two caveats to carry with that result. The paper releases the model but does not state that the training data was released, and omits the synthetic-generation details for proprietary reasons — so it is a finding rather than a recipe. And it reports the exercises component's size inconsistently across the paper.

The counter-result: filtering can go too far

Nemotron-CC is the finding that keeps this from being a slogan, and the one most worth knowing.

At a 1-trillion-token budget, its high-quality subset scores 59.0 MMLU against DCLM's 53.4 — aggressive filtering wins clearly. Trained for the same 1T tokens, its full 6.3-trillion-token dataset scores 53.0, roughly level with DCLM, but it contains four times as many unique real tokens as DCLM, which is what a long run needs.

The point is that heavy filtering leaves too few unique tokens to sustain a long run, so you begin repeating, and repetition has diminishing returns. For a long-horizon run you need unique tokens more than you need the highest-scoring ones.

Its solution was to filter less and generate more: it ensembled quality classifiers, stopped applying heuristic filters to high-quality documents, and added synthetic rephrasings, which make up 1.9T of its 6.3T tokens. The 15-trillion-token run reports an 8B model at 70.3 MMLU against Llama 3.1 8B's 65.3.

A diagram of three ways to fill a training run from a limited data budget. Repeating: the data-budget bar followed by two repeats of itself. Filling with Code: the data budget followed by a long bar of code data. Filtering: a long bar of raw data that, after 'Deduplicate / Perplexity-filter', becomes a shorter data budget repeated three more times.
Three ways to fill a training run when unique text runs short, from the data-constrained scaling study: repeat what you have, top it up with code, or filter first and repeat the smaller remainder more often. Filtering buys quality with repetition, which is the trade Nemotron-CC declined for its long-horizon runs. Image: huggingface/datablations · Apache-2.0 repository · from “Scaling Data-Constrained Language Models”, arXiv:2305.16264

The synthesis

Reading all five together gives a rule with a condition rather than a slogan.

  • Instruction tuning: quality dominates, almost without qualification. A thousand curated examples beats a hundred thousand scraped ones. Spend on review.
  • Short-horizon pretraining: filter aggressively. The filter is a larger lever than the pool size, worth up to nine MMLU points on identical data.
  • Long-horizon pretraining: you need unique tokens. Over-filtering becomes the bottleneck; generate or source more rather than tightening further.
  • Any stage: a bad example costs more than a good one gains, which is why deduplication and removing outright broken data are the cheapest wins available.

Questions people ask

What counts as a quality filter in practice?

At pretraining scale: language identification, deduplication, heuristic document filters (punctuation, line length, repetition), and increasingly a learned classifier scoring documents for usefulness — FineWeb-Edu's educational-quality scorer is the clearest published example. At instruction scale: deduplication, format validation, and human review.

Is deduplication part of quality?

It is the highest-value single step at every scale. Duplicates get overweighted, waste compute and inflate memorisation. Every major corpus does it — FineWeb uses MinHash per crawl dump, RedPajama-v2 flags exact duplicates with a Bloom filter, which cut its head and middle partitions by roughly 40%, and ships MinHash signatures so you can add fuzzy deduplication yourself.

Should I remove low-quality data or fix it?

Removing is cheaper and usually right. Fixing is worth it when the data is scarce and expensive — a domain where you have only a few thousand real examples. Nemotron-CC takes a third route at scale: rewriting low-quality documents with a model rather than discarding them.

How do I know whether my data is the problem?

Run the doubling experiment. If the evaluation metric improves when you double the dataset, quantity was binding. If it does not move, quantity is not your constraint and you should look at quality, task definition or the base model.

Stop hunting. Start searching.

Tens of thousands of curated datasets, searchable in plain language — with the licence and size checked before you download anything.

Search Dataset Finder →