用曲率引导的稀疏零阶优化,让大模型微调更快更省显存。
CurvZO: Adaptive Curvature-Guided Sparse Zeroth-Order Optimization for Efficient LLM Fine-Tuning
- 根据每次反馈的曲率信号,动态选择要更新的参数
- 相比基线提升最高4.4分准确率,速度翻倍
- 适合显存受限场景下的大模型高效微调
基于反向传播的大语言模型微调虽性能高,但内存开销大,难以在资源受限设备上扩展。零阶(ZO)优化仅依赖前向传播,内存效率高,但常因梯度估计方差大导致收敛慢或不稳定。稀疏ZO更新通过只扰动部分参数缓解此问题,但如何选择有效参数在ZO中极难,因每次查询仅返回标量反馈。本文提出自适应曲率引导稀疏零阶优化(CurvZO),在线追踪标量反馈中的曲率信号,构建参数级采样分布以选择更新坐标,降低稀疏ZO梯度估计方差。同时,CurvZO动态调整扰动预算,使更新既聚焦又足够探索。在OPT和Llama上跨多种NLP任务的实验表明,CurvZO持续提升微调性能并缩短训练时间:最高提升4.4分准确率,速度提升达2倍,同时保持内存效率。
原文摘要 · Abstract (English)
Fine-tuning large language models (LLMs) with backpropagation achieves high performance but incurs substantial memory overhead, limiting scalability on resource-constrained hardware. Zeroth-order (ZO) optimization provides a memory-efficient alternative by relying solely on forward passes, yet it typically suffers from slow or unstable convergence due to high-variance gradient estimates. Sparse ZO updates partially address this issue by perturbing only a subset of parameters, but their effectiveness hinges on selecting informative parameters, which is challenging in ZO optimization because each query yields only scalar feedback. We propose \textbf{Adaptive Curvature-Guided Sparse Zeroth-Order Optimization (CurvZO)}, which tracks curvature signals online from scalar ZO feedback and leverages these signals to construct a parameter-wise sampling distribution for selecting coordinates at each update, reducing the variance of the sparse ZO gradient estimator. Moreover, CurvZO dynamically adapts the perturbation budget to the evolving curvature signal distribution, yielding sparse ZO updates that remain both focused and sufficiently exploratory. Extensive experiments on OPT and Llama across diverse NLP tasks show that CurvZO consistently improves fine-tuning performance and reduces training time over ZO baselines. It improves accuracy by up to 4.4 points and achieves up to a $2\times$ speedup, while preserving memory efficiency.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。