Skip to main content
QUICK REVIEW

[论文解读] Higher Layers Need More LoRA Experts

Chongyang Gao, Kezhen Chen|arXiv (Cornell University)|Feb 13, 2024
Domain Adaptation and Few-Shot LearningComputer Science被引用 3
一句话总结

MoLA 提出了一种参数高效的大混合专家(MoE)方法,该方法在 Transformer 层之间动态分配不同数量的 LoRA 专家,表明更高层从额外专家中获益更多。在总专家数量固定的情况下,MoLA 通过减少低层中的冗余并增强高层的表征能力,实现了优于均匀分配和基线方法的性能表现。

ABSTRACT

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, extit{ extbf{M}oE-L extbf{o}RA with extbf{L}ayer-wise Expert extbf{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.

研究动机与目标

  • 为解决参数高效微调(PEFT)方法(如 LoRA)在大语言模型(LLMs)中性能受限的问题。
  • 探究参数高效 MoE 架构中是否存在专家冗余,以及如何缓解该问题。
  • 探索 LoRA-MoE 在各层间最优的专家分配策略,以提升模型的有效性与可扩展性。
  • 开发一种即插即用的 PEFT 方法,在不增加推理成本的前提下提升模型性能。

提出的方法

  • MoLA 通过在每层应用多个低秩适应矩阵(LoRA 专家)并将门控机制(router)用于控制专家使用,将 LoRA 与 MoE 相结合。
  • 每层被分配一个灵活且用户可定义的 LoRA 专家数量,实现分层专家分配。
  • 训练期间冻结预训练模型权重,仅微调 LoRA 专家和路由器。
  • 评估了四种配置:MoLA-△(专家数量随深度递增)、MoLA-▽(递减)、MoLA-⋈(对称)、MoLA-□(均匀),以比较不同分配策略。
  • 该方法使用一个路由器模块,为每个 token 计算专家权重,实现稀疏激活并保证高效推理。
  • 该方法即插即用,兼容多种任务和 LLM 架构,无需修改网络结构。

实验结果

研究问题

  • RQ1在参数高效的 MoE 架构中,专家是否存在冗余,特别是在低层 Transformer 层中?
  • RQ2是否存在一种最优的 LoRA 专家在 Transformer 各层间的分布方式,可提升模型性能?
  • RQ3与均匀分布相比,灵活的分层专家分配策略是否能在相同总专家数下表现更优?
  • RQ4将更多专家分配给高层是否能增强表征能力与模型泛化性能?
  • RQ5在 MoE-LoRA 设置中,不同层的专家冗余程度如何变化?

主要发现

  • MoLA-▽(将更多专家分配给高层)在所有基准测试中均取得最佳性能,优于所有基线模型。
  • 在总专家数量相同的情况下,MoLA 通过优先分配专家给高层,其性能优于均匀分配或低层优先的配置。
  • 低层专家彼此更相似,表明冗余度更高;而高层专家更具多样性且更有效。
  • MoLA 通过将更多专家集中于高层,减少了专家冗余,从而更有效地提升了表征能力。
  • 该方法在显著减少参数量的同时保持高性能,证明了其优越的可扩展性。
  • 消融实验验证了 MoLA 强大的持续学习能力,表明其在增量微调场景中具有鲁棒性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。