DistP:通过零样本超参数迁移扩展本地更新训练
摘要
论文提出 DistP 框架,将原本用于 DDP 的零样本超参数迁移规则扩展到本地更新训练,支持在不同 worker 数量、本地步数和外层优化器配置下迁移学习率。在 823M 参数的语言建模实验中,该方法无需在更大规模上重新调参,验证损失降低 8.1%,下游平均准确率提升 10%。
查看原始标题和摘要
$\mathtt{DistP}$: Scaling Local-Update Training with Zero-Shot Hyperparameter Transfer
Local-update methods offer a communication-efficient alternative to Distributed Data Parallelism ($\mathtt{DDP}$), but introduce additional hyperparameters that require costly tuning. For $\mathtt{DDP}$, zero-shot hyperparameter transfer reduces this cost by reusing settings tuned on smaller models, but its applicability to local-update training remains unclear. We propose $\mathtt{DistP}$, a theoretical framework extending existing transfer rules from $\mathtt{DDP}$ to local-update training with varying worker counts, local steps, and outer optimizers. With averaging as the outer optimizer, $\mathtt{DistP}$ supports learning-rate transfer across width and depth while improving model quality. The tuned inner learning rate also directly transfers across synchronization intervals, but follows two regimes when increasing the global batch size: square-root learning-rate scaling for larger local batches and a fixed reference rate for additional workers. We then generalize width and depth transfer to other outer optimizers, enabling stable scaling with $\mathtt{Adam}$. However, with momentum in the outer optimizer, changing batch size or local steps can require inner--outer learning-rate
核心要点
- 将零样本超参数迁移从 DDP 扩展到本地更新训练,覆盖不同 worker 数量、本地步数与外层优化器
- 以平均作为外层优化器时,DistP 支持跨宽度和深度的学习率迁移,并改善模型质量
- 内层学习率可跨同步间隔直接迁移;全局 batch 增大时呈现两种规律:本地 batch 更大时按平方根缩放,增加 worker 时使用固定参考学习率
- 将宽度和深度迁移推广到其他外层优化器,可在 Adam 下稳定扩展;外层优化器使用 momentum 时,改变 batch 大小或本地步数可能仍需调整内层与外层学习率
- 823M 参数语言建模实验中,未在更大规模重调参的情况下,验证损失降低 8.1%,下游平均准确率提升 10%
- 拟合的缩放规律表明该优势随计算预算增长而扩大
为什么值得后端工程师关注
对需要跨模型规模、集群规模和 batch 配置复用超参数的分布式训练场景,DistP 提供了一套可操作的迁移规则,减少大规模重调参成本;采用 momentum 外层优化器时仍需关注内外层学习率的联合调优。