Fine-tuning large language models (LLMs) achieves strong performance but is often limited by the memory overhead of backpropagation. Zeroth-order (ZO) optimization avoids this overhead by estimating gradients through forward passes alone, yet it typically converges slowly because random Gaussian perturbations yield high-variance gradient estimates in high-dimensional parameter spaces. In this paper, we propose a plug-and-play framework that turns random perturbations into more effective descent directions. The key idea is to draw a small pool of candidate perturbations, evaluate their loss values, and then select or combine those that are best aligned with the optimization objective. We develop two instantiations of this idea: MeZO-GV, which forms a guiding vector from the contrast between low-loss and high-loss perturbation groups, and MeZO-Greedy, which keeps the single best perturbation within a fixed evaluation budget. We theoretically show that both strategies yield a larger per-step reduction in the objective than standard ZO estimation, leading to improved convergence rates. Experiments on LLMs of different scales and architectures confirm that the proposed methods integrate naturally with existing ZO optimizers and consistently improve convergence speed and task accuracy. On OPT-13B, our approach outperforms all ZO baselines across 11 benchmarks and exceeds gradient-based methods on 9 of them, while retaining the memory efficiency of forward-only optimization.


翻译:微调大语言模型(LLMs)性能强劲,但常受限于反向传播的内存开销。零阶优化通过仅需前向传播估计梯度来规避此开销,然而,由于高维参数空间中随机高斯扰动产生高方差梯度估计,其收敛速度通常缓慢。本文提出一种即插即用框架,将随机扰动转化为更有效的下降方向。核心思想是抽取少量候选扰动,评估其损失值,然后选择或组合那些与优化目标最一致的扰动。我们开发了该思想的两种实现:MeZO-GV,通过低损失与高损失扰动组的对比形成引导向量;以及MeZO-Greedy,在固定评估预算内保留单一最优扰动。我们理论上证明,两种策略在目标函数上每步的降低幅度均大于标准零阶估计,从而提升收敛速率。在不同规模和架构的LLMs上的实验证实,所提方法能自然地与现有零阶优化器集成,并持续提升收敛速度和任务精度。在OPT-13B上,我们的方法在11个基准测试中超越所有零阶基线,并在其中9个上超过基于梯度的方法,同时保持前向优化专属的内存效率。

0
下载
关闭预览

相关内容

什么是后训练?大语言模型训练后优化方法综述,87页pdf
图像降噪算法介绍及实现汇总
极市平台
26+阅读 · 2018年1月3日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Instruction Tuning for Large Language Models: A Survey
Arxiv
15+阅读 · 2023年8月21日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
4+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
6+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
3+阅读 · 6月17日
相关VIP内容
什么是后训练?大语言模型训练后优化方法综述,87页pdf
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员