arXiv:2503.11144cs.CLcs.AI2025-03ICLR被引 8

让模型不同层协作,用稀疏专家机制高效微调。

MoLEx: Mixture of Layer Experts for Finetuning with Sparse Upcycling

  • 将模型各层视为专家,按需选择组合进行微调。
  • 在GLUE和E2E任务上提升性能,参数量与基线相当。
  • 适合追求高效微调且不想重训全部参数的研究者。

大规模预训练模型的微调已成为自然语言处理的核心范式。尽管模型规模巨大,在多个任务上表现优异,但为适配每个任务或领域而重新训练所有参数代价高昂。参数高效微调(PEFT)通过最小化需更新参数数量,维持模型质量,提供了有效解决方案。现有方法多聚焦于参数子集调整、权重重参数化和提示工程。本文提出分层专家混合(MoLEx),一种基于稀疏专家的新型架构,其专家为预训练模型中的各层。微调时,根据输入条件动态选择并组合部分层,增强模型对数据结构的理解,实现更精准预测。通过层间信息交互,相同有效参数下获得更好效果。由于专家可并行处理,计算开销几乎无增。在包括GLUE和端到端挑战(E2E)在内的多种下游任务中,结合主流PEFT方法验证了其优势。代码已开源。

原文摘要 · Abstract (English)

Large-scale pre-training of deep models, followed by fine-tuning them, has become the cornerstone of natural language processing (NLP). The prevalence of data coupled with computational resources has led to large models with a considerable number of parameters. While the massive size of these models has led to remarkable success in many NLP tasks, a detriment is the expense required to retrain all the base model's parameters for the adaptation to each task or domain. Parameter Efficient Fine-Tuning (PEFT) provides an effective solution for this challenge by minimizing the number of parameters required to be fine-tuned while maintaining the quality of the model. While existing methods have achieved impressive results, they mainly focus on adapting a subset of parameters, weight reparameterization, and prompt engineering. In this paper, we study layers as extractors of different types of linguistic information that are valuable when used in conjunction. We then propose the Mixture of Layer Experts (MoLEx), a novel sparse mixture of experts (SMoE) whose experts are layers in the pre-trained model. It performs a conditional computation of a mixture of layers during fine-tuning to provide the model with more structural knowledge about the data. By providing an avenue for information exchange between layers, MoLEx enables the model to make a more well-informed prediction for the downstream task, leading to better fine-tuning results with the same number of effective parameters. As experts can be processed in parallel, MoLEx introduces minimal additional computational overhead. We empirically corroborate the advantages of MoLEx when combined with popular PEFT baseline methods on a variety of downstream fine-tuning tasks, including the popular GLUE benchmark as well as the End-to-End Challenge (E2E). The code is publicly available at https://github.com/rachtsy/molex.

参数高效微调专家混合NLP

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。