Research map / Large language models / Instruction and fine-tuning
Data Mixing Optimization for Supervised Fine-Tuning of Large Language Models
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Frames SFT data mixing as minimizing validation loss via a parametric loss that models effective transferred data and a fine-tuning power law, then solves for domain weights with SLSQP.
Problem
Choosing domain weights for the data mixture in supervised fine-tuning (SFT) of LLMs is underexplored; pre-training data-mixing methods transfer poorly to SFT and can give unbalanced domain weights when data scales.
Approach
Parametrize per-domain validation loss as a power law in effective data (own tokens plus transferred tokens from other domains, modeled as k*|D_other|^alpha), fit five parameters per domain from five perturbation runs with small data, then minimize the summed loss over the simplex with SLSQP; proofs of convexity and a "no domains left behind" property are given.
Key results
- On 3-domain mixing across four models and three budgets, the method's overall PPL averages only 0.66% above the best grid-search mixture.
- On Tulu3 re-weighting with Llama3.1-8B, the method achieves the lowest average validation PPL (2.150 vs 2.162 original) and the best downstream average for Llama3.1-8B and Llama3.1-70B (50.4 and 63.8).
- In a medical case study, the optimized mixture (67.7% Alpaca-GPT4, 32.3% PubMedQA) gives PPL 5.42 vs 5.48 for all-medical data.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Optimize domain weights instead of selecting the best grid-search mixture | Data Mixing Optimization · IF, math, code; 5M tokens | overall PPL: 2.9692 -> 2.9847 | Hurt |
| Optimize domain weights instead of selecting the best grid-search mixture | Data Mixing Optimization · IF, math, code; 20M tokens | overall PPL: 2.8952 -> 2.9293 | Hurt |
| Optimize domain weights instead of selecting the best grid-search mixture | Data Mixing Optimization · IF, math, code; 200M tokens | overall PPL: 2.7621 -> 2.8210 | Hurt |
| Reweight Tulu3 domains using optimized weights rather than original proportions | Tulu3 fine-tuning · Tulu3 validation | average PPL: 2.162 -> 2.150 | Helped |
| Reweight Tulu3 domains using optimized weights rather than original proportions | Tulu3 fine-tuning · Tulu3 validation | average PPL: 2.127 -> 2.080 | Helped |
| Reweight Tulu3 domains using optimized weights rather than original proportions | Tulu3 fine-tuning · Tulu3 validation | average PPL: 2.165 -> 2.133 | Helped |
| Reweight Tulu3 domains using optimized weights rather than original proportions | Tulu3 fine-tuning · Tulu3 downstream tasks | Average: 50.1 -> 50.4 | Helped |
| Reweight Tulu3 domains using optimized weights rather than original proportions | Tulu3 fine-tuning · Tulu3 downstream tasks | Average: 63.6 -> 63.8 | Helped |
| Reweight Tulu3 domains using optimized weights rather than the strongest baseline | Tulu3 fine-tuning · Tulu3 downstream tasks | Average: 68.5 -> 68.0 | Hurt |
| Use optimized mixture of Alpaca-GPT4 and PubMedQA instead of all PubMedQA data | Medical PubMedQA fine-tuning · Medical PubMedQA | PPL: 5.48 -> 5.42 | Helped |
| Use optimized mixture of Alpaca-GPT4 and PubMedQA instead of all PubMedQA data | Medical PubMedQA fine-tuning · Medical PubMedQA | accuracy: 76.4% -> 76.8% | Helped |
| Reweight Orca domains using optimized weights rather than the strongest baseline | Orca fine-tuning · Orca validation | average PPL: 1.763 -> 1.795; 1.644 -> 1.643; 1.649 -> 1.649 | Mixed |
Surprising findings
- Optimal domain weights depend on data budget (scale-dependent), contrary to the scale-invariance assumed by many prior methods.
- For a purely medical target, the method recommends a majority of general instruction-following data, beating training on medical data alone.
Limitations
- Downstream gains on Orca do not track validation loss, and IFEval drops for Llama models under the Tulu3 weights.
- Repeated upsampling of limited data for under-represented domains (e.g., precise IF) may cause overfitting.
- Domains are defined by data provenance, and the method is agnostic to within-domain composition.
Experimental setup
Datasets: Infinity-Instruct OpenMathInstruct-2 OpenCoder (opc-sft-stage1) Tulu3 SFT mixture OpenOrca Alpaca-GPT4 PubMedQA
Benchmarks: AGIEval IFEval MMLU GSM8K HumanEval ToxiGen TruthfulQA HellaSwag
Metrics: token-level perplexity per-domain perplexity accuracy
Baselines: Grid search mixtures Original Equal_T Equal_I SMART
Builds on: DoReMi Data Mixing Laws RegMix AutoScale
Closest papers by meaning
- FisherSFT: Data-Efficient Supervised Fine-Tuning of Language Models Using Information Gain (ICML 2025 · similarity 0.93)
- SmallToLarge (S2L): Scalable Data Selection for Fine-tuning Large Language Models by Summarizing Training Trajectories of Small Models (NeurIPS 2024 · similarity 0.91)
- Data Efficient Adaptation in Large Language Models via Continuous Low-Rank Fine-Tuning (NeurIPS 2025 · similarity 0.91)
- Get more for less: Principled Data Selection for Warming Up Fine-Tuning in LLMs (ICLR 2024 · similarity 0.91)
- Token Cleaning: Fine-Grained Data Selection for LLM Supervised Fine-Tuning (ICML 2025 · similarity 0.90)
- Data Mixing Laws: Optimizing Data Mixtures by Predicting Language Modeling Performance (ICLR 2025 · similarity 0.90)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
