SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.02120 · ICML · 2024

Magicoder: Empowering Code Generation with OSS-INSTRUCT

Zhe Wang, Yuxiang Wei, Jiawei Liu, Yifeng Ding, Lingming Zhang

arXiv · PDF · Open in the Atlas

Code that ran

1 of 2 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; 1 failure of our instrument; 1 no recorded run), measured 2026-11-23; 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/2312.02120.json · badge: /api/ran/2312.02120.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
ise-uiuc/magicoder canonical (classifier label)
classifier basis: classifier_2025
1 ran · 1 no recorded run
FunctionStatusWhere it lives
extract_seed_code Ran
ran; our contract draft was wrong, not the code
ise-uiuc/magicoder/src/magicoder/generate_data.py
code served (permissive licence) · get_code("4813eb8482f897db")
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) 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 random
from dataclasses import dataclass, field

@dataclass(frozen=True)
class Args:
    seed_code_start_index: int
    max_new_data: int
    continue_from: str | None = field(default=None)
    seed: int = field(default=976)
    temperature: float = field(default=0.0)
    model: str = field(default='gpt-3.5-turbo-1106')
    model_max_tokens: int = field(default=8192)
    max_new_tokens: int = field(default=2500)
    min_lines: int = field(default=1)
    max_lines: int = field(default=15)
    chunk_size: int = field(default=1000)
    dataset_name: str = field(default='bigcode/starcoderdata')
    data_dir: str | None = field(default='python')
    max_considered_data: int | None = field(default=150000)
    tag: str = field(default='', metadata={'help': 'Custom tag as part of the output filename, not affecting the fingerprint'})

    def fingerprint(self, prompt_template: str) -> str:
        return "fp123"

ERROR_MARGIN = 10

SYSTEM = 'You are exceptionally skilled at crafting high-quality programming problems and offering precise solutions.'

def extract_seed_code(args: Args, document: str) -> str:
    lines = document.splitlines(keepends=True)
    start_index = random.choice(range(len(lines)))
    n_lines_to_consider = random.randint(args.min_lines, args.max_lines)
    code = ''.join(lines[start_index:start_index + n_lines_to_consider])
    return code

random.seed(42)

args_instance = Args(
    seed_code_start_index=0,
    max_new_data=100,
    continue_from=None,
    seed=976,
    temperature=0.0,
    model='gpt-3.5-turbo-1106',
    model_max_tokens=8192,
    max_new_tokens=2500,
    min_lines=1,
    max_lines=15,
    chunk_size=1000,
    dataset_name='bigcode/starcoderdata',
    data_dir='python',
    max_considered_data=150000,
    tag=''
)

document_text = """def hello():
    print("Hello, world!")
    return 42

def add(a, b):
    return a + b

class MyClass:
    def __init__(self):
        self.value = 0
    
    def method(self):
        return self.value
"""

ARGS = {
    'args': args_instance,
    'document': document_text
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
Args Not yet run
unverified (harvested, no recorded run)
ise-uiuc/magicoder/src/magicoder/generate_data.py
code served (permissive licence) · get_code("381124c8930ee2e8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 2 samples lifted from this paper's linked repositories, 2 carry a function identity and 0 do not. Of the 2 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 2 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.

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-23.

Repositories linked to this paper

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

Abstract

We introduce Magicoder, a series of fully opensource (code, weights, and data) Large Language Models (LLMs) for code that significantly closes the gap with top code models while having no more than 7B parameters. Magicoder models are trained on 75K synthetic instruction data using OSS-INSTRUCT, a novel approach to enlightening LLMs with open-source code snippets to generate diverse instruction data for code. Our main motivation is to mitigate the inherent bias of the synthetic data generated by LLMs through the wealth of open-source references for the production of more realistic and controllable data. The orthogonality of OSS-INSTRUCT and other data generation methods like Evol-Instruct further enables us to build an enhanced MagicoderS. Both Magicoder and MagicoderS substantially outperform state-of-the-art code models with similar or even larger sizes on a wide range of coding benchmarks. Notably, MagicoderS-CL-7B based on CODELLAMA even surpasses the prominent Chat-GPT on HumanEval+ (66.5 vs. 65.9 in pass@1). Overall, OSS-INSTRUCT opens a new direction for crafting diverse synthetic instruction data for code using abundant open-source references.

For agents

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

get_harvested_code_for_paper("2312.02120")
get_code_for_paper("2312.02120")
have("2312.02120")

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

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

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

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

Connect an agent — have() is free.