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

Damai Dai, C. Deng, Chenggang Zhao, R. Xu, Huazuo Gao, Deli Chen, Jiashi Li, Wangding Zeng, Xingkai Yu, Yu Wu, Zhenda Xie, Y. K. Li, Panpan Huang, Fuli Luo, C. Ruan, Zhifang Sui, W. Liang

arXiv:2401.06066 · 2026-07-27 공개 · arXiv · PDF

mixture-of-experts model-scaling computational-efficiency parameter-optimization expert-specialization deepseekmoe llama2 gshard

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.

한국어 요약

한 줄 요약

DeepSeekMoE는 전문가 분화를 극대화한 MoE 아키텍처로, 2B 모델에서도 GShard 2.9B와 유사한 성능을 달성한다.

핵심 기여도

핵심 아이디어

기존 MoE 아키텍처는 전문가 간 지식 혼합(Knowledge Hybridity)과 중복(Knowledge Redundancy)으로 인해 전문성 확보에 어려움이 있었다. DeepSeekMoE는 두 가지 전략을 통해 이 문제를 해결한다. 첫째, FFN 중간 차원을 분할하여 mN 전문가를 구성하고, mK 전문가만 선택적으로 활성화함으로써 보다 유연한 전문가 조합을 가능하게 한다. 둘째, 공통 지식을 학습하기 위한 K_s 전문가를 별도로 분리하여 다른 전문가 간 중복을 줄인다. 이는 각 전문가가 더 집중적이고 비중복적인 지식을 학습하도록 유도한다.

기술적 접근법

주요 결과

의의 및 한계

DeepSeekMoE는 기존 MoE 아키텍처의 한계를 극복하고, 전문가 분화를 극대화함으로써 더 높은 성능과 효율성을 달성한다. 특히, 2B 모델에서도 상한선 수준의 성능을 보이는 것은 MoE 모델의 이론적 잠재력을 실현한 사례로 평가된다. 또한, 16B 및 145B 모델에서도 기존 대형 모델과 유사한 성능을 훨씬 낮은 계산 비용으로 달성함으로써 확장성과 효율성을 입증한다. 그러나, 145B 모델의 경우 아직 초기 탐색 단계이므로, 더 많은 실험과 분석이 필요하다. 또한, 과도한 세분화가 계산 효율성을 저하시킬 수 있는 점도 한계로 지적된다.

실용적 활용

DeepSeekMoE는 대규모 언어 모델의 파라미터 확장이 필요한 산업 및 연구 분야에서 유용하게 활용될 수 있다. 특히, 고비용 저효율의 기존 MoE 아키텍처를 대체하여, 동일 성능을 훨씬 낮은 계산 비용으로 달성할 수 있는 점에서 클라우드 인프라, 모바일 기기, 실시간 대화 시스템 등에 적합하다.