Fine-tuning language models (LMs) with the Adam optimizer often demands excessive memory, limiting accessibility. The "in-place" version of Stochastic Gradient Descent (IP-SGD) and Memory-Efficient Zeroth-order Optimizer (MeZO) have been proposed to address this. However, IP-SGD still requires substantial memory, and MeZO suffers from slow convergence and degraded final performance due to its zeroth-order nature. This paper introduces Addax, a novel method that improves both memory efficiency and performance of IP-SGD by integrating it with MeZO. Specifically, Addax computes zeroth- or first-order gradients of data points in the minibatch based on their memory consumption, combining these gradient estimates to update directions. By computing zeroth-order gradients for data points that require more memory and first-order gradients for others, Addax overcomes the slow convergence of MeZO and the excessive memory requirement of IP-SGD. Additionally, the zeroth-order gradient acts as a regularizer for the first-order gradient, further enhancing the model's final performance. Theoretically, we establish the convergence of Addax under mild assumptions, demonstrating faster convergence and less restrictive hyper-parameter choices than MeZO. Our experiments with diverse LMs and tasks show that Addax consistently outperforms MeZO regarding accuracy and convergence speed while having a comparable memory footprint. When fine-tuning OPT-13B with one A100 GPU, on average, Addax outperforms MeZO in accuracy/F1 score by 14% and runs 15x faster while using memory similar to MeZO. In our experiments on the larger OPT-30B model, on average, Addax outperforms MeZO in terms of accuracy/F1 score by >16 and runs 30x faster on a single H100 GPU. Moreover, Addax surpasses the performance of standard fine-tuning approaches, such as IP-SGD and Adam, in most tasks with significantly less memory requirement.
Improved Zeroth-Order Variance Reduced Algorithms and Analysis for Nonconvex Optimization
The Ohio State University(俄亥俄州立大学);Duke University(杜克大学)
基于一阶技术SVRG和SARAH/SPIDER,最近分别设计了两类求解非凸优化问题的零阶随机算法。本文讨论了几个重要的问题,这些方法仍然是开放的。首先,所有现有的SVRG型零阶算法遭受更差的函数查询复杂度比零阶梯度下降(ZO-GD)或随机梯度下降(ZO-SGD)。在本文中,我们提出了一种新算法ZO-SVRG-Coord-Rand,并对Liu et al. 2018 b中提出的现有ZO-SVRG-Coord算法进行了新的分析,并表明ZO-SVRG-Coord-Rand和ZO-SVRG-Coord(在我们的新分析下)优于其他现有的SVRG型零阶方法以及ZO-GD和ZO-SGD。其次,现有的SPIDER型算法SPIDER-SZO(Fang et al. 2018)具有优越的理论性能,但在实践中会产生大量高斯随机变量以及$\sqrtε$级步长。在本文中,我们开发了一个新的算法ZO-SPIDER-Coord,这是免费的高斯变量的生成,并允许一个大的常数步长,同时保持相同的收敛速度和查询复杂度,我们进一步表明,ZO-SPIDER-Coord自动实现线性收敛速度,因为搜索器进入一个本地PL区域没有重新启动和算法修改。
Revisiting Zeroth-Order Optimization for Memory-Efficient LLM Fine-Tuning: A Benchmark
Michigan State University(密歇根州立大学);The University of North Carolina at Chapel Hill(北卡罗来纳大学教堂山分校);UT Austin(德克萨斯大学奥斯汀分校);University of Minnesota Twin Cities(明尼苏达大学双城分校);IBM Research(IBM研究院);Princeton University(普林斯顿大学);DAMO Academy, Alibaba Group(阿里巴巴达摩院);MIT(麻省理工学院);Harvard University(哈佛大学)
Zeroth-Order Negative Curvature Finding: Escaping Saddle Points without Gradients
Nanjing University of Information Science & Technology(南京信息工程大学);Harbin Institute of Technology(哈尔滨工业大学);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学)
TeZO: Empowering the Low-Rankness on the Temporal Dimension in the Zeroth-Order Optimization for Fine-tuning LLMs
Faculty of Engineering, The University of Sydney(悉尼大学工程学院);School of Cyber Science and Technology, Shenzhen Campus of Sun Yat-sen University(中山大学深圳校区网络与空间安全学院)
Zeroth-Order Fine-Tuning of LLMs in Random Subspaces
Beijing Normal University(北京师范大学);Singapore Management University(新加坡国立大学);TAL Education Group(TAL教育集团);Engineering Research Center of Intelligent Technology and Educational Application (MOE)(智能技术与教育应用工程研究中心(教育部))
Differentially Private Zeroth-Order Methods for Scalable Large Language Model Finetuning
Zhejiang University(浙江大学);Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security(杭州高新区(滨江)区块链与数据安全研究院);University of Chicago(芝加哥大学)
Communication-Efficient and Differentially Private Vertical Federated Learning with Zeroth-Order Optimization
Elmore Family School of Electrical and Computer Engineering, Purdue University(电气与计算机工程学院,普渡大学);Department of Computer Science and Engineering, Yonsei University(计算机科学与工程系,延世大学)
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(慕尼黑大学信息学研究所)