Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

AdaMeZO: Adam-style Zeroth-Order Optimizer for LLM Fine-tuning Without Maintaining the Moments

About

Fine-tuning LLMs is necessary for various dedicated downstream tasks, but classic backpropagation-based fine-tuning methods require substantial GPU memory. To this end, a recent work, MeZO, which relies solely on forward passes to fine-tune LLMs, significantly reduces GPU requirements at the cost of slower convergence due to its indifference to loss landscapes. Standard solutions, such as Adam, explore loss landscapes by estimating the first- and second-order moments and storing them in memory to guide the model's movement through dimensions with lower curvature and vice versa. However, directly applying Adam negates MeZO's advantage as it will triple the memory requirement. In light of this, we propose AdaMeZO, a zeroth-order optimizer that leverages Adam-style first- and second-moment estimates without maintaining them in memory. We present a theoretical analysis of AdaMeZO, corroborated by extensive experiments demonstrating AdaMeZO's performance, showing that AdaMeZO can outperform MeZO while requiring up to $70\%$ fewer forward passes. Trajectory visualizations affirm AdaMeZO's ability to adapt to diverse loss landscapes.

Zhijie Cai, Haolong Chen, Guangxu Zhu• 2026

Related benchmarks

TaskDatasetResultRank
ClassificationOPT Language Tasks 1.3B
SST-2 Accuracy91.6
6
Language Understanding and GenerationLLaMA3-3B Language Tasks Suite (SST-2, RTE, CB, BoolQ, WSC, WIC, MultiRC, COPA, ReCoRD, SQuAD, DROP)
SST-2 Accuracy92.6
6
Language Understanding and GenerationLanguage Tasks Suite (SST-2, RTE, CB, BoolQ, WSC, WIC, MultiRC, COPA, ReCoRD, SQuAD, DROP) OPT-13B (test)
SST-2 Accuracy92.7
6
GenerationOPT 1.3B Generation
SQuAD Score76.1
6
Multiple-ChoiceOPT Language Tasks Multiple Choice 1.3B
COPA Score75.5
6
Natural Language ProcessingLLaMA Language Task Suite (SST-2, RTE, CB, BoolQ, WSC, WiC, MultiRC, COPA, ReCoRD, SQuAD, DROP) 7B
SST-2 Accuracy91.4
6
Few-shot Language UnderstandingLanguage tasks (SST-2, SST-5, SNLI, MNLI, RTE, TREC) few-shot k=16
Accuracy (SST-2)90.9
5
Optimizer Property ComparisonGeneral Theoretical Analysis
FLOPs per Step2
5
Natural Language UnderstandingSST-2, WSC, WiC, COPA
SST-2 Accuracy91.1
3
Showing 9 of 9 rows

Other info

Follow for update