Machine Learning PapersLandmark papers
← All papers
RESEARCH PAPER / 2024

DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model

DeepSeek-AI, Aixin Liu, Bei Feng, Bin Wang, Bingxuan Wang, Bo Liu, Chenggang Zhao, Chengqi Dengr, Chong Ruan, Damai Dai, Daya Guo, Dejian Yang, Deli Chen, Dongjie Ji, Erhang Li, Fangyun Lin, Fuli Luo, Guangbo Hao, Guanting Chen, Guowei Li, H. Zhang, Hanwei Xu, Hao Yang, Haowei Zhang, Honghui Ding, Huajian Xin, Huazuo Gao, Hui Li, Hui Qu, J. L. Cai, Jian Liang, Jianzhong Guo, Jiaqi Ni, Jiashi Li, Jin Chen, Jingyang Yuan, Junjie Qiu, Junxiao Song, Kai Dong, Kaige Gao, Kang Guan, Lean Wang, Lecong Zhang, Lei Xu, Leyi Xia, Liang Zhao, Liyue Zhang, Meng Li, Miaojun Wang, Mingchuan Zhang, Minghua Zhang, Minghui Tang, Mingming Li, Ning Tian, Panpan Huang, Peiyi Wang, Peng Zhang, Qihao Zhu, Qinyu Chen, Qiushi Du, R. J. Chen, R. L. Jin, Ruiqi Ge, Ruizhe Pan, Runxin Xu, Ruyi Chen, S. S. Li, Shanghao Lu, Shangyan Zhou, Shanhuang Chen, Shaoqing Wu, Shengfeng Ye, Shirong Ma, Shiyu Wang, Shuang Zhou, Shuiping Yu, Shunfeng Zhou, Size Zheng, T. Wang, Tian Pei, Tian Yuan, Tianyu Sun, W. L. Xiao, Wangding Zeng, Wei An, Wen Liu, Wenfeng Liang, Wenjun Gao, Wentao Zhang, X. Q. Li, Xiangyue Jin, Xianzu Wang, Xiao Bi, Xiaodong Liu, Xiaohan Wang, Xiaojin Shen, Xiaokang Chen, Xiaosha Chen, Xiaotao Nie, Xiaowen Sun, Xiaoxiang Wang, Xin Liu, Xin Xie, Xingkai Yu, Xinnan Song, Xinyi Zhou, Xinyu Yang, Xuan Lu, Xuecheng Su, Y. Wu, Y. K. Li, Y. X. Wei, Y. X. Zhu, Yanhong Xu, Yanping Huang, Yao Li, Yao Zhao, Yaofeng Sun, Yaohui Li, Yaohui Wang, Yi Zheng, Yichao Zhang, Yiliang Xiong, Yilong Zhao, Ying He, Ying Tang, Yishi Piao, Yixin Dong, Yixuan Tan, Yiyuan Liu, Yongji Wang, Yongqiang Guo, Yuchen Zhu, Yuduan Wang, Yuheng Zou, Yukun Zha, Yunxian Ma, Yuting Yan, Yuxiang You, Yuxuan Liu, Z. Z. Ren, Zehui Ren, Zhangli Sha, Zhe Fu, Zhen Huang, Zhen Zhang, Zhenda Xie, Zhewen Hao, Zhihong Shao, Zhiniu Wen, Zhipeng Xu, Zhongyu Zhang, Zhuoshu Li, Zihan Wang, Zihui Gu, Zilin Li, Ziwei Xie

· landmark

Affiliations: unknown

Abstract

We present DeepSeek-V2, a strong Mixture-of-Experts (MoE) language model characterized by economical training and efficient inference. It comprises 236B total parameters, of which 21B are activated for each token, and supports a context length of 128K tokens. DeepSeek-V2 adopts innovative architectures including Multi-head Latent Attention (MLA) and DeepSeekMoE. MLA guarantees efficient inference through significantly compressing the Key-Value (KV) cache into a latent vector, while DeepSeekMoE enables training strong models at an economical cost through sparse computation. Compared with DeepSeek 67B, DeepSeek-V2 achieves significantly stronger performance, and meanwhile saves 42.5% of training costs, reduces the KV cache by 93.3%, and boosts the maximum generation throughput to 5.76 times. We pretrain DeepSeek-V2 on a high-quality and multi-source corpus consisting of 8.1T tokens, and further perform Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL) to fully unlock its potential. Evaluation results show that, even with only 21B activated parameters, DeepSeek-V2 and its chat versions still achieve top-tier performance among open-source models.

The following analysis is generated by AI and may contain errors. It is separate from the authors’ abstract and is not peer review.

Research summary

DeepSeek-V2 presents a significant advancement in the field of language models, combining innovative architectures to achieve high performance while reducing resource requirements. The methodology and experimental results indicate a strong potential for widespread adoption and further development in the area of efficient large language models.

Methodology

The paper introduces DeepSeek-V2, a Mixture-of-Experts (MoE) language model that innovatively combines Multi-head Latent Attention (MLA) and DeepSeekMoE architectures to achieve efficient training and inference. The use of low-rank key-value joint compression in MLA significantly reduces the KV cache size, enhancing inference speed. The methodology is well-structured, with a clear focus on optimizing both performance and resource efficiency, which is crucial for large language models. However, the paper could benefit from more detailed comparisons with existing architectures to better highlight its advantages.

Results & evaluation

The experiments are extensive, evaluating DeepSeek-V2 on a wide range of benchmarks in both English and Chinese. The results demonstrate that it achieves top-tier performance with significantly fewer activated parameters compared to other models. The evaluation metrics and benchmarks used are appropriate, and the results are compelling, showcasing improvements in training costs and inference throughput. However, the paper lacks a thorough ablation study that could provide deeper insights into the contributions of the proposed innovations.

Reproducibility

The paper provides a detailed description of the model architecture, training procedures, and evaluation methods. However, the absence of a public repository or demo limits reproducibility. The implementation details are comprehensive, but without access to code or trained models, it may be challenging for other researchers to replicate the results.

Limitations

The model's performance may be limited by its reliance on the quality and diversity of the training data, particularly in languages other than Chinese and English. Additionally, the paper acknowledges common limitations found in large language models, such as the potential for generating non-factual information and hallucinations.

Broader impact

The advancements presented in DeepSeek-V2 could significantly influence the development of future language models, particularly in terms of efficiency and cost-effectiveness. The focus on economical training and inference aligns with the growing need for sustainable AI solutions. The model's strong performance in both English and Chinese also highlights its potential for broader applications in multilingual contexts. DeepSeek-V2 presents a significant advancement in the field of language models, combining innovative architectures to achieve high performance while reducing resource requirements. The methodology and experimental results indicate a strong potential for widespread adoption and further development in the area of efficient large language models.

Curator note

DeepSeek; MLA attention; efficient MoE; competitive open weights

Author of this paper? Send a correction.