QuaDMix: Quality-Diversity Balanced Data Selection for Efficient LLM Pretraining

Fengze Liu, Weidong Zhou, Binbin Li, Zhimiao Yu, Yifan Zhang, Haobin Lin, Yifeng Yu, Bingni Zhang, Xiaohuan Zhou, Taifeng Wang, Yong Cao · DOI

In the evolving landscape of Large Language Model (LLM) pretraining, the focus has shifted from maximizing data volume to optimizing data quality. However, defining "quality" remains a challenge, as it often conflicts with the need for domain diversity. Traditional pipelines typically employ a sequential "filter-then-mix" strategy, which fails to account for the interplay between quality thresholds and domain distributions. This paper introduces QuaDMix, a unified framework that jointly optimizes quality and diversity to enhance pretraining efficiency.

The Challenge of Sequential Selection

Current data selection methods often treat quality filtering and domain mixing as independent steps. This approach has two primary drawbacks:

  1. Quality-Diversity Interplay: High-quality data is finite and unevenly distributed across domains. Setting a uniform quality bar can inadvertently skew the final domain distribution.
  2. Metric Ambiguity: Different quality scorers (e.g., educational value vs. instructional similarity) yield different results. Choosing a single metric for all domains is often suboptimal.

QuaDMix addresses these issues by treating data selection as a multi-dimensional optimization problem, seeking a "Goldilocks zone" where quality thresholds and domain weights are balanced to maximize downstream performance.

The QuaDMix Framework

The QuaDMix pipeline consists of four distinct stages designed to automate and optimize the selection process:

  1. Feature Extraction: Documents are classified into domains and scored using multiple quality filters, such as AskLLM, Fineweb-edu, and DCLM.
  2. Quality Ranking & Merging: Instead of relying on a single filter, QuaDMix merges multiple scores using domain-specific weights ((\alpha) parameters), recognizing that different quality criteria matter more for certain topics.
  3. Parameterized Sampling: A sigmoid-based sampling function uses parameters ((\beta)) to determine the aggressiveness of quality filtering and the specific cutoff thresholds for each domain.
  4. Proxy Model Optimization: To navigate the massive parameter space, the authors train thousands of 1M-parameter "proxy" models. A LightGBM regressor then learns the relationship between sampling parameters and validation loss, allowing for the identification of optimal configurations without full-scale training costs.
The QuaDMix pipeline for joint quality-diversity optimization.

Key Insights: Domain-Specific Quality

A core finding of the QuaDMix research is that the optimal mix of quality criteria varies significantly by domain. For instance, the DCLM filter proved highly effective for mathematical content, while Fineweb-edu and AskLLM were superior for general reasoning and science. By allowing these weights to vary, QuaDMix creates a more potent training set than any single filter could achieve alone.

Relative weights of quality scorers (Fineweb-edu, AskLLM, DCLM) across different domains in the QuaDMix-BMK configuration.

Experimental Results

QuaDMix was evaluated against a suite of 9 benchmarks, including HellaSwag, MMLU, and ARC. Key results include:

  • Performance Gains: QuaDMix achieved an average score of 39.5, significantly outperforming random selection (32.3) and individual high-quality filters like Fineweb-edu (37.4).
  • Data Efficiency: The framework demonstrated that a carefully curated 30B token subset can outperform models trained on 180B tokens of lower average quality, highlighting the diminishing returns of simply adding more data.
  • Predictive Accuracy: The study confirmed that the performance trends of 1M-parameter proxy models correlate strongly with larger 530M-parameter models, validating the regression-based search strategy.

Conclusion

QuaDMix represents a significant step toward more scientific and efficient LLM pretraining. By jointly optimizing for quality and diversity through a parameterized, proxy-led approach, it achieves superior performance with less compute. Future work will focus on refining search algorithms, such as Bayesian optimization, to further navigate the complex landscape of web-scale data selection.

Summary updated

BibTeX
@misc{liu2025quadmix,
  author = {Fengze Liu and Weidong Zhou and Binbin Li and Zhimiao Yu and Yifan Zhang and Haobin Lin and Yifeng Yu and Bingni Zhang and Xiaohuan Zhou and Taifeng Wang and Yong Cao},
  title = {{QuaDMix: Quality-Diversity Balanced Data Selection for Efficient LLM Pretraining}},
  year = {2025},
  eprint = {2504.16511},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.16511},
}
Figure