动态调整训练数据比例,让大模型在提升特定能力时保持通用性能
DynaMiCS: Fine-tuning LLMs with Performance Constraints using Dynamic Mixtures

- 通过短时探针测试估算各数据集对不同领域的影响,动态优化混合比例
- 在多个目标域上实现更强性能提升,同时严格满足受限域的性能底线
- 无需参考模型或人工调参,计算成本低,适合实际部署场景
大语言模型在多领域微调中需在提升目标领域表现的同时,保持通用知识、指令遵循和安全评估等受限领域的性能。现有数据混合策略依赖固定启发式或自适应规则,无法显式约束这些能力的保留。本文提出DynaMiCS,将多领域微调建模为带约束的优化问题:每轮更新时,通过短时领域特异性探针运行估计局部跨域影响的斜率矩阵,反映每个微调数据集对各评估域的影响;随后在概率单纯形上优化混合权重,目标是在提升目标域性能的同时,确保受限域损失低于参考水平。在包含不同数量目标域与受限域的多种场景下,DynaMiCS相比固定混合基线,在更低计算开销下实现了更优的目标域提升与更高的约束满足度,且无需参考模型、每样本评分或人工调参。
原文摘要 · Abstract (English)
Multi-domain fine-tuning of large language models requires improving performance on target domains while preserving performance on constrained domains, such as general knowledge, instruction following, or safety evaluations. Existing data mixing strategies rely on fixed heuristics or adaptive rules that cannot explicitly enforce preservation of such capabilities. We propose DynaMiCS, a dynamic mixture optimizer that casts multi-domain fine-tuning as a constrained optimization problem. At each update, DynaMiCS performs short domain-specific probing runs to estimate a slope matrix of local cross-domain effects, capturing how training on each fine-tuning dataset affects each evaluation domain. These estimates are then used to compute mixture weights through optimization over the probability simplex, with the objective of improving target-domain performance while keeping constrained-domain losses below reference levels. Across multi-domain fine-tuning scenarios with varying numbers of target and constrained domains, DynaMiCS achieves stronger target-domain improvements and higher constraint satisfaction than fixed-mixture baselines, at lower computational cost and without reference models, per-example scoring, or manually tuned mixture weights.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。