Sparse Low-rank Adaptation of Pre-trained Language Models

📄 arXiv: 2311.11696v1 📥 PDF

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

分类: cs.CL, cs.AI, cs.LG

发布日期: 2023-11-20

备注: Accepted to EMNLP 2023 (Main Conference)


💡 一句话要点

提出稀疏低秩适应方法以提升预训练语言模型的参数效率

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 低秩适应 稀疏学习 预训练模型 参数效率 自然语言处理

📋 核心要点

  1. 现有的低秩适应方法(LoRA)使用固定的内在秩,限制了其灵活性和适应性。
  2. 本文提出的稀疏低秩适应(SoRA)方法,通过动态调整内在秩,增强了模型的表示能力。
  3. 实验结果显示,SoRA在保留70%参数的情况下,仍能超越其他基线,提升了训练效率和模型性能。

📝 摘要(中文)

在参数高效的预训练大型语言模型微调中,低秩适应(LoRA)方法因其有效性而受到广泛关注。然而,LoRA使用固定的内在秩,可能并非最佳选择。为此,本文提出了一种创新的稀疏低秩适应(SoRA)方法,允许在适应过程中动态调整内在秩。通过在训练阶段引入优化的门控单元,控制秩的稀疏性,并在推理阶段消除零秩对应的参数块,从而实现更优的表示能力。实验结果表明,SoRA在保留70%参数和训练时间的情况下,能够超越其他基线方法。

🔬 方法详解

问题定义:本文旨在解决现有低秩适应方法(LoRA)在微调预训练语言模型时的灵活性不足问题。LoRA使用固定的内在秩,可能无法适应不同任务的需求。

核心思路:提出稀疏低秩适应(SoRA)方法,允许在适应过程中动态调整内在秩。通过引入门控单元,控制秩的稀疏性,从而增强模型的表示能力。

技术框架:SoRA方法包括两个主要阶段:训练阶段和推理阶段。在训练阶段,使用优化的门控单元来动态调整内在秩;在推理阶段,去除零秩对应的参数块,简化模型。

关键创新:SoRA的主要创新在于动态调整内在秩的能力,使得模型在适应过程中更加灵活。这一设计与传统的固定秩方法形成了鲜明对比。

关键设计:在训练过程中,采用近端梯度法优化门控单元,控制秩的稀疏性。此外,设计了稀疏调度器,以研究非零参数数量对模型记忆和泛化能力的影响。实验中,SoRA在参数和训练时间上均表现出显著的效率提升。

🖼️ 关键图片

img_0

📊 实验亮点

实验结果表明,SoRA在保留70%参数和训练时间的情况下,能够超越其他基线方法,显示出更强的模型性能。这一结果验证了SoRA在参数效率和训练效率上的显著优势。

🎯 应用场景

该研究的潜在应用领域包括自然语言处理、对话系统和文本生成等。通过提高预训练语言模型的参数效率,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.