[论文解读] Tuning LayerNorm in Attention: Towards Efficient Multi-Modal LLM Finetuning
本文提出仅微调每个注意力模块中的层归一化(LayerNorm)参数,作为将大型语言模型高效微调为多模态大型语言模型(MLLMs)的一种方法。通过将适应过程建模为领域偏移问题,该方法在性能上可与全参数微调和LoRA相媲美或更优,参数量减少41.9%,GPU显存使用减少17.6%,同时在五个多模态任务上,130亿参数模型的平均性能提升超过20%。
This paper introduces an efficient strategy to transform Large Language Models (LLMs) into Multi-Modal Large Language Models (MLLMs). By conceptualizing this transformation as a domain adaptation process, i.e., transitioning from text understanding to embracing multiple modalities, we intriguingly note that, within each attention block, tuning LayerNorm suffices to yield strong performance. Moreover, when benchmarked against other tuning approaches like full parameter finetuning or LoRA, its benefits on efficiency are substantial. For example, when compared to LoRA on a 13B model scale, performance can be enhanced by an average of over 20% across five multi-modal tasks, and meanwhile, results in a significant reduction of trainable parameters by 41.9% and a decrease in GPU memory usage by 17.6%. On top of this LayerNorm strategy, we showcase that selectively tuning only with conversational data can improve efficiency further. Beyond these empirical outcomes, we provide a comprehensive analysis to explore the role of LayerNorm in adapting LLMs to the multi-modal domain and improving the expressive power of the model.
研究动机与目标
- 为解决微调大型语言模型用于多模态理解时的高计算成本问题。
- 探索参数高效的微调策略,使其性能可与全参数微调和LoRA相媲美或更优。
- 探究归一化层(如LayerNorm)在从文本到多模态理解的领域适应中是否起关键作用。
- 评估数据类型(尤其是对话数据)对微调效率和性能的影响。
- 通过层间相似性与梯度方差分析,研究微调后模型的表达能力与优化动态。
提出的方法
- 在MLLM微调过程中,仅微调每个注意力模块内的LayerNorm参数,其余所有模型组件均保持冻结。
- 将从LLMs到MLLMs的转变建模为领域自适应任务,其中LayerNorm微调有助于有效适应多模态输入。
- 进一步简化为“LayerNorm-simple”方法,即在整个模型中仅训练LayerNorm层,使可训练参数比例降至模型总量的0.004%。
- 结合数据筛选策略,特别是使用对话数据,以进一步提升效率与性能。
- 通过隐藏表示的层间余弦相似度分析模型表达能力,通过梯度方差分析评估优化稳定性。
- 在LLaMA2 13B和7B模型上,基于五个多模态基准对方法进行评估,并与全参数微调和LoRA进行对比。
实验结果
研究问题
- RQ1仅微调注意力模块中的LayerNorm参数,是否能在多模态LLM微调中实现与全参数微调或LoRA相当的强性能?
- RQ2LayerNorm微调是否通过降低层间表示相似度,提升模型表达能力?
- RQ3微调数据的选择(尤其是对话数据)如何影响模型性能与效率?
- RQ4LayerNorm微调的优化行为如何,特别是在训练过程中的梯度方差方面?
- RQ5是否可通过极简的参数更新策略(如仅训练LayerNorm),在显著降低计算成本的前提下实现最先进性能?
主要发现
- 与LoRA相比,仅微调LayerNorm参数在130亿参数模型上,五个多模态任务的平均性能提升超过20%。
- 与LoRA相比,该方法将可训练参数量减少41.9%,GPU显存使用减少17.6%,使消费级GPU上实现高效微调成为可能。
- “LayerNorm-simple”配置下,仅0.004%的参数可训练,其在五个基准上的平均性能比LoRA高出4.3%。
- 仅使用对话数据进行微调,可使模型性能平均提升50%,优于其他数据类型(如详细描述或推理数据)。
- LayerNorm微调模型的平均层间表示相似度比全参数微调模型低10.6%,表明其具有更高的表达能力与更好的泛化性能。
- LayerNorm微调模型的梯度方差显著低于全参数微调,表明其优化过程更稳定,收敛性更优。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。