arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.10770cs.LG
收藏

DynaMiCS: 通过动态混合实现具有性能约束的LLM微调

DynaMiCS: Fine-tuning LLMs with Performance Constraints using Dynamic Mixtures

Apple(苹果公司)

Eleonora Gualdoni, Sonia Laguna, Louis Bethune, Joao Monteiro, Pierre Ablin, Marco Cuturi

AI总结:

本文提出DynaMiCS,通过动态混合优化解决多领域微调中目标领域性能提升与约束领域性能保持的矛盾,实现更高效且更稳定的模型优化。

摘要:

多领域大语言模型微调需要在提升目标领域性能的同时保持约束领域(如通用知识、指令跟随或安全评估)的性能。现有数据混合策略依赖固定启发式或自适应规则,无法显式强制保持这些能力。我们提出DynaMiCS,一种动态混合优化器,将多领域微调视为一个约束优化问题。在每次更新时,DynaMiCS执行短领域特定的探测运行,以估计局部跨领域效应的斜率矩阵,捕捉训练每个微调数据集如何影响每个评估领域。这些估计随后通过在概率单纯形上的优化计算混合权重,目标是在提升目标领域性能的同时保持约束领域损失低于参考水平。在具有不同目标和约束领域数量的多领域微调场景中,DynaMiCS在目标领域改进和约束满足方面优于固定混合基线,计算成本更低,无需参考模型、每例评分或手动调优的混合权重。

英文摘要:

Multi-domain fine-tuning of large language models requires improving performance on target domains while preserving previous capabilities, 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 metrics within a specified tolerance of reference levels. Because these effects are measured by finite differences rather than gradients, targets and constraints need not be differentiable, or present in the fine-tuning data, and can be specified directly as benchmark accuracies. Across scenarios with varying numbers of target and constrained domains, and with loss- or accuracy-based objectives, DynaMiCS achieves stronger target-domain improvements and higher constraint satisfaction than static, dynamic, similarity-based and probing-based alternatives, without a reference model, per-example scoring, or manually tuned weights.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑