arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.15207cs.LGcs.CL
收藏

HiFT:一种分层全参数微调策略

HiFT: A Hierarchical Full Parameter Fine-Tuning Strategy

Northeastern University(东北大学);LMU Munich(慕尼黑大学);Munich Center for Machine Learning (MCML)(慕尼黑机器学习中心);Shandong University(山东大学);Institute of Informatics, LMU Munich(慕尼黑大学信息学研究所)

Yongkang Liu, Yiqun Zhang, Qian Li, Tong Liu, Shi Feng, Daling Wang, Yifei Zhang, Hinrich Schütze

AI总结:

本文提出与优化器无关的分层全参数微调策略 HiFT,通过每步仅更新参数子集大幅降低显存,支持多种优化器并保持与标准全参数微调相当的性能。

摘要:

全参数微调凭借其出色性能,已成为使语言模型(LM)适配下游任务的首选方案。随着 LM 规模不断增大,对 LM 的全部参数进行微调需要极高的 GPU 显存。现有方法采用零阶优化器来节省 GPU 显存,但这可能损害 LM 的性能,因为非零阶优化器在大多数下游任务上往往更容易收敛。本文提出一种新颖的、与优化器无关的端到端分层微调策略 HiFT,该策略在每个训练步骤仅更新参数子集。HiFT 可显著减少同时驻留在 GPU 显存中的梯度和优化器状态参数量,从而降低 GPU 显存使用。结果表明:(1)HiFT 取得了与参数高效微调和标准全参数微调相当的性能;(2)HiFT 支持 AdamW、AdaGrad、SGD 等多种优化器;(3)对于 7B 模型,与标准全参数微调相比,HiFT 可节省超过 60% 的 GPU 显存;(4)在不使用任何显存节省技术的情况下,HiFT 可使用 AdamW 优化器,以 32 位精度在单张 48G A6000 上完成 7B 模型的全参数微调。

英文摘要:

Full-parameter fine-tuning has become the go-to choice for adapting language models (LMs) to downstream tasks due to its excellent performance. As LMs grow in size, fine-tuning the full parameters of LMs requires a prohibitively large amount of GPU memory. Existing approaches utilize zeroth-order optimizer to conserve GPU memory, which can potentially compromise the performance of LMs as non-zero order optimizers tend to converge more readily on most downstream tasks. In this paper, we propose a novel optimizer-independent end-to-end hierarchical fine-tuning strategy, HiFT, which only updates a subset of parameters at each training step. HiFT can significantly reduce the amount of gradients and optimizer state parameters residing in GPU memory at the same time, thereby reducing GPU memory usage. Our results demonstrate that: (1) HiFT achieves comparable performance to parameter-efficient fine-tuning and standard full parameter fine-tuning. (2) HiFT supports various optimizers including AdamW, AdaGrad, SGD, etc. (3) HiFT can save more than 60\% GPU memory compared with standard full-parameter fine-tuning for 7B model. (4) HiFT enables full-parameter fine-tuning of a 7B model on single 48G A6000 with a precision of 32 using the AdamW optimizer, without using any memory saving techniques.

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

↑