通过增强专家多样性,高效将密集模型重构为混合专家模型。
DIVE into MoE: Diversity-Enhanced Reconstruction of Large Language Models from Dense into Mixture-of-Experts
- 基于不同数据集剪枝后显现出的多样性,设计新重构方法
- 在相同激活参数下,精度损失小且训练效率显著提升
- 适合需要低成本部署高效大模型的研究者与开发者
大型语言模型(LLM)采用混合专家(MoE)架构可在推理时仅激活部分参数,实现高成本效益。尽管如此,从零训练大量专家仍需巨大开销;而将密集模型重构为MoE模型可大幅降低训练成本。然而,现有重构方法常忽略专家间的多样性,导致冗余。本文观察到:同一模型在不同校准数据集上剪枝后表现出显著差异性,据此提出名为DIVE的多样性增强重构方法。DIVE包含领域亲和性挖掘、基于剪枝的专家重构与高效重训练三步。具体地,对前馈网络(FFN)模块进行剪枝与重组,并在路由器、专家及归一化模块上高效重训练。我们在基于Llama的开源模型上实现DIVE,实验表明其在相同激活参数下,训练效率更高且精度损失极小,优于现有剪枝与MoE重构方法。
原文摘要 · Abstract (English)
Large language models (LLMs) with the Mixture-of-Experts (MoE) architecture achieve high cost-efficiency by selectively activating a subset of the parameters. Despite the inference efficiency of MoE LLMs, the training of extensive experts from scratch incurs substantial overhead, whereas reconstructing a dense LLM into an MoE LLM significantly reduces the training budget. However, existing reconstruction methods often overlook the diversity among experts, leading to potential redundancy. In this paper, we come up with the observation that a specific LLM exhibits notable diversity after being pruned on different calibration datasets, based on which we present a Diversity-Enhanced reconstruction method named DIVE. The recipe of DIVE includes domain affinity mining, pruning-based expert reconstruction, and efficient retraining. Specifically, the reconstruction includes pruning and reassembly of the feed-forward network (FFN) module. After reconstruction, we efficiently retrain the model on routers, experts and normalization modules. We implement DIVE on Llama-style LLMs with open-source training corpora. Experiments show that DIVE achieves training efficiency with minimal accuracy trade-offs, outperforming existing pruning and MoE reconstruction methods with the same number of activated parameters.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。