DeepSeekMoE: 전문가 혼합 언어 모델에서 궁극적인 전문가 전문화를 향하여
DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models
January 11, 2024
저자: 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.AI
초록
대규모 언어 모델 시대에서, 전문가 혼합(Mixture-of-Experts, MoE)은 모델 파라미터를 확장할 때 계산 비용을 관리하기 위한 유망한 아키텍처입니다. 그러나 GShard와 같은 기존의 MoE 아키텍처는 N명의 전문가 중 상위 K명을 활성화하는 방식으로, 각 전문가가 중복되지 않고 집중된 지식을 습득하는 전문가 전문화를 보장하는 데 어려움을 겪습니다. 이에 대응하여, 우리는 궁극적인 전문가 전문화를 목표로 DeepSeekMoE 아키텍처를 제안합니다. 이 아키텍처는 두 가지 주요 전략을 포함합니다: (1) 전문가를 mN명으로 세분화하고 그 중 mK명을 활성화하여, 활성화된 전문가의 조합을 더 유연하게 만드는 것; (2) K_s명의 전문가를 공유 전문가로 분리하여 공통 지식을 포착하고 라우팅된 전문가 간의 중복을 완화하는 것. 20억 개의 파라미터로 시작하여, 우리는 DeepSeekMoE 20억이 전문가 파라미터와 계산량이 1.5배인 GShard 29억과 비슷한 성능을 달성함을 보여줍니다. 또한, DeepSeekMoE 20억은 동일한 총 파라미터 수를 가진 밀집 모델의 성능에 거의 근접하며, 이는 MoE 모델의 상한선을 설정합니다. 이후, DeepSeekMoE를 160억 개의 파라미터로 확장하여 LLaMA2 70억과 비슷한 성능을 달성하며, 계산량의 약 40%만 사용함을 보여줍니다. 더 나아가, DeepSeekMoE를 1450억 개의 파라미터로 확장하려는 우리의 초기 노력은 GShard 아키텍처에 비해 상당한 이점을 일관되게 검증하며, DeepSeek 670억과 비슷한 성능을 달성하면서 계산량의 28.5%(심지어 18.2%)만 사용함을 보여줍니다.
English
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.