用分块低秩适配让CLIP少调参、少算力,还能跑得快
One Head Eight Arms: Block Matrix based Low Rank Adaptation for CLIP-based Few-Shot Learning
- 将LoRA的矩阵拆成多个子块,共享下投影矩阵
- 仅用单张24GB显卡即可微调CLIP模型
- 相比原版LoRA,泛化误差更小,适合资源受限场景
近期视觉-语言基础模型(VLM)微调方法在少样本学习任务中表现优异,但通常参数量大、计算成本高。本文提出一种基于分块矩阵的低秩适配框架(Block-LoRA),用于在下游少样本任务中微调VLM。受低秩适配(LoRA)启发,Block-LoRA将原始低秩分解矩阵划分为多个子矩阵,并共享所有下投影子矩阵。该结构不仅减少训练参数,还将部分复杂矩阵乘法转化为简单加法,显著降低微调计算开销。值得注意的是,Block-LoRA可在单张24GB GPU上完成CLIP在ImageNet少样本基准上的微调。实验表明,无需额外技巧,Block-LoRA在性能上可媲美现有先进方法,同时保持低参数量和低计算开销,并具有比原版LoRA更紧的泛化误差界。
原文摘要 · Abstract (English)
Recent advancements in fine-tuning Vision-Language Foundation Models (VLMs) have garnered significant attention for their effectiveness in downstream few-shot learning tasks.While these recent approaches exhibits some performance improvements, they often suffer from excessive training parameters and high computational costs. To address these challenges, we propose a novel Block matrix-based low-rank adaptation framework, called Block-LoRA, for fine-tuning VLMs on downstream few-shot tasks. Inspired by recent work on Low-Rank Adaptation (LoRA), Block-LoRA partitions the original low-rank decomposition matrix of LoRA into a series of sub-matrices while sharing all down-projection sub-matrices. This structure not only reduces the number of training parameters, but also transforms certain complex matrix multiplication operations into simpler matrix addition, significantly lowering the computational cost of fine-tuning. Notably, Block-LoRA enables fine-tuning CLIP on the ImageNet few-shot benchmark using a single 24GB GPU. We also show that Block-LoRA has the more tighter bound of generalization error than vanilla LoRA. Without bells and whistles, extensive experiments demonstrate that Block-LoRA achieves competitive performance compared to state-of-the-art CLIP-based few-shot methods, while maintaining a low training parameters count and reduced computational overhead.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。