DeepSeekMoE:迈向混合专家语言模型中的极致专家专业化
DeepSeekMoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models
AI总结:
本文提出DeepSeekMoE架构,通过细粒度专家分割与共享专家隔离实现极致专家专业化,在2B、16B和145B规模上以更少计算量取得与更大稠密或MoE模型相当的性能。
摘要:
在大语言模型时代,混合专家(MoE)是一种在扩大模型参数规模时管理计算成本的有前景的架构。然而,像GShard这样从N个专家中激活前K个专家的传统MoE架构,在确保专家专业化方面面临挑战,即每个专家获得非重叠且聚焦的知识。为此,我们提出了DeepSeekMoE架构,旨在实现极致的专家专业化。它包含两个主要策略:(1)将专家细分为mN个,并从中激活mK个,从而允许更灵活地组合被激活的专家;(2)隔离出K_s个专家作为共享专家,旨在捕获通用知识并减少路由专家中的冗余。从一个具有2B参数的适度规模开始,我们证明DeepSeekMoE 2B取得了与GShard 2.9B相当的性能,而后者的专家参数和计算量是前者的1.5倍。此外,DeepSeekMoE 2B几乎接近具有相同总参数量的稠密对应模型的性能,该稠密模型设定了MoE模型的上限。随后,我们将DeepSeekMoE扩展到16B参数,并表明它以仅约40%的计算量取得了与LLaMA2 7B相当的性能。进一步地,我们将DeepSeekMoE扩展到145B参数的初步努力一致验证了其相对于GShard架构的显著优势,并表明其性能与DeepSeek 67B相当,而仅使用28.5%(甚至可能18.2%)的计算量。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。