在SignSGD和Muon中利用坐标动量:内存优化的零阶方法
Leveraging Coordinate Momentum in SignSGD and Muon: Memory-Optimized Zero-Order
AI总结:
本文提出两种零阶优化算法JAGUAR SignSGD和JAGUAR Muon,利用坐标动量,在内存高效的前提下达到与一阶方法相当的收敛质量,适用于资源受限的LLM微调。
摘要:
微调大型语言模型(LLMs)对于将预训练模型适应下游任务至关重要。然而,传统的二阶优化器如随机梯度下降(SGD)和Adam会带来难以承受的内存和计算成本,这些成本随模型规模扩大而急剧增加。在本文中,我们研究了零阶(ZO)优化方法作为一种内存和计算高效的替代方案,特别是在LoRA等参数高效微调技术的背景下。我们提出了JAGUAR SignSGD,一种基于ZO动量的算法,它扩展了ZO SignSGD,所需参数数量与标准ZO SGD相同,且每次迭代仅需O(1)次函数评估。据我们所知,这是第一项在随机ZO情况下为SignSGD建立严格收敛保证的研究。我们进一步提出了JAGUAR Muon,一种新颖的Muon优化器的ZO扩展,它利用了模型参数的矩阵结构,并提供了在任意随机噪声下的收敛速率。通过在具有挑战性的LLM微调基准上进行的大量实验,我们证明了所提出的算法达到或超过了标准一阶方法的收敛质量,实现了显著的内存减少。我们的理论和实证结果确立了新的ZO优化方法作为资源受限LLM适应的一种实用且有理论依据的方法。我们的代码可在https://github.com/brain-mmo-lab/ZO_LLM获取。
英文摘要:
Fine-tuning Large Language Models (LLMs) is essential for adapting pre-trained models to downstream tasks. Yet traditional first-order optimizers such as Stochastic Gradient Descent (SGD) and Adam incur prohibitive memory and computational costs that scale poorly with model size. In this paper, we investigate zero-order (ZO) optimization methods as a memory- and compute-efficient alternative, particularly in the context of parameter-efficient fine-tuning techniques like LoRA. We propose $\texttt{JAGUAR SignSGD}$, a ZO momentum-based algorithm that extends ZO SignSGD, requiring the same number of parameters as the standard ZO SGD and only $\mathcal{O}(1)$ function evaluations per iteration. To the best of our knowledge, this is the first study to establish rigorous convergence guarantees for SignSGD in the stochastic ZO case. We further propose $\texttt{JAGUAR Muon}$, a novel ZO extension of the Muon optimizer that leverages the matrix structure of model parameters, and we provide its convergence rate under arbitrary stochastic noise. Through extensive experiments on challenging LLM fine-tuning benchmarks, we demonstrate that the proposed algorithms meet or exceed the convergence quality of standard first-order methods, achieving significant memory reduction. Our theoretical and empirical results establish new ZO optimization methods as a practical and theoretically grounded approach for resource-constrained LLM adaptation. Our code is available at https://github.com/brain-mmo-lab/ZO_LLM
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。