Several recently introduced deep learning optimizers utilizing matrix-level preconditioning have shown promising speedups relative to the current dominant optimizer AdamW, particularly in relatively small-scale experiments. However, efforts to validate and replicate their successes have reported mixed results. To better understand the effectiveness of these optimizers at scale, in this work we investigate how to scale preconditioned optimizers via hyperparameter transfer, building on prior works such as $μ$P. We study how the optimal learning rate and weight decay should scale with model width and depth for a wide range of optimizers, including Shampoo, SOAP, and Muon, accounting for the impact of commonly used techniques such as blocking and grafting. We find that scaling the learning rate according to $μ$P improves transfer, but can still suffer from significant finite-width deviations that cause drifting optimal learning rates, which we show can be mitigated by blocking and explicit spectral normalization. For compute-optimal scaling, we find scaling independent weight decay as $1/\mathrm{width}$ is nearly optimal across optimizers. Applying these scaling rules, we show Muon and Shampoo consistently achieve $1.4\times$ and $1.3\times$ speedup over AdamW for training Llama-architecture language models of sizes ranging from $190$M to $1.4$B, whereas the speedup vanishes rapidly with scale under incorrect scaling. Based on these results and further ablations, we argue that studying optimal hyperparameter transfer is essential for reliably comparing optimizers at scale given a realistic tuning budget.


翻译:近期引入的几种利用矩阵级预条件的深度学习优化器,在相对小规模实验中显示出相对于当前主流优化器AdamW的有前景的加速效果。然而,验证和复现其成功的尝试报告了不一致的结果。为了更好地理解这些优化器在大规模场景下的有效性,本研究基于$μ$P等先前工作,探索如何通过超参数迁移来扩展预条件优化器的规模。我们研究了包括Shampoo、SOAP和Muon在内的多种优化器的最优学习率和权重衰减应如何随模型宽度和深度进行缩放,并考虑了分块和嫁接等常用技术的影响。我们发现,根据$μ$P缩放学习率可改善迁移效果,但仍可能因显著的有限宽度偏差导致最优学习率漂移,我们证明这可通过分块和显式谱归一化缓解。对于计算最优缩放,我们发现将独立权重衰减按$1/\mathrm{width}$缩放几乎对所有优化器都是最优的。应用这些缩放规则,我们展示Muon和Shampoo在训练规模从1.9亿到14亿参数的Llama架构语言模型时,分别持续实现相对于AdamW的1.4倍和1.3倍加速,而在错误缩放下加速效果随规模迅速消失。基于这些结果及进一步消融实验,我们认为研究最优超参数迁移对于在现实调参预算下可靠比较大规模优化器至关重要。

0
下载
关闭预览

相关内容

图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
Single-Shot Object Detection with Enriched Semantics
统计学习与视觉计算组
14+阅读 · 2018年8月29日
在TensorFlow中对比两大生成模型:VAE与GAN
机器之心
12+阅读 · 2017年10月23日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
Arxiv
174+阅读 · 2023年4月20日
VIP会员
相关资讯
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
Single-Shot Object Detection with Enriched Semantics
统计学习与视觉计算组
14+阅读 · 2018年8月29日
在TensorFlow中对比两大生成模型:VAE与GAN
机器之心
12+阅读 · 2017年10月23日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员