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

差异中的和谐:迈向快速、准确且内存高效的零阶LLM微调

Harmony in Divergence: Towards Fast, Accurate, and Memory-efficient Zeroth-order LLM Fine-tuning

University of Georgia(佐治亚大学);Northeastern University(东北大学);University of Minnesota(明尼苏达大学);University of Arizona(亚利桑那大学)

Qitao Tan, Jun Liu, Zheng Zhan, Caiwei Ding, Yanzhi Wang, Xiaolong Ma, Jaewoo Lee, Jin Lu, Geng Yuan

AI总结:

为解决零阶优化在LLM微调中收敛慢、精度低的问题,提出差异驱动的DiZO方法,通过逐层差异分析引入投影生成多样化幅度更新,显著提升收敛速度与精度,并大幅降低GPU训练时长。

摘要:

大型语言模型(LLMs)在各类任务中表现优异,但标准的一阶(FO)微调需要大量内存,严重限制了其实际部署。近期,零阶(ZO)优化作为一种极具前景的内存高效训练范式脱颖而出,它避免了反向传播,仅依赖前向传播进行梯度估计,使其在资源受限的场景中极具吸引力。然而,ZO方法在收敛速度和准确性上远落后于FO方法。为弥合这一差距,我们引入了一种新颖的逐层差异分析,揭示了FO和ZO优化截然不同的更新模式。基于发现旨在复刻FO方法的学习能力,我们提出了差异驱动的零阶(DiZO)优化。DiZO通过将投影引入ZO更新来进行差异驱动的层适配,生成精确缩放以满足逐层单独优化需求的多样化幅度更新。结果表明,DiZO在不牺牲吞吐量的情况下显著减少了收敛所需的迭代次数,在多种数据集上将训练GPU时长削减了高达48%。此外,在下游任务中微调RoBERTa-large、OPT-series和Llama-series时,DiZO始终优于代表性的ZO基线,在某些情况下甚至超越了内存消耗大的FO微调。代码发布于https://github.com/Skilteee/DiZO。

英文摘要:

Large language models (LLMs) excel across various tasks, but standard first-order (FO) fine-tuning demands considerable memory, significantly limiting real-world deployment. Recently, zeroth-order (ZO) optimization stood out as a promising memory-efficient training paradigm, avoiding backward passes and relying solely on forward passes for gradient estimation, making it attractive for resource-constrained scenarios. However, ZO method lags far behind FO method in both convergence speed and accuracy. To bridge the gap, we introduce a novel layer-wise divergence analysis that uncovers the distinct update pattern of FO and ZO optimization. Aiming to resemble the learning capacity of FO method from the findings, we propose Divergence-driven Zeroth-Order (DiZO) optimization. DiZO conducts divergence-driven layer adaptation by incorporating projections to ZO updates, generating diverse-magnitude updates precisely scaled to layer-wise individual optimization needs. Our results demonstrate that DiZO significantly reduces the needed iterations for convergence without sacrificing throughput, cutting training GPU hours by up to 48\% on various datasets. Moreover, DiZO consistently outperforms the representative ZO baselines in fine-tuning RoBERTa-large, OPT-series, and Llama-series on downstream tasks and, in some cases, even surpasses memory-intensive FO fine-tuning. Our code is released at https://github.com/Skilteee/DiZO.

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

↑