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

我们介绍了DeepSeek-V2,这是一个强大的混合专家(MoE)语言模型,具有经济的训练和高效的推理。它包含236B个总参数,其中每个标记激活了21B个参数,并支持128K个标记的上下文长度。DeepSeek-V2采用创新的架构,包括多头潜在注意力(MLA)和DeepSeekMoE。 MLA通过将键值(KV)缓存显着压缩为潜在向量来保证高效推理,而DeepSeekMoE通过稀疏计算使训练强大的模型成本经济。与DeepSeek 67B相比,DeepSeek-V2的性能显著更强,同时节省了42.5%的训练成本,将KV缓存减少了93.3%,并将最大生成吞吐量提高了5.76倍。我们在由81T个标记组成的高质量和多源语料库上预训练DeepSeek-V2,并进一步进行监督微调(SFT)和强化学习(RL)以充分发挥其潜力。评估结果表明,即使只有21B个激活参数,DeepSeek-V2及其聊天版本仍然在开源模型中实现了顶级性能。
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.
许愿