ZO-AdaMU Optimizer: Adapting Perturbation by the Momentum and Uncertainty in Zeroth-order Optimization

Shuoran Jiang, Qingcai Chen, Youchen Pan, Yang Xiang, Yukang Lin +3 more
12/23/2023
cs.LG

No official code found. Best implementation: MathIsAll/ZO-AdaMU (15 stars, last commit 2023-12-12).

Abstract

Lowering the memory requirement in full-parameter training on large models has become a hot research area. MeZO fine-tunes the large language models (LLMs) by just forward passes in a zeroth-order SGD optimizer (ZO-SGD), demonstrating excellent performance with the same GPU memory usage as inference. However, the simulated perturbation stochastic approximation for gradient estimate in MeZO leads to severe oscillations and incurs a substantial time overhead. Moreover, without momentum regularization, MeZO shows severe over-fitting problems. Lastly, the perturbation-irrelevant momentum on ZO-SGD does not improve the convergence rate. This study proposes ZO-AdaMU to resolve the above problems by adapting the simulated perturbation with momentum in its stochastic approximation. Unlike existing adaptive momentum methods, we relocate momentum on simulated perturbation in stochastic gradient approximation. Our convergence analysis and experiments prove this is a better way to improve convergence stability and rate in ZO-SGD. Extensive experiments demonstrate that ZO-AdaMU yields better generalization for LLMs fine-tuning across various NLP tasks than MeZO and its momentum variants.

View on arXivView PDF

Code Implementations(1)

MathIsAll/ZO-AdaMUCommunity100%

This project is a implementation in PyTorch for ZO-AdaMU optimization: Adapting Perturbation with the Momentum and Uncertainty in Zeroth-order Optimization.

153Shell, PythonDec 12, 20232 years ago

Similar Papers

Cite this paper

@article{jiang2023zoadamu,
  title  = {ZO-AdaMU Optimizer: Adapting Perturbation by the Momentum and Uncertainty in Zeroth-order Optimization},
  author = {Shuoran Jiang and Qingcai Chen and Youchen Pan and Yang Xiang and Yukang Lin and Xiangping Wu and Chuanyi Liu and Xiaobao Song},
  year   = {2023},
  eprint = {2312.15184},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.15184v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.15184.svg)](https://codeofpaper.com/paper/2312.15184)

Discussion