Abstract
Instruction tuning is essential for aligning Large Language Models (LLMs) with human intent, yet it typically relies on static data mixtures that do not adapt to the model's shifting learning requirements. We introduce DynamixSFT, a framework that treats instruction-tuning datasets as "arms" in a multi-armed bandit (MAB) problem to dynamically optimize data mixtures during training. By employing a lightweight "1-step look-ahead" reward and anchoring sampling to original dataset proportions via Prior-scaled Boltzmann Exploration, DynamixSFT achieves up to a 2.2% performance improvement across diverse benchmarks. Notably, this is achieved without the need for expensive proxy models or manual tuning.
Introduction
The efficacy of instruction tuning depends on a diverse "cocktail" of datasets covering domains such as mathematics, coding, and general reasoning. Current practices largely rely on static mixtures, where dataset ratios are fixed based on manual heuristics or simple dataset size. However, static mixtures are inherently suboptimal; a model’s learning needs are dynamic. For instance, a model might master conversational patterns early in training but require more intensive reasoning data in later stages.
Existing dynamic data selection methods often require a secondary "proxy" model to evaluate data quality, which introduces significant computational overhead and scaling challenges. DynamixSFT addresses this by allowing a model to autonomously and efficiently curate its own training diet in real-time.
Methodology
DynamixSFT formulates dataset selection as a Multi-Armed Bandit problem. The framework incorporates several key innovations to ensure efficient and stable optimization:
1-Step Look-ahead Reward (Δ-Loss)
To determine the immediate utility of a dataset, DynamixSFT performs a "virtual" gradient step on a small batch from that dataset. It measures the resulting reduction in the model's loss (Δ-Loss). This provides a real-time signal of a dataset's informativeness without requiring a separate validation set.
Prior-scaled Boltzmann Exploration
Standard bandit algorithms can suffer from "collapse," where they over-index on a single high-reward dataset and lose diversity. DynamixSFT mitigates this by "anchoring" its sampling to the original dataset proportions (the "prior"). This allows the model to deviate toward high-reward data while maintaining the broad coverage necessary for general capabilities.
Stability Mechanisms
The framework also utilizes Exponential Moving Average (EMA) Smoothing to prevent overreaction to noisy batches and maintains a Minimum Floor Probability to ensure every dataset retains a non-zero chance of being sampled, preventing premature exclusion.
Experimental Setup
The authors evaluated DynamixSFT using the TULU-v2-mixture, comprising approximately 300,000 examples from 16 sources (e.g., FLAN, ShareGPT, LIMA, WizardLM). Performance was assessed across 10 major benchmarks covering knowledge (MMLU, TruthfulQA), reasoning (BigBench-Hard, DROP), coding (HumanEval), and instruction following (IFEval).
Key Results and Insights
DynamixSFT consistently outperformed both static baselines and alternative dynamic methods across different model architectures.
- Performance Gains: For LLaMA 3.2 1B, DynamixSFT achieved a +2.2% relative gain in average score compared to the standard static mixture. For Qwen 2.5 3B, the gain was +1.5%.
- The Importance of the Prior: A critical finding was that ignoring original dataset proportions (e.g., using Uniform Sampling) degrades performance. The "Prior-scaled" approach is essential for safe dynamic adjustment.
- Self-Evolving Learning: The model's sampling behavior naturally follows its learning rate schedule. It becomes more "adventurous" and responsive in the middle of training when the learning rate is higher, and stabilizes as it nears the end.
- Efficiency: By utilizing the 1-step look-ahead on the model itself, DynamixSFT avoids the auxiliary model overhead associated with methods like DoReMi or RegMix.
Conclusion
DynamixSFT provides a scalable, efficient solution for dynamic data mixture optimization in instruction tuning. While currently tested on 1B and 3B parameter models, future work will explore its application to larger scales (70B+) and more fine-grained, instance-level optimization. Additionally, exploring domain-specific reward signals beyond Δ-Loss may further enhance performance in specialized tasks like mathematical reasoning.
Summary updated