DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models

📄 arXiv: 2401.06066v1 📥 PDF

作者: Damai Dai, Chengqi Deng, Chenggang Zhao, R. X. Xu, Huazuo Gao, Deli Chen, Jiashi Li, Wangding Zeng, Xingkai Yu, Y. Wu, Zhenda Xie, Y. K. Li, Panpan Huang, Fuli Luo, Chong Ruan, Zhifang Sui, Wenfeng Liang

分类: cs.CL

发布日期: 2024-01-11


💡 一句话要点

提出DeepSeekMoE以解决专家知识重叠问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 混合专家 语言模型 专家专业化 计算效率 深度学习

📋 核心要点

  1. 现有的MoE架构在确保专家专业化方面存在知识重叠的问题,导致模型性能受限。
  2. DeepSeekMoE通过细分专家和共享专家的设计,增强了专家的专业化和知识捕获能力。
  3. 实验表明,DeepSeekMoE在较小参数规模下的性能与更大规模的GShard相当,且计算效率显著提升。

📝 摘要(中文)

在大型语言模型时代,混合专家(MoE)架构在扩展模型参数时有效管理计算成本。然而,传统的MoE架构如GShard在确保专家专业化方面面临挑战。为此,本文提出DeepSeekMoE架构,旨在实现最终的专家专业化。该架构通过细分专家和共享专家的方式,灵活组合激活的专家。实验结果表明,DeepSeekMoE在较小规模下的表现与GShard相当,并在更大规模下展现出显著的计算效率优势。

🔬 方法详解

问题定义:本文旨在解决传统MoE架构在专家知识重叠和专业化不足的问题。现有方法如GShard在激活专家时,难以确保每个专家获取非重叠的知识,导致模型性能受限。

核心思路:DeepSeekMoE通过将专家细分为更多的子专家,并引入共享专家的概念,旨在实现更高的专家专业化和知识捕获效率。这样的设计使得激活的专家组合更加灵活,能够更好地适应不同的任务需求。

技术框架:DeepSeekMoE的整体架构包括两个主要模块:细分专家模块和共享专家模块。细分专家模块将每个专家细分为mN个子专家,而共享专家模块则隔离出K_s个专家用于捕获共性知识。

关键创新:DeepSeekMoE的主要创新在于其专家细分和共享机制,这与传统的MoE架构形成鲜明对比。通过这种方式,DeepSeekMoE能够有效减少冗余并提高知识的专注度。

关键设计:在参数设置上,DeepSeekMoE从2B参数开始,展示了与GShard 2.9B相当的性能。此外,DeepSeekMoE在计算效率上表现出色,使用的计算资源仅为GShard的40%。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,DeepSeekMoE在2B参数下的性能与GShard 2.9B相当,且计算资源仅为其40%。在进一步扩展到16B参数时,DeepSeekMoE的表现与LLaMA2 7B相当,计算效率更是显著提升,展示了其在大规模模型中的潜力。

🎯 应用场景

DeepSeekMoE的研究成果可广泛应用于自然语言处理、机器翻译和对话系统等领域。其高效的专家管理机制能够在资源受限的环境中实现更优的模型性能,具有重要的实际价值和未来影响。

📄 摘要(原文)

In the era of large language models, Mixture-of-Experts (MoE) is a promising architecture for managing computational costs when scaling up model parameters. However, conventional MoE architectures like GShard, which activate the top-$K$ out of $N$ experts, face challenges in ensuring expert specialization, i.e. each expert acquires non-overlapping and focused knowledge. In response, we propose the DeepSeekMoE architecture towards ultimate expert specialization. It involves two principal strategies: (1) finely segmenting the experts into $mN$ ones and activating $mK$ from them, allowing for a more flexible combination of activated experts; (2) isolating $K_s$ experts as shared ones, aiming at capturing common knowledge and mitigating redundancy in routed experts. Starting from a modest scale with 2B parameters, we demonstrate that DeepSeekMoE 2B achieves comparable performance with GShard 2.9B, which has 1.5 times the expert parameters and computation. In addition, DeepSeekMoE 2B nearly approaches the performance of its dense counterpart with the same number of total parameters, which set the upper bound of MoE models. Subsequently, we scale up DeepSeekMoE to 16B parameters and show that it achieves comparable performance with LLaMA2 7B, with only about 40% of computations. Further, our preliminary efforts to scale up DeepSeekMoE to 145B parameters consistently validate its substantial advantages over the GShard architecture, and show its performance comparable with DeepSeek 67B, using only 28.5% (maybe even 18.2%) of computations.