Data Mixing Laws: Optimizing Data Mixtures by Predicting Language Modeling Performance

Jiasheng Ye, Peiju Liu, Tianxiang Sun, Yunhua Zhou, Jun Zhan, Xipeng Qiu

arXiv:2403.16952 · 2026-07-27 공개 · arXiv · PDF

large-language-models language-modeling scaling-laws catastrophic-forgetting model-performance pretraining-data redpajama data-mixing-laws

Abstract

Pretraining data of large language models composes multiple domains (e.g., web texts, academic papers, codes), whose mixture proportions crucially impact the competence of outcome models. While existing endeavors rely on heuristics or qualitative strategies to tune the proportions, we discover the quantitative predictability of model performance regarding the mixture proportions in function forms, which we refer to as the data mixing laws. Fitting such functions on sample mixtures unveils model performance on unseen mixtures before actual runs, thus guiding the selection of an ideal data mixture. Furthermore, we propose nested use of the scaling laws of training steps, model sizes, and our data mixing law to enable predicting the performance of large models trained on massive data under various mixtures with only small-scale training. Moreover, experimental results verify that our method effectively optimizes the training mixture of a 1B model trained for 100B tokens in RedPajama, reaching a performance comparable to the one trained for 48% more steps on the default mixture. Extending the application of data mixing laws to continual training accurately predicts the critical mixture proportion that avoids catastrophic forgetting and outlooks the potential for dynamic data schedules

한국어 요약

한 줄 요약

대규모 언어 모델의 훈련 데이터 혼합 비율을 예측 함수로 최적화하여 성능을 향상시키는 방법을 제안한다.

핵심 기여도

핵심 아이디어

기존 훈련 데이터 혼합은 휴리스틱이나 질적 전략에 의존했으나, 본 연구는 혼합 비율과 모델 성능 간의 양적 관계가 함수로 예측 가능하다는 점을 발견했다. 이는 "데이터 믹싱 법칙"으로 명명되었으며, 이 법칙은 특정 도메인 비율 $ r_1, \dots, r_M $에 대해 지수 함수 $ L_i = c_i \cdot e^{k_i \cdot \sum t_{ij} r_j} $로 검증된다.

이를 통해 실제 훈련 없이도 새로운 혼합 비율의 성능을 예측할 수 있으며, 이는 소규모 실험 결과를 대규모 훈련에 확장하는 데 활용된다. 특히, 훈련 단계, 모델 크기, 데이터 믹싱 법칙을 중첩적으로 적용하여 대규모 훈련의 성능을 예측하는 파이프라인을 제안한다.

기술적 접근법

주요 결과

의의 및 한계

본 연구는 데이터 혼합 비율의 양적 예측 가능성을 입증하며, 대규모 훈련의 효율성을 높이는 새로운 접근법을 제시한다. 특히, 소규모 실험으로 대규모 훈련 성능을 예측하는 파이프라인은 자원 효율성 측면에서 의미가 크다.

하지만, 데이터 믹싱 법칙의 일반화 가능성은 추가 실험을 통해 검증이 필요하며, 도메인 간 상호작용이 복잡한 경우 예측 정확도가 떨어질 수 있다. 또한, 도메인 분해가 어려운 실제 데이터셋에서는 정확한 예측이 제한적일 수 있다.

실용적 활용

본 연구는 대규모 언어 모델의 훈련 데이터 조합 최적화에 활용 가능하며, 특히 자원이 제한된 환경에서 효율적인 훈련 설계에 기여할 수 있다. 또한, 지속 학습 및 다단계 훈련 설계에도 적용 가능하며, 동적 데이터 스케줄링을 위한 기초가 될 수 있다.