TY - JOUR
T1 - Revisiting Zeroth-Order Optimization for Memory-Efficient LLM Fine-Tuning
T2 - 41st International Conference on Machine Learning, ICML 2024
AU - Zhang, Yihua
AU - Li, Pingzhi
AU - Hong, Junyuan
AU - Li, Jiaxiang
AU - Zhang, Yimeng
AU - Zheng, Wenqing
AU - Chen, Pin Yu
AU - Lee, Jason D.
AU - Yin, Wotao
AU - Hong, Mingyi
AU - Wang, Zhangyang
AU - Liu, Sijia
AU - Chen, Tianlong
N1 - Publisher Copyright:
Copyright 2024 by the author(s)
PY - 2024
Y1 - 2024
N2 - In the evolving landscape of natural language processing (NLP), fine-tuning pre-trained Large Language Models (LLMs) with first-order (FO) optimizers like SGD and Adam has become standard.Yet, as LLMs grow in size, the substantial memory overhead from back-propagation (BP) for FO gradient computation presents a significant challenge.Addressing this issue is crucial, especially for applications like on-device training where memory efficiency is paramount.This paper proposes a shift towards BP-free, zeroth-order (ZO) optimization as a solution for reducing memory costs during LLM fine-tuning, building on the initial concept introduced by Malladi et al.(2023).Unlike traditional ZO-SGD methods, our work expands the exploration to a wider array of ZO optimization techniques, through a comprehensive, first-of-its-kind benchmarking study across five LLM families (Roberta, OPT, LLaMA, Vicuna, Mistral), three task complexities, and five fine-tuning schemes.Our study unveils previously overlooked optimization principles, highlighting the importance of task alignment, the role of the forward gradient method, and the balance between algorithm complexity and fine-tuning performance.We further introduce novel enhancements to ZO optimization, including block-wise descent, hybrid training, and gradient sparsity.Our study offers a promising direction for achieving further memory-efficient LLM fine-tuning.Codes to reproduce all our experiments are at https://github.com/ZO-Bench/ZO-LLM.
AB - In the evolving landscape of natural language processing (NLP), fine-tuning pre-trained Large Language Models (LLMs) with first-order (FO) optimizers like SGD and Adam has become standard.Yet, as LLMs grow in size, the substantial memory overhead from back-propagation (BP) for FO gradient computation presents a significant challenge.Addressing this issue is crucial, especially for applications like on-device training where memory efficiency is paramount.This paper proposes a shift towards BP-free, zeroth-order (ZO) optimization as a solution for reducing memory costs during LLM fine-tuning, building on the initial concept introduced by Malladi et al.(2023).Unlike traditional ZO-SGD methods, our work expands the exploration to a wider array of ZO optimization techniques, through a comprehensive, first-of-its-kind benchmarking study across five LLM families (Roberta, OPT, LLaMA, Vicuna, Mistral), three task complexities, and five fine-tuning schemes.Our study unveils previously overlooked optimization principles, highlighting the importance of task alignment, the role of the forward gradient method, and the balance between algorithm complexity and fine-tuning performance.We further introduce novel enhancements to ZO optimization, including block-wise descent, hybrid training, and gradient sparsity.Our study offers a promising direction for achieving further memory-efficient LLM fine-tuning.Codes to reproduce all our experiments are at https://github.com/ZO-Bench/ZO-LLM.
UR - http://www.scopus.com/inward/record.url?scp=85203821185&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85203821185&partnerID=8YFLogxK
M3 - Conference article
AN - SCOPUS:85203821185
SN - 2640-3498
VL - 235
SP - 59173
EP - 59190
JO - Proceedings of Machine Learning Research
JF - Proceedings of Machine Learning Research
Y2 - 21 July 2024 through 27 July 2024
ER -