Optimizers play an important role in both pretraining and finetuning stages when training large language models (LLMs). In this paper, we present an observation that full finetuning with the same optimizer as in pretraining achieves a better learning-forgetting tradeoff, i.e., forgetting less while achieving the same or better performance on the new task, than other optimizers and, possibly surprisingly, LoRA, during the supervised finetuning (SFT) stage. We term this phenomenon optimizer-model consistency. To better understand it, through controlled experiments and theoretical analysis, we show that: 1) optimizers can shape the models by having regularization effects on the activations, leading to different landscapes around the pretrained checkpoints; 2) in response to this regularization effect, the weight update in SFT should follow some specific structures to lower forgetting of the knowledge learned in pretraining, which can be obtained by using the same optimizer. Moreover, we specifically compare Muon and AdamW when they are employed throughout the pretraining and SFT stages and find that Muon performs worse when finetuned for reasoning tasks. With a synthetic language modeling experiment, we demonstrate that this can come from Muon's strong tendency towards rote memorization, which may hurt pattern acquisition with a small amount of data, as for SFT.


翻译:优化器在训练大型语言模型(LLMs)的预训练和微调阶段均扮演着重要角色。本文发现,在监督微调(SFT)阶段,使用与预训练相同优化器进行全量微调相比其他优化器(可能令人惊讶的是,还包括LoRA)能实现更优的学习-遗忘权衡,即在新任务上取得相同或更优性能的同时遗忘更少。我们将此现象称为优化器-模型一致性。为深入理解该现象,通过受控实验和理论分析,我们揭示:1)优化器通过对激活值产生正则化效应来塑造模型,导致预训练检查点周围形成不同损失景观;2)针对这种正则化效应,SFT阶段的权重更新应遵循特定结构以降低对预训练知识的遗忘,而使用相同优化器即可获得该结构。此外,我们专门比较了Muon和AdamW在预训练和SFT全阶段使用时的表现,发现Muon在推理任务微调时表现更差。通过合成语言建模实验,我们证明这可能源于Muon强烈的机械记忆倾向,该倾向在SFT等数据量较少的场景中可能损害模式习得能力。

0
下载
关闭预览

相关内容

什么是后训练?大语言模型训练后优化方法综述,87页pdf
SFT 记忆,RL 泛化:基础模型后训练的比较研究
专知会员服务
24+阅读 · 2025年2月3日
【ICML 2024】零阶优化器微调大模型,大幅降低内存
专知会员服务
32+阅读 · 2024年7月8日
针对预训练视觉模型的参数高效微调
专知会员服务
22+阅读 · 2024年2月7日
以BERT为例,如何优化机器学习模型性能?
专知
10+阅读 · 2019年10月3日
机器学习中的最优化算法总结
人工智能前沿讲习班
22+阅读 · 2019年3月22日
半监督深度学习小结:类协同训练和一致性正则化
入门 | 深度学习模型的简单优化技巧
机器之心
10+阅读 · 2018年6月10日
推荐|机器学习中的模型评价、模型选择和算法选择!
全球人工智能
10+阅读 · 2018年2月5日
从浅层模型到深度模型:概览机器学习优化算法
机器之心
27+阅读 · 2017年7月9日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
55+阅读 · 2011年12月31日
VIP会员
最新内容
俄乌无人机战争的六大启示
专知会员服务
4+阅读 · 今天7:07
《无人机空中监控:通信实验洞察》
专知会员服务
3+阅读 · 今天7:05
从采集到决策:美军视角下的战术情报范式重构
《履带式无人地面战车技术发展现状》
专知会员服务
6+阅读 · 8月2日
《无人机脆弱性利用:网络空间力量的新域》
专知会员服务
6+阅读 · 8月1日
美空军如何将人工智能从战场部署至后方机关
专知会员服务
13+阅读 · 7月31日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
55+阅读 · 2011年12月31日
Top
微信扫码咨询专知VIP会员