中段训练通过分布桥接提升模型性能,尤其对代码数学等远距离领域有效。
Midtraining Bridges Pretraining and Posttraining Distributions
- 用中间阶段混合数据实现预训练与微调间的分布平滑过渡。
- 代码和数学领域性能超越持续预训练,且减少遗忘现象。
- 早期引入专用数据可配高比例,后期则需低比例以避免失效。
中段训练(midtraining)在语言模型开发中广泛应用,即在中间阶段混合专业数据与通用预训练数据,但其有效性机制尚不明确。本文提出,中段训练通过提供更优的初始化来桥接分布,从而提升后续微调表现。控制实验表明,中段训练在远离通用预训练数据分布的领域(如代码、数学)收益最大,且效果随其向目标分布的接近程度而增强。在这些领域,中段训练不仅在域内表现优于仅使用专业数据的持续预训练,还能更好缓解遗忘。进一步以代码为例研究引入时机与混合权重的影响,发现二者存在强交互:早期引入支持高混合比例,而后期引入则需低比例。这说明若在关键可塑期后才引入专业数据,无法通过增加数据比例弥补。该结果提示,任何训练阶段间的数据分布跃迁均可受益于类似桥接策略。
原文摘要 · Abstract (English)
Midtraining, the practice of mixing specialized data with more general pretraining data in an intermediate training phase, has become widespread in language model development, yet there is little understanding of what makes it effective. We propose that midtraining functions as distributional bridging by providing better initialization for posttraining. We conduct controlled pretraining experiments, and find that midtraining benefits are largest for domains distant from general pretraining data, such as code and math, and scale with the proximity advantage the midtraining data provides toward the target distribution. In these domains, midtraining consistently outperforms continued pretraining on specialized data alone both in-domain and in terms of mitigating forgetting. We further conduct an investigation on the starting time and mixture weight of midtraining data, using code as a case study, and find that time of introduction and mixture weight interact strongly such that early introduction of specialized data is amenable to high mixture weights, while late introduction requires lower ones. This suggests that late introduction of specialized data outside a plasticity window cannot be compensated for by increasing data mixtures later in training. Beyond midtraining itself, this suggests that distributional transitions between any training phases may benefit from similar bridging strategies.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。