arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.07802cs.LGcs.AIcs.CL
收藏

ROSA:用于高效微调的随机子空间适配

ROSA: Random Subspace Adaptation for Efficient Fine-Tuning

Université de Montréal(蒙特利尔大学);Mila(米拉研究所);McGill University(麦吉尔大学)

Marawan Gamal Abdel Hameed, Aristides Milios, Siva Reddy, Guillaume Rabusseau

AI总结:

针对现有参数高效微调方法推理延迟高或性能不足的问题,提出随机子空间适配ROSA,可适配任意大维度子空间,表达能力强于LoRA且推理零延迟,在NLP任务上性能更优。

摘要:

与推理相比,模型训练需要的内存要多得多。参数高效微调(PEFT)方法提供了一种用更少内存使大模型适配下游任务的途径。然而,现有方法如适配器(adapters)、提示调优(prompt tuning)或低秩适配(LoRA),要么在推理时引入延迟开销,要么下游性能不如全量微调。本研究中我们提出随机子空间适配(ROSA),该方法性能显著优于此前的PEFT方法,同时推理时零延迟开销。与此前方法不同,ROSA能够适配任意大维度的子空间,更好地近似全量微调。我们从理论和实验两方面证明,这使得ROSA的表达能力严格强于LoRA,且运行时不消耗额外内存。由于PEFT方法在自然语言处理领域尤其有用——该领域模型规模极大,全量微调成本极高——我们在两种常见NLP场景下评估ROSA:分别用GPT-2和RoBERTa开展自然语言生成(NLG)和自然语言理解(NLU)任务。结果显示,在几乎所有GLUE任务上ROSA都显著优于LoRA,在NLG任务上也优于LoRA。我们的代码可在https://github.com/rosa-paper/rosa获取。

英文摘要:

Model training requires significantly more memory, compared with inference. Parameter efficient fine-tuning (PEFT) methods provide a means of adapting large models to downstream tasks using less memory. However, existing methods such as adapters, prompt tuning or low-rank adaptation (LoRA) either introduce latency overhead at inference time or achieve subpar downstream performance compared with full fine-tuning. In this work we propose Random Subspace Adaptation (ROSA), a method that outperforms previous PEFT methods by a significant margin, while maintaining a zero latency overhead during inference time. In contrast to previous methods, ROSA is able to adapt subspaces of arbitrarily large dimension, better approximating full-finetuning. We demonstrate both theoretically and experimentally that this makes ROSA strictly more expressive than LoRA, without consuming additional memory during runtime. As PEFT methods are especially useful in the natural language processing domain, where models operate on scales that make full fine-tuning very expensive, we evaluate ROSA in two common NLP scenarios: natural language generation (NLG) and natural language understanding (NLU) with GPT-2 and RoBERTa, respectively. We show that on almost every GLUE task ROSA outperforms LoRA by a significant margin, while also outperforming LoRA on NLG tasks. Our code is available at https://github.com/rosa-paper/rosa

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

↑