Higher Layers Need More LoRA Experts

📄 arXiv: 2402.08562v1 📥 PDF

作者: Chongyang Gao, Kezhen Chen, Jinmeng Rao, Baochen Sun, Ruibo Liu, Daiyi Peng, Yawen Zhang, Xiaoyuan Guo, Jie Yang, VS Subrahmanian

分类: cs.CL, cs.AI

发布日期: 2024-02-13

备注: The code is available at https://github.com/GCYZSL/MoLA

🔗 代码/项目: GITHUB


💡 一句话要点

提出MoLA以提升LoRA在Transformer模型中的效率

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

关键词: 参数高效调优 低秩适应 混合专家 Transformer 自然语言处理 模型性能提升

📋 核心要点

  1. 现有的LoRA方法在模型性能提升上效果有限,且与混合专家(MoE)结合的研究仍处于早期阶段。
  2. 本文提出MoLA方法,允许Transformer模型的每一层灵活配置LoRA专家数量,从而提升参数效率。
  3. 实验结果表明,MoLA在多个基准测试中表现优异,特别是在高层分配更多LoRA专家时,模型效果显著提升。

📝 摘要(中文)

参数高效调优(PEFT)技术如低秩适应(LoRA)在大语言模型的训练中提供了效率,但其对模型性能的影响仍然有限。本文提出了一种新颖的参数高效混合专家方法MoE-LoRA与层级专家分配(MoLA),允许每个模型层灵活使用不同数量的LoRA专家。通过在六个知名的自然语言处理和常识问答基准上进行实验,MoLA在性能上与所有基线相当或更优。研究发现,将更多LoRA专家分配给高层可以进一步增强模型的有效性,且在参数数量大幅减少的情况下,优于每层相同数量专家的设置。

🔬 方法详解

问题定义:本文旨在解决现有LoRA方法在模型性能提升上的局限性,尤其是在混合专家架构中的应用效率不足的问题。

核心思路:提出MoLA方法,通过层级专家分配策略,使得每个Transformer层可以根据需要灵活使用不同数量的LoRA专家,从而提升整体模型的表现。

技术框架:MoLA的整体架构包括多个Transformer层,每层根据特定配置选择LoRA专家。该方法通过动态分配专家数量,优化了参数使用效率。

关键创新:MoLA的核心创新在于层级专家分配策略,允许模型在不同层使用不同数量的LoRA专家,这一设计与传统的每层相同数量专家的设置有本质区别。

关键设计:在参数设置上,MoLA允许根据层级特性调整LoRA专家的数量,损失函数设计上则考虑了不同层次的贡献,以确保模型训练的有效性。实验中还探索了多种层级专家配置的架构。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

MoLA在六个自然语言处理和常识问答基准上表现出色,达到了与所有基线相当或更优的性能。特别是,通过将更多LoRA专家分配给高层,模型效果显著提升,且在参数数量上大幅减少,显示出更高的效率。

🎯 应用场景

该研究的潜在应用领域包括自然语言处理、对话系统、智能问答等。通过提升模型的参数效率,MoLA可以在资源受限的环境中实现更高效的模型训练和推理,具有广泛的实际价值和未来影响。

📄 摘要(原文)

Parameter-efficient tuning (PEFT) techniques like low-rank adaptation (LoRA) offer training efficiency on Large Language Models, but their impact on model performance remains limited. Recent efforts integrate LoRA and Mixture-of-Experts (MoE) to improve the performance of PEFT methods. Despite promising results, research on improving the efficiency of LoRA with MoE is still in its early stages. Recent studies have shown that experts in the MoE architecture have different strengths and also exhibit some redundancy. Does this statement also apply to parameter-efficient MoE? In this paper, we introduce a novel parameter-efficient MoE method, \textit{\textbf{M}oE-L\textbf{o}RA with \textbf{L}ayer-wise Expert \textbf{A}llocation (MoLA)} for Transformer-based models, where each model layer has the flexibility to employ a varying number of LoRA experts. We investigate several architectures with varying layer-wise expert configurations. Experiments on six well-known NLP and commonsense QA benchmarks demonstrate that MoLA achieves equal or superior performance compared to all baselines. We find that allocating more LoRA experts to higher layers further enhances the effectiveness of models with a certain number of experts in total. With much fewer parameters, this allocation strategy outperforms the setting with the same number of experts in every layer. This work can be widely used as a plug-and-play parameter-efficient tuning approach for various applications. The code is available at https://github.com/GCYZSL/MoLA.