arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.11696cs.CLcs.AIcs.LG
收藏

预训练语言模型的稀疏低秩微调

Sparse Low-rank Adaptation of Pre-trained Language Models

Tsinghua University(清华大学);The University of Chicago(芝加哥大学);BNRIST, IAI, Tsinghua University(清华大学BNRIST、IAI)

Ning Ding, Xingtai Lv, Qiaosen Wang, Yulin Chen, Bowen Zhou, Zhiyuan Liu, Maosong Sun

AI总结:

提出稀疏低秩微调方法SoRA,通过近端梯度法优化的门控单元动态调整本征秩,在推理时消除冗余参数,以更高秩初始化增强表示能力,在保留70%参数和训练时间下优于基线方法。

摘要:

以参数高效的方式微调预训练大语言模型因其有效性和高效性而被广泛研究。流行的低秩微调方法提供了一种显著的途径,假设微调过程本质上是低维的。尽管低秩微调展现出了值得称赞的性能,但它在实现时使用了一个固定且不可改变的本征秩,这可能并不总是理想的选择。认识到需要更灵活的微调,我们将低秩微调的方法扩展为一种我们称之为稀疏低秩微调的创新方法,该方法能够在微调过程中对本征秩进行动态调整。我们通过在训练阶段引入一个使用近端梯度法优化的门控单元来实现这一点,在门控的稀疏性下控制秩的基数。在随后的推理阶段,我们消除对应于被置零秩的参数块,将每个 SoRA 模块还原为一个简洁但秩最优的 LoRA。我们的方法通过以更高的秩初始化来增强 LoRA 的表示能力,同时通过以稀疏方式更新,高效地驯服暂时增加的参数数量。我们进一步为 SoRA 引入了一个稀疏化调度器,旨在研究非零参数数量对模型记忆和泛化能力的影响。我们的实验结果表明,即使保留 70% 的参数和 70% 的训练时间,SoRA 也能优于其他基线方法。

英文摘要:

Fine-tuning pre-trained large language models in a parameter-efficient manner is widely studied for its effectiveness and efficiency. The popular method of low-rank adaptation (LoRA) offers a notable approach, hypothesizing that the adaptation process is intrinsically low-dimensional. Although LoRA has demonstrated commendable performance, it is implemented with a fixed and unalterable intrinsic rank that might not always be the ideal choice. Recognizing the need for more flexible adaptation, we extend the methodology of LoRA to an innovative approach we call sparse low-rank adaptation (SoRA) that enables dynamic adjustments to the intrinsic rank during the adaptation process. We achieve this through the incorporation of a gate unit optimized with proximal gradient method in the training stage, controlling the cardinality of rank under the sparsity of the gate. In the subsequent inference stage, we eliminate the parameter blocks corresponding to the zeroed-out ranks, to reduce each SoRA module back to a concise yet rank-optimal LoRA. Our approach strengthens the representation power of LoRA by initializing it with a higher rank, while efficiently taming a temporarily increased number of parameters via updating in a sparse way. We further introduce a sparsifying scheduler for SoRA, aiming to examine the impact of the number of non-zero parameters on the model's memorization and generalization. Our experimental results demonstrate that SoRA can outperform other baselines even with 70% retained parameters and 70% training time.

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

↑