SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.14196 · 2024

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

Daya Guo, Wentao Zhang, Y Li, Dejian Yang, Guanting Chen, Fuli Luo, Kai Dong, Wenfeng Liang, Xiao Bi, Y Wu, Zhenda Xie, Qihao Zhu, and 1 more

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2401.14196.json · badge: /api/ran/2401.14196.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
deepseek-ai/DeepSeek-Coder canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
FunctionStatusWhere it lives
build_deepseekcoder_instruction Ran
ran; our contract draft was wrong, not the code
deepseek-ai/DeepSeek-Coder/Evaluation/HumanEval/eval_instruct.py
code served (permissive licence) · get_code("6f0dd2241aaa7457")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Construct arguments for build_deepseekcoder_instruction
language_arg = "python"
question_arg = "def fibonacci(n):\n    pass"

ARGS = {
    "languge": language_arg,
    "question": question_arg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_instruction_prompt Ran
ran; our contract draft was wrong, not the code
deepseek-ai/DeepSeek-Coder/finetune/finetune_deepseekcoder.py
code served (permissive licence) · get_code("d75977d806b4c9f6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "instruction": "Write a Python function to sort a list"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
convert_for_evaluation Ran
ran; our contract draft was wrong, not the code
deepseek-ai/DeepSeek-Coder/Evaluation/MBPP/eval_instruct.py
code served (permissive licence) · get_code("c9bc84373110f7bd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def convert_for_evaluation(example):
    gpt_completion = example['gpt_completion']
    generation = gpt_completion
    try:
        code_block: str = re.findall(f'```python\n(.*?)```', gpt_completion, re.DOTALL | re.IGNORECASE)[0]
        generation = code_block
    except Exception as ex:
        print('Failed to extract codeblock:\n{}'.format(gpt_completion))
    example['generation'] = generation
    return example


ARGS = {
    'example': {
        'gpt_completion': '```python\nprint("hello world")\n```'
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
extract_python_code Ran
ran; our contract draft was wrong, not the code
deepseek-ai/DeepSeek-Coder/Evaluation/LeetCode/evaluate_leetcode.py
code served (permissive licence) · get_code("f2508ea408193905")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def extract_python_code(generation: str):
    generation = generation.replace('[PYTHON]', '```python').replace('[/PYTHON]', '```')
    if '```python' in generation:
        p_code = re.compile('```python\\n(.*?)\\n```', flags=re.DOTALL)
        code_block = p_code.findall(generation)[0]
        return code_block
    else:
        codelist = re.split('\ndef|\nclass|\nif|\n#|\nprint', generation)
        return codelist[0]

# Test case 1: generation with [PYTHON] tags
generation_with_tags = "[PYTHON]\nprint('hello')\n[/PYTHON]"

# Test case 2: generation with proper markdown code block
generation_with_markdown = "Here is some code:\n```python\nprint('world')\n```\nMore text"

# Test case 3: generation without code blocks (fallback case)
generation_fallback = "x = 5\ndef foo():\n    pass"

ARGS = {
    "generation": generation_with_markdown
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_one Ran
ran; our contract draft was wrong, not the code
deepseek-ai/DeepSeek-Coder/Evaluation/MBPP/eval_instruct.py
code served (permissive licence) · get_code("8eec22d6447b67d3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import re

torch.manual_seed(0)

class MockTokenizer:
    def apply_chat_template(self, messages, return_tensors=None, add_generation_prompt=False):
        # Return a small tensor of token ids
        tokens = torch.tensor([[1, 2, 3, 4, 5]], dtype=torch.long)
        return tokens
    
    def convert_tokens_to_ids(self, token):
        if token == '<|EOT|>':
            return 6
        return 0
    
    def decode(self, token_ids, skip_special_tokens=False):
        return "```python\nprint('hello')\n```"

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
        self.device_type = 'cpu'
    
    @property
    def device(self):
        return torch.device('cpu')
    
    def generate(self, inputs, max_new_tokens=512, do_sample=False, pad_token_id=None, eos_token_id=None):
        # Return generated token ids with shape [batch_size, seq_len]
        batch_size = inputs.shape[0]
        seq_len = inputs.shape[1] + 10
        return torch.randint(0, 100, (batch_size, seq_len), dtype=torch.long)

example = {
    'prompt': 'Write a Python function',
    'gpt_completion': '```python\nprint("test")\n```'
}

tokenizer = MockTokenizer()
model = MockModel()

ARGS = {
    'example': example,
    'tokenizer': tokenizer,
    'model': model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
preprocess Ran
ran; our contract draft was wrong, not the code
deepseek-ai/DeepSeek-Coder/finetune/finetune_deepseekcoder.py
pointer only (licence: MIT); the stored copy get_code serves, from sail-sg/p-dos, is pointer only (licence: NONE) · get_code("51c01dd0d033f660")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from sail-sg/p-dos, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

process_humaneval_test Ran
ran; our contract draft was wrong, not the code
deepseek-ai/DeepSeek-Coder/Evaluation/HumanEval/human_eval/evaluation.py
code served (permissive licence) · get_code("88e4abace6063c6e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math
import re
import sys
import copy
import datetime
import itertools
import collections
import heapq
import functools
import hashlib
import numpy
import numpy as np
import string
from typing import *
from collections import *

ARGS = {
    'sample': {
        'task_id': 'HumanEval/0',
        'prompt': 'def add(a, b):\n    """Add two numbers."""\n',
        'generation': '    return a + b'
    },
    'problems': {
        'HumanEval/0': {
            'task_id': 'HumanEval/0',
            'prompt': 'def add(a, b):\n    """Add two numbers."""\n',
            'test': 'assert add(2, 3) == 5\nassert add(-1, 1) == 0',
            'example_test': 'assert add(1, 2) == 3'
        }
    },
    'example_test': False,
    'is_mbpp': False,
    'language': 'python'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_problems Ran
ran; our contract draft was wrong, not the code
deepseek-ai/DeepSeek-Coder/Evaluation/HumanEval/human_eval/data.py
code served (permissive licence) · get_code("21359df82e68e215")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import gzip
import json
import os

# Create a temporary directory and a test JSONL.GZ file
temp_dir = tempfile.mkdtemp()
test_file = os.path.join(temp_dir, 'test_problems.jsonl.gz')

# Create sample problem data
problems = [
    {
        'task_id': 'HumanEval/0',
        'prompt': 'def hello():\n    pass',
        'canonical_solution': 'def hello():\n    return "Hello"',
        'test': 'assert hello() == "Hello"'
    },
    {
        'task_id': 'HumanEval/1',
        'prompt': 'def add(a, b):\n    pass',
        'canonical_solution': 'def add(a, b):\n    return a + b',
        'test': 'assert add(1, 2) == 3'
    }
]

# Write to gzipped JSONL file
with gzip.open(test_file, 'wt', encoding='utf-8') as f:
    for problem in problems:
        f.write(json.dumps(problem) + '\n')

ARGS = {
    'evalset_file': test_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_test_examples Ran
ran; our contract draft was wrong, not the code
deepseek-ai/DeepSeek-Coder/Evaluation/MBPP/eval_instruct.py
code served (permissive licence) · get_code("0f5352c3b1c791ef")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned generator. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os

# Create a temporary file with test data
temp_dir = tempfile.mkdtemp()
data_path = os.path.join(temp_dir, "test_data.jsonl")

# Generate sample data matching the expected structure
examples_data = []
for i in range(520):
    example = {
        'task_id': f'task_{i}',
        'text': f'Write a function that solves problem {i}.',
        'test_list': [
            f'assert func({i}) == {i*2}',
            f'assert func({i+1}) == {(i+1)*2}'
        ],
        'code': f'def func(x):\n    return x * 2'
    }
    examples_data.append(example)

# Write the JSONL file
with open(data_path, 'w') as f:
    for example in examples_data:
        f.write(json.dumps(example) + '\n')

ARGS = {
    'data_path': data_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type generator — a generator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a generator output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
train_tokenize_function Not yet run
unverified (harvested, no recorded run)
deepseek-ai/DeepSeek-Coder/finetune/finetune_deepseekcoder.py
code served (permissive licence) · get_code("975cf022e47318ac")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 2 later) and 8 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
preprocess 23 other papers
8 dated earlier, 1 the same month, 12 later, 2 same year, order not determinable
2305.12870 (2023-05)
Lion: Adversarial Distillation of Proprietary Large Language Models
2306.17194 (2023-06)
On the Exploitability of Instruction Tuning
2308.07286 (2023-08)
The Devil is in the Errors: Leveraging Large Language Models for Fine-grained Machine Translation Evaluation
and 20 more not named here
read_problems 10 other papers
1 dated earlier, 2 the same month, 7 later
2310.20329 (2023-10)
InstructCoder: Instruction Tuning Large Language Models for Code Editing
2401.08565 (2024-01)
Tuning Language Models by Proxy
2401.16405 (2024-01)
Scaling Sparse Fine-Tuning to Large Language Models
and 7 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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. Figure 1 | The Performance of DeepSeek-Coder *Core contributors, ordered alphabetically by the name.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2401.14196")
get_code_for_paper("2401.14196")
have("2401.14196")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2401.14196.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2401.14196.svg)](https://syntology.ai/paper/2401.14196)

Connect an agent — have() is free.