[论文解读] LoRA-drop: Efficient LoRA Parameter Pruning based on Output Evaluation
LoRA-drop 提出了一种参数高效的微调方法,通过基于 ΔWx 的范数评估其输出影响,对 LoRA 参数进行剪枝,仅保留高影响层的 LoRA,同时在低影响层之间共享参数。该方法将 LoRA 参数数量减少 50%,同时在 NLU 和 NLG 任务上保持与完整 LoRA 相当的性能。
Low-Rank Adaptation (LoRA) is currently the most commonly used Parameter-efficient fine-tuning (PEFT) method, it introduces auxiliary parameters for each layer to fine-tune the pre-trained model under limited computing resources. However, it still faces resource consumption challenges during training when scaling up to larger models. Most previous studies have tackled this issue by using pruning techniques, which involve removing LoRA parameters deemed unimportant. Nonetheless, these efforts only analyze LoRA parameter features to evaluate their importance, such as parameter count, size, and gradient. In fact, the output of LoRA (product of LoRA parameter and hidden state), directly impacts the final results. Preliminary experiments indicate that a fraction of LoRA elements possesses significantly high output values, substantially influencing the layer output. Motivated by the observation, we propose LoRA-drop. Concretely, LoRA-drop evaluates the importance of LoRA based on the LoRA output. Then we retain LoRA for important layers and the other layers share the same LoRA. We conduct abundant experiments with models of different scales on NLU and NLG tasks. Results demonstrate that LoRA-drop can achieve performance comparable to full fine-tuning and LoRA, while retaining 50\% of the LoRA parameters on average.
研究动机与目标
- 为了解决尽管 LoRA 具有参数效率,但在大模型中仍存在高参数成本的问题。
- 通过识别并剪枝对模型输出贡献最小的 LoRA 参数,进一步提升参数效率。
- 开发一种基于输出影响(ΔWx)而非仅参数特征评估 LoRA 重要性的剪枝策略。
- 通过共享参数化方法,在显著减少可训练 LoRA 参数数量的同时保持模型性能。
提出的方法
- LoRA-drop 通过计算输出 ΔWx 的平方范数来评估每一层 LoRA 的重要性,该值反映了其对冻结模型的影响。
- 在采样的数据集上执行有限次微调更新,以估计 LoRA 参数的输出影响。
- 高重要性层(||ΔWx||² 较大)保留其独立的 LoRA 参数,而低重要性层则共享一组单一的 LoRA 参数。
- 该方法使用阈值 T 根据输出重要性选择前几层,其余层通过共享参数来减少参数数量。
- 共享的 LoRA 参数在微调过程中被更新,且该方法对用于重要性估计的样本比例变化具有鲁棒性。
- 引入超参数 T 以控制保留的 LoRA 层数量,实证验证表明 T=0.9 在性能与效率之间达到最佳平衡。
实验结果
研究问题
- RQ1基于输出影响(ΔWx)的 LoRA 参数剪枝是否能比仅基于参数特征的剪枝实现更好的参数效率?
- RQ2在低影响层之间共享 LoRA 参数是否能在减少可训练参数的同时保持模型性能?
- RQ3重要性估计对用于评估的采样数据集大小的敏感性如何?
- RQ4基于输出的影响力度量是否比随机选择或选择顶层更有效于 LoRA 参数的保留?
- RQ5在性能与参数减少之间,选择高影响力 LoRA 层的最优阈值 T 是多少?
主要发现
- LoRA-drop 在 GLUE 基准测试上实现了与完整 LoRA 相当的性能,同时将 LoRA 参数数量减少 50%。
- 在 RoBERTa-base 上,LoRA-drop 在 RTE 任务上达到 81.4% 的准确率(完整 LoRA 为 80.8%),同时将 LoRA 参数数量减少 50%。
- 该方法在多种 NLU 和 NLG 任务上均保持了强劲性能,包括 STS-B、MRPC、CoLA、SST-2、QNLI、MNLI 和 QQP。
- 消融实验表明,在低重要性层之间共享 LoRA 参数优于直接移除,平均性能提升达 1.2%。
- LoRA 层的重要性排序在不同样本比例下保持稳定,表明对数据采样大小具有鲁棒性。
- 将阈值 T 设为 0.9 可实现最优权衡,保留约一半的 LoRA 层,同时最大化性能。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。