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

XMoE:具有细粒度和自适应专家选择的稀疏模型

XMoE: Sparse Models with Fine-grained and Adaptive Expert Selection

Harbin Institute of Technology, Shenzhen(哈尔滨工业大学(深圳));CUHK(香港中文大学)

Yuanhang Yang, Shiyi Qi, Wenchao Gu, Chaozheng Wang, Cuiyun Gao, Zenglin Xu

AI总结:

XMoE通过小专家和阈值路由器实现细粒度自适应专家选择,在语言建模和机器翻译中提升性能并减少MoE层计算负载超50%,且可应用于稠密模型实现稀疏推理。

摘要:

稀疏模型,包括稀疏混合专家(MoE)模型,已成为扩展Transformer模型的有效方法。然而,它们常常面临计算效率低下的问题,因为大量参数通过乘以零或低激活值而参与不必要的计算。为解决此问题,我们提出了XMoE,一种新颖的MoE设计,旨在提升稀疏MoE模型的效能和效率。XMoE利用小专家和基于阈值的路由器,使令牌能够选择性地仅激活必要的参数。我们在语言建模和机器翻译任务上的大量实验表明,XMoE可以在不牺牲性能的情况下提升模型性能,同时将MoE层的计算负载降低超过50%。此外,我们通过将XMoE应用于稠密模型,展示了其多功能性,使得推理过程中能够进行稀疏计算。我们提供了全面的分析,并将代码公开在https://github.com/ysngki/XMoE。

英文摘要:

Sparse models, including sparse Mixture-of-Experts (MoE) models, have emerged as an effective approach for scaling Transformer models. However, they often suffer from computational inefficiency since a significant number of parameters are unnecessarily involved in computations via multiplying values by zero or low activation values. To address this issue, we present \tool, a novel MoE designed to enhance both the efficacy and efficiency of sparse MoE models. \tool leverages small experts and a threshold-based router to enable tokens to selectively engage only essential parameters. Our extensive experiments on language modeling and machine translation tasks demonstrate that \tool can enhance model performance while decreasing the computation load at MoE layers by over 50\% without sacrificing performance. Furthermore, we present the versatility of \tool by applying it to dense models, enabling sparse computation during inference. We provide a comprehensive analysis and make our code available at https://github.com/ysngki/XMoE.

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

↑