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

逐层LoRA微调:相似性度量方法

Layer-wise LoRA fine-tuning: a similarity metric approach

Keith Ando Ogawa, Bruno Lopes Yamamoto, Lucas Lauton de Alcantara, Lucas Pellicer, Rosimeire Pereira Costa, Edson Bollis, Anna Helena Reali Costa, Artur Jordao

AI总结:

本文提出逐层LoRA微调方法,通过选择性微调部分层以减少可训练参数并保持预测性能,适用于不同架构和任务。

摘要:

预训练大规模语言模型(LLMs)在网页级数据集上已成为推动通用人工智能发展的基础。相比之下,提高其在下游任务上的预测性能通常需要通过微调来调整其知识。参数高效的微调技术,如低秩适应(LoRA),旨在通过冻结预训练模型并更新少量参数来降低此过程的计算成本。与全量微调相比,这些方法在可训练参数数量上可以减少99%以上,具体取决于配置。然而,这种减少可能在LLMs持续增长的规模下显得不足。在本工作中,我们通过系统地仅选择少数层进行LoRA或其变种的微调来解决这一问题。我们认为并非所有层对模型适应的贡献是均等的。利用这一点,我们通过测量它们对内部表示变化的贡献来识别最相关的层进行微调。我们的方法与现有的低秩适应技术既正交又兼容。我们通过LoRA方法将可训练参数减少多达50%,同时在不同模型和任务上保持预测性能。具体而言,在仅编码器的架构中,这种减少在GLUE基准上的预测性能下降可忽略不计。在仅解码器的架构中,我们在数学问题解决能力和编码任务上实现了小幅下降或甚至提升的预测性能。最后,这种有效性扩展到多模态模型,我们还观察到相对于使用LoRA模块在所有层上的微调具有竞争力的结果。代码可在:https://github.com/c2d-usp/Layer-wise-LoRA-with-CKA。

英文摘要:

Pre-training Large Language Models (LLMs) on web-scale datasets becomes fundamental for advancing general-purpose AI. In contrast, enhancing their predictive performance on downstream tasks typically involves adapting their knowledge through fine-tuning. Parameter-efficient fine-tuning techniques, such as Low-Rank Adaptation (LoRA), aim to reduce the computational cost of this process by freezing the pre-trained model and updating a smaller number of parameters. In comparison to full fine-tuning, these methods achieve over 99\% reduction in trainable parameter count, depending on the configuration. Unfortunately, such a reduction may prove insufficient as LLMs continue to grow in scale. In this work, we address the previous problem by systematically selecting only a few layers to fine-tune using LoRA or its variants. We argue that not all layers contribute equally to the model adaptation. Leveraging this, we identify the most relevant layers to fine-tune by measuring their contribution to changes in internal representations. Our method is orthogonal to and readily compatible with existing low-rank adaptation techniques. We reduce the trainable parameters in LoRA-based techniques by up to 50\%, while maintaining the predictive performance across different models and tasks. Specifically, on encoder-only architectures, this reduction in trainable parameters leads to a negligible predictive performance drop on the GLUE benchmark. On decoder-only architectures, we achieve a small drop or even improvements in the predictive performance on mathematical problem-solving capabilities and coding tasks. Finally, this effectiveness extends to multimodal models, for which we also observe competitive results relative to fine-tuning with LoRA modules in all layers. Code is available at: https://github.com/c2d-usp/Layer-wise-LoRA-with-CKA

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

↑