LLaVA-MoLE: Sparse Mixture of LoRA Experts for Mitigating Data Conflicts in Instruction Finetuning MLLMs
作者: Shaoxiang Chen, Zequn Jie, Lin Ma
分类: cs.CV
发布日期: 2024-01-29 (更新: 2024-01-30)
💡 一句话要点
提出稀疏LoRA专家混合模型以解决指令微调中的数据冲突问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 多模态大语言模型 指令微调 数据冲突 稀疏激活 LoRA专家 Transformer 机器学习 计算机视觉
📋 核心要点
- 现有方法在混合不同领域的指令数据时,容易出现数据冲突,导致模型在特定任务上的性能下降。
- 本文提出了一种稀疏LoRA专家混合(MoLE)设计,通过在MLP层引入LoRA专家,实现对不同领域token的自适应选择。
- 实验结果表明,LLaVA-MoLE在混合数据集上表现优于使用两倍样本的plain-LoRA基线,显著提升了模型性能。
📝 摘要(中文)
在多种图像-文本指令数据上进行指令微调是获得多功能多模态大语言模型(MLLM)的关键。然而,不同领域的指令数据混合时不可避免地会出现数据冲突,导致特定领域任务的性能下降。为了解决这一问题,本文提出了一种高效的专家混合设计,即稀疏LoRA专家混合(MoLE),用于指令微调MLLM。在Transformer层中,我们扩展了流行的低秩适应(LoRA)方法,为MLP层创建了一组LoRA专家,并根据路由函数将每个token路由到最优专家,从而实现对不同领域token的自适应选择。实验表明,LLaVA-MoLE在混合多个不同指令数据集时有效缓解了数据冲突问题,并在强基线plain-LoRA上实现了持续的性能提升。
🔬 方法详解
问题定义:本文旨在解决在指令微调过程中,由于混合不同领域的数据而导致的性能下降问题。现有的LoRA方法在处理数据冲突时表现不佳,无法有效适应多样化的指令数据。
核心思路:提出稀疏LoRA专家混合(MoLE)设计,通过为MLP层创建多个LoRA专家,并根据每个token的特征动态选择最合适的专家,从而实现对不同领域的自适应处理。
技术框架:整体架构包括Transformer层的LoRA专家模块,路由函数用于选择最优专家。每个token在输入时会被路由到其最相关的LoRA专家,确保了模型在不同领域任务中的灵活性和适应性。
关键创新:最重要的创新在于引入了稀疏激活的LoRA专家,使得模型在保持计算效率的同时,能够有效应对数据冲突问题。这一设计与传统的LoRA方法相比,显著提高了模型的适应能力。
关键设计:在模型训练中,采用了特定的路由算法来决定token的专家选择,同时保持训练和推理的计算成本与原始LoRA方法相当。模型的损失函数和网络结构经过精心设计,以支持稀疏激活机制。
🖼️ 关键图片
📊 实验亮点
实验结果显示,LLaVA-MoLE在混合数据集上表现优于plain-LoRA基线,且后者需要使用两倍的样本量才能达到相似的性能。这表明LLaVA-MoLE在处理数据冲突方面具有显著优势,提升幅度明显。
🎯 应用场景
该研究的潜在应用领域包括多模态学习、自然语言处理和计算机视觉等。通过有效解决数据冲突问题,LLaVA-MoLE可在多种任务中提供更高的性能,具有广泛的实际价值和未来影响,尤其是在需要处理多样化数据的场景中。
📄 摘要(原文)
Instruction finetuning on a variety of image-text instruction data is the key to obtaining a versatile Multimodal Large Language Model (MLLM), and different configurations of the instruction data can lead to finetuned models with different capabilities. However, we have discovered that data conflicts are inevitable when mixing instruction data from distinct domains, which can result in performance drops for tasks of a specific domain. To address this issue, we propose to apply an efficient Mixture of Experts (MoE) design, which is a sparse Mixture of LoRA Experts (MoLE) for instruction finetuning MLLMs. Within the Transformer layers, we extend the popular Low-Rank Adaption (LoRA) method by creating a set of LoRA experts specifically for the MLP layer, and route each token to the top-1 expert based on a routing function, allowing adaptive choices for tokens from different domains. Since the LoRA experts are sparsely activated, the training and inference cost are kept roughly constant compared to the original LoRA method. By replacing the plain-LoRA of LLaVA-1.5 with our MoE design, our final model is named LLaVA-MoLE. Extensive experiments proved that LLaVA-MoLE effectively mitigates the data conflict issue when mixing multiple distinct instruction datasets with various configurations, and achieves consistent performance gains over the strong plain-LoRA baselines. Most importantly, on the mixed datasets, LLaVA-MoLE can even outperform the plain-LoRA baseline trained with twice the samples.