arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.00419cs.LG
收藏

学习零阶优化器以微调大语言模型

Learning a Zeroth-Order Optimizer for Fine-Tuning LLMs

University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Kairun Zhang, Haoyu Li, Yanjun Zhao, Yifan Sun, Huan Zhang

AI总结:

提出一种基于学习的零阶优化器ZO-Finetuner,通过紧凑且内存高效的设计自动学习高效扰动策略,实现大语言模型微调时避免反向传播并降低内存开销,在4个LLM和7个数据集上82.1%的任务-模型组合中优于现有零阶基线方法。

摘要:

零阶优化器最近成为微调大语言模型(LLM)的一种有吸引力的方法,因为它们避免了反向传播,并且相对于标准一阶训练可以大幅减少内存开销。然而,现有的零阶方法依赖于手工设计的静态采样策略,无法适应模型特定的结构。为了解决这个问题,我们提出了ZO-Finetuner,一种基于学习的零阶优化器,通过紧凑且内存高效的设计自动学习高效的扰动策略。基于少量基础LLM在多个任务上被重复微调这一事实,ZO-Finetuner支持一次性每模型训练,并在下游任务中以最小开销重用。因此,为给定LLM学习一次优化器并在不同下游任务中重用既是可行的也是高度可取的。相应地,ZO-Finetuner旨在通过支持一次性每模型训练且开销最小,将学习优化(L2L)扩展到基础模型时代。在4个LLM和7个数据集上的实验表明,ZO-Finetuner在82.1%的任务-模型组合中优于先前的零阶基线方法,从而展示了其在高效LLM微调中的强大性能和可扩展性。代码可在https://github.com/ASTRAL-Group/ZO_Fine_tuner找到。

英文摘要:

Zeroth-order optimizers have recently emerged as an attractive approach for fine-tuning large language models (LLMs), as they avoid backpropagation and can substantially reduce memory overhead relative to standard first-order training. However, existing zeroth-order methods rely on hand-crafted, static sampling strategies that are not adaptable to model-specific structures. To address this, we propose ZO-Finetuner, a learning-based zeroth-order optimizer for LLMs that automatically learns efficient perturbation strategies through a compact and memory-efficient design. Motivated by the fact that a small set of base LLMs is repeatedly fine-tuned across tasks, ZO-Finetuner supports one-time per-model training and reuse across downstream tasks with minimal overhead. Therefore, learning the optimizer once for a given LLM and reusing it across diverse downstream tasks is both feasible and highly desirable. Accordingly, ZO-Finetuner is designed to scale learning to learn (L2L) to the foundation-model era by supporting one-time per-model training with minimal overhead. Experiments on 4 LLMs and 7 datasets show that ZO-Finetuner outperforms prior zeroth-order baselines in 82.1\% of task-model combinations, thereby demonstrating strong performance and scalability for efficient LLM fine-tuning. The code can be found in https://github.com/ASTRAL-Group/ZO_Fine_tuner.

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

↑