arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.10174cs.LGcs.AI
收藏

SMILE:从预训练基础模型中构建零样本稀疏低秩专家混合(Sparse Mixture of Low-Rank Experts)

SMILE: Zero-Shot Sparse Mixture of Low-Rank Experts Construction From Pre-Trained Foundation Models

Wuhan University(武汉大学);Sun Yat-sen University(中山大学);JD Explore Academy(京东探索研究院);Beijing Institute of Technology(北京理工大学);Nanyang Technological University(南洋理工大学)

Anke Tang, Li Shen, Yong Luo, Shuai Xie, Han Hu, Lefei Zhang, Bo Du, Dacheng Tao

AI总结:

本文提出零样本稀疏低秩专家混合(SMILE)模型融合方法,通过子空间分析和扩展维度解决参数干扰问题,无需额外数据或训练即可将源模型升级为MoE模型,在图像分类和文本生成等多场景实验中验证了其适应性和可扩展性。

摘要:

在庞大数据集上训练深度模型正变得日益昂贵,这促使深度模型融合技术被广泛采用,以利用已有模型中的知识。从简单的权重平均到更复杂的方法如 AdaMerging,模型融合有效地提升了模型性能并加速了新模型的开发。然而,单个模型参数之间的潜在干扰以及融合过程缺乏可解释性仍然是重大挑战。现有方法通常试图通过评估参数的属性(如其大小或符号)或通过参数剪枝来解决参数干扰问题。在本研究中,我们首先通过子空间分析的视角检查线性层的微调,并将参数干扰显式定义为一个优化问题,以阐明这一主题。随后,我们引入了一种创新的模型融合方法,称为零样本稀疏低秩专家混合(SMILE)构建,该方法允许将源模型升级为 MoE 模型,而无需额外数据或进一步训练。我们的方法基于这样一个观察:微调主要保留了预训练中的重要部分,但它利用不太重要或未使用的区域来适应新任务。此外,在原始参数空间中本质上难以处理的参数干扰问题,可以通过扩展维度来管理。我们在多种场景下进行了广泛的实验,例如图像分类和文本生成任务,使用全微调和 LoRA 微调,并将我们的方法应用于大型语言模型(CLIP 模型、Flan-T5 模型和 Mistral-7B 模型),突显了 SMILE 的适应性和可扩展性。代码可在 https://github.com/tanganke/fusion_bench 获取

英文摘要:

Deep model training on extensive datasets is increasingly becoming cost-prohibitive, prompting the widespread adoption of deep model fusion techniques to leverage knowledge from pre-existing models. From simple weight averaging to more sophisticated methods like AdaMerging, model fusion effectively improves model performance and accelerates the development of new models. However, potential interference between parameters of individual models and the lack of interpretability in the fusion progress remain significant challenges. Existing methods often try to resolve the parameter interference issue by evaluating attributes of parameters, such as their magnitude or sign, or by parameter pruning. In this study, we begin by examining the fine-tuning of linear layers through the lens of subspace analysis and explicitly define parameter interference as an optimization problem to shed light on this subject. Subsequently, we introduce an innovative approach to model fusion called zero-shot Sparse MIxture of Low-rank Experts (SMILE) construction, which allows for the upscaling of source models into an MoE model without extra data or further training. Our approach relies on the observation that fine-tuning mostly keeps the important parts from the pre-training, but it uses less significant or unused areas to adapt to new tasks. Also, the issue of parameter interference, which is intrinsically intractable in the original parameter space, can be managed by expanding the dimensions. We conduct extensive experiments across diverse scenarios, such as image classification and text generation tasks, using full fine-tuning and LoRA fine-tuning, and we apply our method to large language models (CLIP models, Flan-T5 models, and Mistral-7B models), highlighting the adaptability and scalability of SMILE. Code is available at https://github.com/tanganke/fusion_bench

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑