Skip to main content
QUICK REVIEW

[Paper Review] DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models

Damai Dai, Chengqi Deng|arXiv (Cornell University)|Jan 11, 2024
Topic ModelingComputer Science16 citations
TL;DR

DeepSeekMoE introduces fine-grained expert segmentation and shared expert isolation to achieve highly specialized MoE experts, improving efficiency and performance over traditional MoE architectures, demonstrated from 2B up to 145B parameters.

ABSTRACT

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.

Motivation & Objective

  • Motivate and address knowledge hybridity and redundancy in MoE architectures.
  • Propose DeepSeekMoE that enhances expert specialization without increasing total parameters or compute.
  • Demonstrate scalability from 2B to 145B parameters with competitive or superior performance.
  • Validate that fine-grained segmentation and shared isolation reduce redundancy and improve efficiency.
  • Show alignment prospects via supervised fine-tuning to a chat setting and public release.

Proposed method

  • Introduce two core strategies: (i) fine-grained expert segmentation by splitting FFN intermediates to m sub-experts while activating mK experts under fixed cost, and (ii) shared expert isolation by designating Ks shared experts always active to consolidate common knowledge.
  • Formulate the MoE layer with fine-grained routing and shared experts, maintaining the same total parameter count.
  • Incorporate expert- and device-level load balance losses to mitigate routing collapse and distribute computation.
  • Train on a large multilingual corpus (~100B tokens) with 2B parameter MoE variants and compare against Hash Layer, Switch Transformer, and GShard baselines.
  • Scale experiments to 16B and 145B to assess performance relative to dense models and larger MoE baselines.

Experimental results

Research questions

  • RQ1Can fine-grained expert segmentation increase combinatorial routing flexibility and improve expert specialization without increasing total parameters or compute?
  • RQ2Does isolating a small set of shared experts reduce redundancy and improve parameter efficiency in MoE models?
  • RQ3How does DeepSeekMoE perform compared to GShard and dense baselines across standard NLP benchmarks at 2B, 16B, and 145B scales?
  • RQ4What is the impact of the routing balance losses on training stability and model performance?
  • RQ5Can DeepSeekMoE align with upper bounds of MoE performance and enable a publicly releasable 16B model with practical GPU requirements?

Key findings

  • DeepSeekMoE 2B surpasses GShard 2B by a substantial margin and nearly matches GShard 2.9B performance, despite equal total parameters and less activated parameters.
  • DeepSeekMoE 2B nearly approaches the performance of its dense counterpart with the same total parameters, indicating it can reach MoE upper-bound performance.
  • DeepSeekMoE 16B with ~40% of computations achieves comparable performance to DeepSeek 7B and to LLaMA2 7B, while outperforming models with a similar number of activated parameters.
  • At 145B, DeepSeekMoE shows substantial advantages over GShard and is comparable to DeepSeek 67B with only 28.5% (potentially 18.2%) of computations.
  • Ablation studies confirm that both fine-grained segmentation and shared isolation contribute to improved performance and higher expert specialization.
  • Analyses indicate DeepSeekMoE exhibits lower redundancy among routed experts and that the shared expert is irreplaceable by routed experts.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.