ToReMi: Topic-Aware Data Reweighting for Dynamic Pre-Training Data Selection
Xiaoxuan Zhu, Zhouhong Gu, Baiqian Wu, Suhang Zheng, Tao Wang, Tianyu Li, Hongwei Feng, Yanghua Xiao
TL;DR
ToReMi tackles the challenge of efficient pre-training data selection for large language models by introducing a two-stage, topic-aware reweighting framework. It dynamically adjusts topic-level weights during training to emphasize high-loss topics initially and downweight noisy topics later, thereby balancing learning progression with noise reduction. Empirical results using GPT-2 124M on a 30B-token corpus show accelerated perplexity reduction across 12 Paloma domains and improves several downstream tasks, with performance that is robust across a range of hyperparameters. The work highlights topic-aware data weighting as a practical lever to improve both the efficiency and generalization of large-scale pre-training.
Abstract
Pre-training large language models (LLMs) necessitates enormous diverse textual corpora, making effective data selection a key challenge for balancing computational resources and model performance. Current methodologies primarily emphasize data quality metrics and mixing proportions, yet they fail to adequately capture the underlying semantic connections between training samples and quality disparities within individual domains. We introduce ToReMi (Topic-based Reweighting for Model improvement), a novel two-stage framework that dynamically adjusts training sample weights according to their topical associations and observed learning patterns. Our comprehensive experiments reveal that ToReMi variants consistently achieve superior performance over conventional pre-training approaches, demonstrating accelerated perplexity reduction across multiple domains and enhanced capabilities on downstream evaluation tasks. Code is available at https://github.com/zxx000728/ToReMi.
