DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligence

📄 arXiv: 2401.14196v2 📥 PDF

作者: Daya Guo, Qihao Zhu, Dejian Yang, Zhenda Xie, Kai Dong, Wentao Zhang, Guanting Chen, Xiao Bi, Y. Wu, Y. K. Li, Fuli Luo, Yingfei Xiong, Wenfeng Liang

分类: cs.SE, cs.CL, cs.LG

发布日期: 2024-01-25 (更新: 2024-01-26)


💡 一句话要点

提出DeepSeek-Coder以推动开源代码智能的发展

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 开源模型 代码智能 大型语言模型 代码生成 软件开发 填空任务 性能评估

📋 核心要点

  1. 现有的封闭源代码模型限制了代码智能的研究与开发,缺乏开放性和可扩展性。
  2. DeepSeek-Coder系列模型通过开源方式提供多种规模的代码模型,旨在提升代码生成和填充能力。
  3. 实验结果显示,DeepSeek-Coder在多个基准测试中超越了现有的封闭源模型,展现出卓越的性能。

📝 摘要(中文)

大型语言模型的快速发展彻底改变了软件开发中的代码智能。然而,封闭源模型的主导地位限制了广泛的研究与开发。为此,本文提出了DeepSeek-Coder系列,这是一系列开源代码模型,规模从1.3B到33B,基于2万亿个标记从头开始训练。这些模型在高质量的项目级代码语料库上进行预训练,并采用填空任务和16K窗口来增强代码生成与填充。我们的广泛评估表明,DeepSeek-Coder不仅在多个基准测试中实现了开源代码模型的最先进性能,还超越了现有的封闭源模型如Codex和GPT-3.5。此外,DeepSeek-Coder模型采用宽松许可,允许研究和无限制的商业使用。

🔬 方法详解

问题定义:本文旨在解决现有封闭源代码模型在研究与开发中的局限性,尤其是缺乏开放性和可访问性的问题。

核心思路:提出DeepSeek-Coder系列开源代码模型,通过在高质量项目级代码语料库上进行预训练,采用填空任务和16K窗口设计,提升代码生成和填充的能力。

技术框架:整体架构包括数据预处理、模型训练和评估三个主要阶段。首先,构建高质量的项目级代码语料库;其次,设计填空任务以增强模型的学习能力;最后,通过多项基准测试评估模型性能。

关键创新:DeepSeek-Coder的主要创新在于其开源特性和大规模训练,模型规模从1.3B到33B,能够在多个任务上实现最先进的性能,显著超越封闭源模型。

关键设计:模型采用填空任务的训练方式,使用16K的上下文窗口,确保模型能够处理复杂的代码生成任务。训练过程中使用了高质量的代码数据集,优化了模型的参数设置和损失函数。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

DeepSeek-Coder在多个基准测试中展现出卓越的性能,超越了Codex和GPT-3.5等封闭源模型,成为开源代码模型中的佼佼者。具体而言,DeepSeek-Coder在代码生成和填充任务中实现了显著的性能提升,展示了其在实际应用中的潜力。

🎯 应用场景

DeepSeek-Coder系列模型在软件开发、代码自动生成、代码补全等领域具有广泛的应用潜力。其开源特性使得研究人员和开发者能够在此基础上进行创新,推动代码智能的进一步发展,促进软件工程的效率提升。

📄 摘要(原文)

The rapid development of large language models has revolutionized code intelligence in software development. However, the predominance of closed-source models has restricted extensive research and development. To address this, we introduce the DeepSeek-Coder series, a range of open-source code models with sizes from 1.3B to 33B, trained from scratch on 2 trillion tokens. These models are pre-trained on a high-quality project-level code corpus and employ a fill-in-the-blank task with a 16K window to enhance code generation and infilling. Our extensive evaluations demonstrate that DeepSeek-Coder not only achieves state-of-the-art performance among open-source code models across multiple benchmarks but also surpasses existing closed-source models like Codex and GPT-3.5. Furthermore, DeepSeek-Coder models are under a permissive license that allows for both research and unrestricted commercial use.