Skip to main content
QUICK REVIEW

[论文解读] MoRA: High-Rank Updating for Parameter-Efficient Fine-Tuning

Ting Jiang, Shaohan Huang|arXiv (Cornell University)|May 20, 2024
Blind Source Separation TechniquesComputer Science被引用 6
一句话总结

MoRA 引入一种高秩更新机制,使用一个方阵来替代 LoRA 的低秩更新,在同等可训练参数数量下实现更具表达性的更新以对 LLM 进行微调。

ABSTRACT

Low-rank adaptation is a popular parameter-efficient fine-tuning method for large language models. In this paper, we analyze the impact of low-rank updating, as implemented in LoRA. Our findings suggest that the low-rank updating mechanism may limit the ability of LLMs to effectively learn and memorize new knowledge. Inspired by this observation, we propose a new method called MoRA, which employs a square matrix to achieve high-rank updating while maintaining the same number of trainable parameters. To achieve it, we introduce the corresponding non-parameter operators to reduce the input dimension and increase the output dimension for the square matrix. Furthermore, these operators ensure that the weight can be merged back into LLMs, which makes our method can be deployed like LoRA. We perform a comprehensive evaluation of our method across five tasks: instruction tuning, mathematical reasoning, continual pretraining, memory and pretraining. Our method outperforms LoRA on memory-intensive tasks and achieves comparable performance on other tasks.

研究动机与目标

  • 说明 LoRA 在内存密集型和知识记忆任务中对低秩更新的局限性。
  • 提出 MoRA,在相同参数预算下最大化更新的秩。
  • 证明高秩更新可以无损地合并回 LLM 以便部署。
  • 在记忆、指令微调、推理和预训练任务上评估 MoRA。

提出的方法

  • 用一个可训练的方阵 M,大小为 hat{r} x hat{r},替代 LoRA 的 BA 分解,以在 Delta W 中实现更高的秩。
  • 引入非参数算子 f_comp 与 f_decomp 以压缩输入、扩展输出,使 Delta W 能通过 M 在相同参数数量下表示。
  • 提供多种 f_comp/f_decomp 的变体,包括基于截断、分组共享方案,以及基于重塑的方式和旋转灵感增强(类似 RoPE)以提升表达力。
  • 证明 Delta W 可以通过相应的 decomp/comp 变换无损扩展自 M(式 3)。
  • 允许 MoRA 像 LoRA 一样合并回基础模型,部署时无需额外推理时延。

实验结果

研究问题

  • RQ1高秩更新通过方阵是否在记忆密集的学习与记忆任务中优于 LoRA?
  • RQ2MoRA 是否在指令微调与推理任务上能达到与 LoRA 相当的性能,同时在持续预训练与与内存相关任务上具备优势?
  • RQ3如何利用非参数算子操作输入/输出维度来实现高秩更新,而不增加可训练参数?
  • RQ4不同压缩/解压策略(截断、共享、解耦、旋转)对 MoRA 的性能有何影响?
  • RQ5是否可以将高秩更新,与合并再重训练策略(ReMoRA)结合,进一步改善预训练结果?

主要发现

  • MoRA 在指令微调和数学推理任务上与 LoRA 相当。
  • MoRA 在记忆密集型持续预训练和记忆相关领域(生物医学与金融)上优于 LoRA。
  • 高秩更新在 Delta W 中产生的奇异值比低秩更新更显著,與预训练困惑度的改善相关。
  • 不同的解压/压缩选择(尤其旋转基与重塑策略)对性能有影响,旋转通常优于截断。
  • 合并再重训练(ReMoRA)相较 ReLoRA 进一步改善了预训练结果,证明在训练时提高 Delta W 的秩的好处。
  • 在记忆任务上,MoRA 使用更高秩(r=256)达到接近 FFT 的记忆性能,并且在同一参数预算下优于 LoRA。

阅读本论文

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

在 Nubint 中阅读本论文

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