用领域级损失信号优化数据混合,提升微调效果且不增加成本
DomainPilot: Domain-Level Loss-Guided Two-Stage Data Mixture Optimization for Efficient Language Model Fine-Tuning
- 基于领域损失监控动态调整数据混合比例
- 在多个基准上提升1.8%~3.8%性能,无需额外数据或训练开销
- 轻量插件式设计,可无缝接入现有训练框架
大语言模型的训练效果受限于训练数据的质量与构成。现有动态数据调度方法在工业级预训练和有监督微调中存在显著瓶颈:数据选择在太字节级语料上产生O(N)的高昂开销,混合优化方案引入严重I/O瓶颈或需训练辅助参考模型,样本级重加权策略依赖的损失信号混杂了噪声、难度与新颖性。本文提出DomainPilot,一种领域级损失引导的两阶段数据混合优化框架。该框架引入词元级领域损失监控,在不中断数据流水线的前提下捕捉各领域的学习动态。基于这些信号,提出基于缩放定律的粗粒度优化阶段,拟合领域特定收敛曲线并推导出混合调整的合理先验;随后通过受控扫查实验建模跨领域交互效应,实现基于混合定律的细粒度优化。整个机制通过基于块的架构实现,仅需约30行框架特异性适配代码,即可将领域感知损失计算注入现有训练框架(如MindSpeed/Megatron-LM)。我们在Qwen3-1.7B模型的微调中验证了该方法,相比原始数据混合,优化后混合在MMLU-Redux上提升+2%,AIME24上+1.8%,LiveCodeBench v5上+3.8%,BFCL v3上+3.6%,且未增加总数据量或训练成本。结果表明,领域级训练信号为混合优化提供了一种高效、轻量的替代方案。
原文摘要 · Abstract (English)
The training efficacy of large language models (LLMs) is fundamentally constrained by the quality and composition of training data. Existing dynamic data scheduling methods face critical limitations in industrial-scale pretraining and supervised fine-tuning (SFT): data selection incurs prohibitive O(N) costs on terabyte-scale corpora, mixture optimization schemes introduce severe I/O bottlenecks or require training auxiliary reference models, and sample-level reweighting strategies rely on loss signals that conflate noise, difficulty, and novelty. We present DomainPilot, a domain-level loss-guided two-stage data mixture optimization framework. DomainPilot introduces token-level domain loss monitoring to capture per-domain learning dynamics during training without halting the data pipeline. Building on these signals, we propose a Scaling Law guided coarse optimization stage that fits domain-specific convergence curves and derives a principled prior for mixture adjustment. A subsequent Mixing Law guided fine optimization stage refines the mixture by modeling cross-domain interaction effects through controlled sweep experiments. The entire mechanism is realized via a patch-based architecture that injects domain-aware loss computation into existing training frameworks (e.g., MindSpeed/Megatron-LM) with only ~30 lines of framework-specific adapter code. We validate DomainPilot on the Qwen3-1.7B model during SFT. Compared to the original data mixture, our optimized mixture achieves improvements of +2% on MMLU-Redux, +1.8% on AIME24, +3.8% on LiveCodeBench v5, and +3.6% on BFCL v3, without increasing total data volume or training cost. These results demonstrate that domain-level training signals provide an effective, lightweight alternative to expensive data selection or auxiliary model training for mixture optimization.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。