arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2402.15173cs.LG
收藏

让LLM的二阶微调不再痛苦:一种Hessian信息引导的零阶优化器

Second-Order Fine-Tuning without Pain for LLMs:A Hessian Informed Zeroth-Order Optimizer

Xi’an Jiaotong University(西安交通大学);SGIT AI Lab(SGIT人工智能实验室);Centre for Frontier Artificial Intelligence Research(前沿人工智能研究中心);A* STAR(新加坡科技研究局)

Yanjun Zhao, Sizhe Dang, Haishan Ye, Guang Dai, Yi Qian, Ivor W. Tsang

AI总结:

本文提出HiZOO,一种利用对角Hessian信息的零阶优化器,以仅增加一次前向传播的低成本缓解参数曲率异质问题,并在350M至66B模型上提升收敛与准确率。

摘要:

使用经典一阶优化器微调大型语言模型(LLM)时,由于反向传播过程会产生难以承受的GPU显存开销。近期研究转向采用零阶优化器进行微调,这类方法通过两次前向传播节省大量显存。然而,这些优化器受到不同维度间参数曲率异质性的困扰。本文提出HiZOO,一种对角Hessian信息引导的零阶优化器,这是首个利用对角Hessian增强零阶优化器以微调LLM的工作。此外,HiZOO避免了高昂的显存成本,每步仅增加一次前向传播。在多种模型(350M至66B参数)上的大量实验表明,HiZOO改善了模型收敛性,显著减少训练步数,并有效提升模型准确率。此外,我们在测试函数上可视化HiZOO的优化轨迹,说明其处理异质曲率的有效性。最后,我们给出HiZOO收敛性的理论证明。代码公开于https://anonymous.4open.science/r/HiZOO27F8。

英文摘要:

Fine-tuning large language models (LLMs) with classic first-order optimizers entails prohibitive GPU memory due to the backpropagation process. Recent works have turned to zeroth-order optimizers for fine-tuning, which save substantial memory by using two forward passes. However, these optimizers are plagued by the heterogeneity of parameter curvatures across different dimensions. In this work, we propose HiZOO, a diagonal Hessian informed zeroth-order optimizer which is the first work to leverage the diagonal Hessian to enhance zeroth-order optimizer for fine-tuning LLMs. What's more, HiZOO avoids the expensive memory cost and only increases one forward pass per step. Extensive experiments on various models (350M~66B parameters) indicate that HiZOO improves model convergence, significantly reducing training steps and effectively enhancing model accuracy. Moreover, we visualize the optimization trajectories of HiZOO on test functions, illustrating its effectiveness in handling heterogeneous curvatures. Lastly, we provide theoretical proofs of convergence for HiZOO. Code is publicly available at https://anonymous.4open.science/r/HiZOO27F8.

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

↑