DoReMi: Optimizing Data Mixtures Speeds Up Language Model Pretraining

Sang Michael Xie, Hieu Pham, Xuanyi Dong, Nan Du, Hanxiao Liu +5 more
2/12/2026

No official code found. Best implementation: princeton-nlp/LLM-Shearing (644 stars, MIT, last commit 2024-03-04).

Abstract

The mixture proportions of pretraining data domains (e.g., Wikipedia, books, web text) greatly affect language model (LM) performance. In this paper, we propose Domain Reweighting with Minimax Optimization (DoReMi), which first trains a small proxy model using group distributionally robust optimization (Group DRO) over domains to produce domain weights (mixture proportions) without knowledge of downstream tasks. We then resample a dataset with these domain weights and train a larger, full-sized model. In our experiments, we use DoReMi on a 280M-parameter proxy model to set the domain weights for training an 8B-parameter model (30x larger) more efficiently. On The Pile, DoReMi improves perplexity across all domains, even when it downweights a domain. DoReMi improves average few-shot downstream accuracy by 6.5% points over a baseline model trained using The Pile's default domain weights and reaches the baseline accuracy with 2.6x fewer training steps. On the GLaM dataset, DoReMi, which has no knowledge of downstream tasks, even matches the performance of using domain weights tuned on downstream tasks.

View on arXivView PDF

Code Implementations(1)

MIT

[ICLR 2024] Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruning

64458Shell, PythonOct 16, 20232 years agoMIT
efficiencyllamallama2llmnlp+2 more

Similar Papers

Cite this paper

@article{xie2026doremi,
  title  = {DoReMi: Optimizing Data Mixtures Speeds Up Language Model Pretraining},
  author = {Sang Michael Xie and Hieu Pham and Xuanyi Dong and Nan Du and Hanxiao Liu and Yifeng Lu and Percy Liang and Quoc V. Le and Tengyu Ma and Adams Wei Yu},
  year   = {2026},
  eprint = {2305.10429},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/pdf/2305.10429},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.10429.svg)](https://codeofpaper.com/paper/2305.10429)

Discussion