DeepSeek-Coder: When the Large Language Model Meets Programming - The Rise of Code Intelligence
Daya GuoQihao ZhuDejian YangZhenda XieKai DongWentao ZhangGuan-Ting ChenXiao BiYu WuY. K. Li
Presents DeepSeek-Coder, an open-source suite of code language models trained from scratch on two trillion tokens with a 16K context window, delivering state-of-the-art generation and infilling performance that surpasses proprietary systems like GPT-3.5.
Artificial intelligence tools for software development are increasingly vital for boosting engineering productivity, but high-performing options have largely remained restricted to proprietary, closed-source models. The article introduces and evaluates the DeepSeek-Coder series, an open-source family of code-focused language models ranging from 1.3 billion to 33 billion parameters, to determine whether accessible, permissively licensed models can match or exceed proprietary industry standards.
To achieve this, the models were trained from scratch on two trillion tokens spanning 87 programming languages. The training pipeline organized code files at the repository level based on internal project dependencies, incorporated a fill-in-the-middle training strategy at a 50% rate to support in-line code insertion, and extended the operational context length to 16,000 tokens. The models were evaluated across standard benchmarks for multilingual code generation, data science library usage, cross-file completion, mathematical reasoning, and competition-level programming.
The evaluations yielded several core findings. First, the base 33-billion parameter model achieved state-of-the-art performance among open-source alternatives, reaching 50.3% average accuracy on HumanEval and 66.0% on MBPP, outperforming the similarly sized CodeLlama by 9 to 11 percentage points. Second, the smaller 6.7-billion parameter base model matched or surpassed the performance of open-source models five times its size. Third, the instruction-tuned 33-billion model surpassed OpenAI's GPT-3.5 Turbo across multiple benchmarks, including a 69.2% average score on multilingual HumanEval and a 27.8% pass rate on recent competition problems, significantly narrowing the gap to GPT-4. Additionally, pre-training on dependency-sorted repositories measurably enhanced cross-file code completion across multiple languages.
These findings demonstrate that organizations can deploy smaller, highly efficient open-source models without sacrificing output quality. Permissively licensing these models enables enterprises to lower commercial licensing costs, operate coding tools locally to protect proprietary codebases, and maintain greater architectural control compared to relying entirely on commercial cloud Application Programming Interfaces (APIs).
Based on these results, software teams seeking code completion tools should consider deploying the 6.7-billion parameter base model as a cost-effective, high-accuracy option. For complex logic and competitive coding tasks, the article recommends pairing the instruction-tuned models with step-by-step reasoning prompts, which systematically improved accuracy across difficult test sets. To advance capabilities further, developing code models initialized from broader general-purpose language models (as demonstrated with the v1.5 model) is recommended to strengthen natural language comprehension alongside code synthesis.
Confidence in the reported benchmarks is high due to strict data decontamination protocols and standardized evaluation frameworks. However, the authors note residual uncertainties: test performance showed mild degradation on the newest competition subsets, suggesting potential historical contamination, and model reliability decreases when context windows are pushed beyond 16,000 tokens.
- Paper: Code Llama: Open Foundation Models for Code, Baptiste Rozière et al. (2023). Code Llama established foundational methodologies for infilling objectives and long-context code modeling that directly inform the design and pre-training objectives of DeepSeek-Coder.
- Paper: Evaluating Large Language Models Trained on Code, Mark Chen et al. (2021). Codex introduced the standard evaluation framework and pass@k metric on HumanEval, against which DeepSeek-Coder benchmarks its state-of-the-art code generation performance.
- Paper: Textbooks Are All You Need, Suriya Gunasekar et al. (2023). Textbooks Are All You Need demonstrated the power of curated, high-quality synthetic and educational corpora for code modeling, motivating DeepSeek-Coder's emphasis on a high-quality project-level pre-training corpus.
- Paper: Program Synthesis with Large Language Models, Jacob Austin et al. (2021). This work introduced the Mostly Basic Programming Problems (MBPP) benchmark, a core evaluation standard used to assess DeepSeek-Coder's functional correctness.
- Paper: CodeBERT: A Pre-Trained Model for Programming and Natural Languages, Zhangyin Feng et al. (2020). CodeBERT pioneered large-scale multi-language pre-training across programming and natural languages, laying the groundwork for specialized open-source code models.
- Paper: Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generation, Jiawei Liu et al. (2023). EvalPlus established rigorous augmented testing for code evaluation, highlighting the necessity for robust benchmarks to evaluate models like DeepSeek-Coder.
- Paper: DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models, Zhihong Shao et al. (2024). DeepSeekMath directly builds upon the DeepSeek-Coder foundation by initializing from DeepSeek-Coder-Base-v1.5 to push the boundaries of open mathematical reasoning.
- Paper: LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code, Naman Jain et al. (2025). LiveCodeBench assesses advanced open coding models like DeepSeek-Coder on contamination-free live programming contests to measure real-world performance.
- Paper: BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructions, Terry Yue Zhuo et al. (2025). BigCodeBench expands beyond the standard snippet-level benchmarks of DeepSeek-Coder by evaluating model capabilities on diverse library function calls and complex instructions.
- Paper: SWE-bench: Can Language Models Resolve Real-World GitHub Issues?, Carlos E. Jimenez et al. (2024). SWE-bench moves beyond repository-level token generation to test whether open code models can solve full, multi-file software engineering tasks.
- Paper: daVinci-Dev: Agent-native Mid-training for Software Engineering, Ji Zeng et al. (2026). daVinci-Dev advances repository-level code pre-training into agentic mid-training by teaching models to navigate complex code environments and resolve real pull requests.
- Paper: OpenHands: An Open Platform for AI Software Developers as Generalist Agents, Xingyao Wang et al. (2025). OpenHands operationalizes foundation code models as generalist software developer agents capable of executing commands and managing software lifecycles.
