Skip to main content
QUICK REVIEW

[论文解读] DoRA: Weight-Decomposed Low-Rank Adaptation

Shih-Yang Liu, Chien-Yi Wang|arXiv (Cornell University)|Feb 14, 2024
Advanced Vision and ImagingComputer Science被引用 37
一句话总结

DoRA 将预训练权重分解为量级与方向,并使用 LoRA 进行方向性更新,在不产生额外推理成本的情况下实现类似于完全微调的学习,并在 NLP 与视觉-语言任务上超越 LoRA。

ABSTRACT

Among the widely used parameter-efficient fine-tuning (PEFT) methods, LoRA and its variants have gained considerable popularity because of avoiding additional inference costs. However, there still often exists an accuracy gap between these methods and full fine-tuning (FT). In this work, we first introduce a novel weight decomposition analysis to investigate the inherent differences between FT and LoRA. Aiming to resemble the learning capacity of FT from the findings, we propose Weight-Decomposed Low-Rank Adaptation (DoRA). DoRA decomposes the pre-trained weight into two components, magnitude and direction, for fine-tuning, specifically employing LoRA for directional updates to efficiently minimize the number of trainable parameters. By employing \ours, we enhance both the learning capacity and training stability of LoRA while avoiding any additional inference overhead. \ours~consistently outperforms LoRA on fine-tuning LLaMA, LLaVA, and VL-BART on various downstream tasks, such as commonsense reasoning, visual instruction tuning, and image/video-text understanding. Code is available at https://github.com/NVlabs/DoRA.

研究动机与目标

  • 激发人们更深入地理解为何 LoRA 在容量方面落后于 FT,尽管 PEFT 有所收益。
  • 引入一个权重分解框架,在权重更新中分离量级和方向。
  • 提出 DoRA,在对方向分量应用 LoRA 的同时对量级进行微调,以缩小 FT 与 LoRA 之间的差距。
  • 在 NLP 与视觉-语言基准测试中展示 DoRA 的有效性,且不增加推理成本。

提出的方法

  • 使用基于列范数的权重分解,将预训练权重重新参数化为量级和方向分量。
  • 对方向分量应用 LoRA 风格的低秩更新,同时将量级分量视为可训练。
  • 证明 DoRA 的梯度动力学比 LoRA 更像 FT,包括量级与方向更新之间的负相关。
  • 可选地将更新后方向向量的范数从梯度中分离,以在反向传播时减少内存。
  • 通过形成 DVoRA 并比较性能,展示与其他 LoRA 变体(如 VeRA)兼容性。
  • 提供关于训练内存、秩设置和调优粒度的消融研究,以验证稳定性和效率。

实验结果

研究问题

  • RQ1在通过权重幅值与方向来观察时,LoRA 与完整微调(FT)在学习模式上有何不同?
  • RQ2在不增加推理成本的情况下,权重分解方法(DoRA)能否弥合 LoRA 与 FT 之间的容量差距?
  • RQ3在对方向分量应用 LoRA 并微调量级时,是否提高了 NLP 与视觉-语言任务的学习容量?
  • RQ4DoRA 是否与其他 LoRA 变体兼容,并在不同的秩和数据环境下具有鲁棒性?

主要发现

  • DoRA 在 LLaMA-7B/13B 上的常识推理(例如 +3.4 / +1.0)及其他任务中始终优于 LoRA。
  • 在 LLaVA-1.5-7B 上,DoRA 在视觉指令微调方面平均比 LoRA 提升 +0.6,较 FT 提升 +1.1。
  • DoRA 在 VL-BART 的图像/视频文本理解方面,在 VQA/GQA/NVLR2/COCO Cap 任务上相对于 LoRA 的增益为 +0.9 / +1.9。
  • DoRA 实现 FT 类学习模式(量级-方向更新的负相关斜率),且保持无额外推理延迟。
  • 在应用梯度分离修改时,DoRA 的反向传播训练内存可分别降低约 24.4%(LLaMA-7B)和 12.4%(VL-BART),且精度损失可忽略。
  • DoRA 与 VeRA 组合为 DVoRA,在 LLaMA-7B 与 LLaMA2-7B 上相较 VeRA/LoRA 显示出一致的改进,且具有相似或更少的可训练参数。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。