用超网络加速LoRA动态秩分配,训练更快且不降性能。
HyperAdaLoRA: Accelerating LoRA Rank Allocation During Training via Hypernetworks without Sacrificing Performance
- 通过注意力超网络动态生成SVD参数,替代传统优化。
- 训练收敛速度提升明显,各模型/数据集上性能持平或更优。
- 适用于多种LoRA变体,适合追求高效微调的研究者。
参数高效微调(PEFT),特别是低秩适应(LoRA),已成为减少大语言模型(LLMs)微调时计算与内存开销的有前景方法。然而,LoRA对每个增量矩阵假设统一秩r,未考虑不同模块和层间权重矩阵的重要性差异。AdaLoRA利用奇异值分解(SVD)参数化更新,并通过剪枝奇异值实现动态秩分配,提升适应性。但训练中常出现收敛慢、计算开销高的问题。为此,我们提出HyperAdaLoRA,一种新框架,通过超网络加速AdaLoRA收敛。不同于直接优化SVD的(P, Λ, Q)组件,HyperAdaLoRA基于注意力机制的超网络动态生成这些参数。通过剪枝超网络输出的奇异值,实现动态秩分配。在多个数据集和模型上的全面实验表明,该方法在不牺牲性能的前提下显著加快收敛。此外,对其他基于LoRA的方法的扩展实验验证了其广泛适用性。
原文摘要 · Abstract (English)
Parameter-Efficient Fine-Tuning (PEFT), especially Low-Rank Adaptation (LoRA), has emerged as a promising approach to fine-tuning large language models(LLMs) while reducing computational and memory overhead. However, LoRA assumes a uniform rank \textit{r} for each incremental matrix, not accounting for the varying significance of weight matrices across different modules and layers. AdaLoRA leverages Singular Value Decomposition (SVD) to parameterize updates and employs pruning of singular values to introduce dynamic rank allocation, thereby enhancing adaptability. However, during the training process, it often encounters issues of slow convergence speed and high computational overhead. To address this issue, we propose HyperAdaLoRA, a novel framework that accelerates the convergence of AdaLoRA by leveraging a hypernetwork. Instead of directly optimizing the components of Singular Value Decomposition $(P, Λ, Q)$, HyperAdaLoRA employs a hypernetwork based on attention mechanisms to dynamically generate these parameters. By pruning the outputs of the hypernetwork that generates the singular values, dynamic rank allocation is achieved. Comprehensive experiments on various datasets and models demonstrate that our method achieves faster convergence without sacrificing performance. Additionally, further extension experiments on other LoRA-based approaches validate the broad applicability of our method.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。