Data Mixing Optimization for Supervised Fine-Tuning of Large Language Models

Yuan Li, Zhengzhong Liu, Eric P. Xing
8/1/2025

No confident code implementation found for this paper. 8 possible matches can be shown below.

Abstract

Optimizing data mixtures for supervised fine-tuning (SFT) of large language models (LLMs) is critical for developing general-purpose models, yet this area remains underexplored. In this paper, we frame data mixing as an optimization problem and introduce a novel method designed to minimize validation loss. Our approach parametrizes the loss by modeling effective data transferred and leveraging scaling laws for fine-tuning. By experimenting with various small-scale data mixtures, we fit these parameters and derive the optimal weights. We provide both mathematical proofs and empirical results demonstrating that our algorithm achieves excellent overall and individual performance across all domains. Through controlled experiments, we show that models trained with our optimized weights perform on par with those using optimal weights determined via grid search, with per-domain loss only 0.66% higher than the best domain loss from grid search on average. Additionally, we show that reweighting popular SFT datasets using our method improves both validation loss and downstream performance. Finally, we discuss how our method can generalize to guide data selection for domain-specific models and provide insights into SFT.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 8 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2025data,
  title  = {Data Mixing Optimization for Supervised Fine-Tuning of Large Language Models},
  author = {Yuan Li and Zhengzhong Liu and Eric P. Xing},
  year   = {2025},
  eprint = {2508.11953},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2508.11953},
  journal = {ICML 2025 2025}
}

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/2508.11953.svg)](https://codeofpaper.com/paper/2508.11953)

Discussion