Introduction
The performance of Large Language Models (LLMs) is fundamentally tied to the quality of their pre-training data. While massive web-scale datasets like Common Crawl provide the necessary volume, they are often riddled with noise, low-quality content, and non-educational material. Current state-of-the-art approaches rely on "model-driven data filtering," where a classifier is trained to identify high-quality samples. However, this process faces two critical challenges: the prohibitive computational cost of verifying data quality and the inherent subjectivity in selecting the "seed" data used to train these classifiers.
In this work, we present Ultra-FineWeb, a pipeline designed to optimize data curation through an efficient verification strategy and objective seed selection. By drastically reducing the cost of iterative experimentation, we produced a 1.1-trillion token dataset that outperforms existing benchmarks like FineWeb and FineWeb-edu.
The Challenge of Data Verification
Traditionally, verifying the quality of a filtered dataset requires training an LLM from scratch—often on 100 billion tokens or more—and evaluating its performance on downstream benchmarks. This process is extremely resource-intensive, typically costing upwards of 1,200 H100 GPU hours per experiment. Such high costs prevent researchers from performing the rapid iterations necessary to fine-tune data selection criteria.
Furthermore, the "seeds" used to train data classifiers are often chosen based on human intuition or LLM-as-a-judge annotations. These methods are prone to bias; for instance, LLMs often prefer longer texts regardless of actual information density, leading to suboptimal filtering.
The Ultra-FineWeb Methodology
To address these bottlenecks, we propose a three-part pipeline that replaces subjective intuition with empirical verification.
1. Efficient Verification Strategy
Instead of training from scratch, we employ a "two-stage annealing" strategy. We take a 1B-parameter model already pre-trained on 1.1T tokens and perform a short annealing run on just 10B tokens. This batch consists of a 30/70 mix of the new candidate data and a baseline high-quality mix. The resulting change in benchmark performance serves as a highly accurate and computationally cheap proxy for the data's overall quality. This reduces verification costs from 1,200 GPU hours to approximately 110 GPU hours.
2. Objective Seed Selection
Using the efficient verification strategy, we empirically test various pools of positive and negative seed data. We only retain seeds that demonstrate a measurable improvement in the LLM's performance. This removes human subjectivity and LLM bias from the loop, ensuring the classifier learns to identify truly high-quality content.
3. Lightweight Classification at Scale
While LLM-based classifiers are popular, they are computationally expensive to run on tens of trillions of tokens. We found that a lightweight fastText classifier, when trained on our objectively verified seeds, achieves superior results. This approach allowed us to filter 15T tokens using only 1,000 CPU hours, compared to the estimated 6,000 GPU hours required for an LLM-based equivalent.
Experimental Results
We applied this pipeline to the FineWeb (English) and various Chinese web corpora to produce Ultra-FineWeb-en (~1T tokens) and Ultra-FineWeb-zh (~120B tokens).
Performance Benchmarks
In controlled 100B-token training runs, models trained on Ultra-FineWeb consistently outperformed those trained on leading corpora:
- English: Ultra-FineWeb-en achieved an average score of 45.89 across standard benchmarks (MMLU, ARC, etc.), surpassing FineWeb (42.28) and FineWeb-edu (44.56).
- Chinese: Ultra-FineWeb-zh averaged 35.16, beating Chinese FineWeb (33.18) and Chinese FineWeb-edu-v2 (34.55).
Scaling Projections
Using Densing Law projections for an 8B-parameter model trained on 8T tokens, we estimate that utilizing Ultra-FineWeb data could boost MMLU scores from a baseline of 70.84 to 85.60, demonstrating the long-term value of high-precision filtering.
Conclusion
Ultra-FineWeb demonstrates that data quality can be optimized objectively and efficiently. By shifting from expensive from-scratch training to targeted annealing-based verification, and from subjective seed selection to empirical testing, we can produce superior training sets at a fraction of the traditional cost. Future work will focus on adapting this pipeline for specialized domains such as code, mathematics, and legal text.
Summary updated