用共享子空间替换LoRA的矩阵B,让微调更高效
CoRA: Optimizing Low-Rank Adaptation with Common Subspace of Large Language Models
- 用大模型共享子空间替代LoRA的矩阵B,减少参数量
- 冻结替换后的B矩阵,训练量减半仍保持原有效果
- 新方法在相同参数下比原始LoRA表现更好
在微调大语言模型时,在有限计算资源下保持高效与性能至关重要。低秩适应(LoRA)通过减少可训练参数和计算成本,平衡了效率与效果。然而,现有研究多关注微调方法,对进一步压缩LoRA的关注不足,其多数参数可能冗余,造成资源浪费。本文提出CoRA:利用大模型的共享子空间替代LoRA的矩阵$B$。该方法包含两步:(1) 冻结替换后的$B$矩阵,仅训练矩阵$A$,实现参数减半且保持原有性能;(2) 将替换的$B$作为原始$B$的初始化状态,在相同参数量下提升性能。实验表明,第一种方法在参数减半的情况下仍达到与原始LoRA相当的效果;第二种方法在相同参数量下优于原始LoRA。结果验证了方法的有效性。
原文摘要 · Abstract (English)
In fine-tuning large language models (LLMs), conserving computational resources while maintaining effectiveness and improving outcomes within the same computational constraints is crucial. The Low-Rank Adaptation (LoRA) strategy balances efficiency and performance in fine-tuning large models by reducing the number of trainable parameters and computational costs. However, current advancements in LoRA might be focused on its fine-tuning methodologies, with not as much exploration as might be expected into further compression of LoRA. Since most of LoRA's parameters might still be superfluous, this may lead to unnecessary wastage of computational resources. In this paper, we propose \textbf{CoRA}: leveraging shared knowledge to optimize LoRA training by substituting its matrix $B$ with a common subspace from large models. Our two-fold method includes (1) Freezing the substitute matrix $B$ to halve parameters while training matrix $A$ for specific tasks and (2) Using the substitute matrix $B$ as an enhanced initial state for the original matrix $B$, achieving improved results with the same parameters. Our experiments show that the first approach achieves the same efficacy as the original LoRA fine-tuning while being more efficient than halving parameters. At the same time, the second approach has some improvements compared to LoRA's original fine-tuning performance. They generally attest to the effectiveness of our work.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。