Papers › InstructCoder: Instruction Tuning Large Language Models for Code Editing

InstructCoder: Instruction Tuning Large Language Models for Code Editing

31 Oct 2023arXiv:2310.20329archive 2025-07-28

Kaixin Li, Qisheng Hu, Xu Zhao, Hui Chen, Yuxi Xie, Tiedong Liu, Qizhe Xie, Junxian He

Code editing encompasses a variety of pragmatic tasks that developers deal with daily. Despite its relevance and practical usefulness, automatic code editing remains an underexplored area in the evolution of deep learning models, partly due to data scarcity. In this work, we explore the use of Large Language Models (LLMs) to edit code based on user instructions. Evaluated on a novel human-written execution-based benchmark dubbed EditEval, we found current models often struggle to fulfill the instructions. In light of this, we contribute InstructCoder, the first instruction-tuning dataset designed to adapt LLMs for general-purpose code editing, containing high-diversity code-editing tasks such as comment insertion, code optimization, and code refactoring. It consists of over 114,000 instruction-input-output triplets and covers multiple distinct code editing scenarios. The collection process starts with filtered commit data sourced from GitHub Python repositories as seeds. Subsequently, the dataset is systematically expanded through an iterative process, where both seed and generated tasks are used to prompt ChatGPT for more data. Our findings reveal that open-source LLMs fine-tuned on InstructCoder can significantly enhance the accuracy of code edits, exhibiting superior code-editing performance matching advanced proprietary LLMs. The datasets and the source code are publicly available at https://github.com/qishenghu/CodeInstruct.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2310.20329")

Code

Syntology Ran 14 of 15 code samples harvested from 2 repositories linked to this paper; 1 has no recorded run. Of those that ran: 2 ran · our draft was wrong; 12 ran with no contract checked.

By repository: official repository: 14 samples from 1 repository, 13 ran; community (archive-listed): 1 sample from 1 repository, 1 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

qishenghu/CodeInstruct officialmentioned in papermentioned on GitHubMIT report
qishenghu/instructcoder mentioned on GitHub report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 14 ran; 0 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
12ran
1unverified

Licence: 0 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

build_program_and_tests qishenghu/CodeInstruct/edit_eval/evaluation.py official repository ran MIT (permissive) · dcc63461ed8faa9d · report
build_program_and_tests qishenghu/CodeInstruct/edit_eval/validate_dataset.py official repository ran MIT (permissive) · 08c63a2c53e2dbbc · report
check_correctness qishenghu/CodeInstruct/edit_eval/execution.py official repository ran MIT (permissive) · d76cd6028267121b · report
chunk qishenghu/CodeInstruct/src/request_helper.py official repository ran fingerprinted MIT (permissive) · 18f3d41c3a3ca45f · report
estimate_pass_at_k qishenghu/CodeInstruct/edit_eval/evaluation.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · e080db2eaa81fdb3 · report
format_filter qishenghu/CodeInstruct/src/postprocess.py official repository ran fingerprinted MIT (permissive) · 7dcc28da7fcf7d21 · report
format_instance qishenghu/CodeInstruct/src/postprocess.py official repository ran fingerprinted MIT (permissive) · 7e14c9de72446b8b · report
get_rouge_scores qishenghu/CodeInstruct/src/bootstrap_instructions.py official repository ran MIT (permissive) · c833dfb4c07dd2c0 · report
init_logger qishenghu/CodeInstruct/edit_eval/utils.py official repository ran MIT (permissive) · db2f749312721290 · report
load_file qishenghu/CodeInstruct/src/generate_instance.py official repository ran fingerprinted MIT (permissive) · c0bdcc7c326efa00 · report
query_for_instance qishenghu/CodeInstruct/src/generate_instance.py official repository ran MIT (permissive) · e84eec1ac7ee2f18 · report
query_for_instruction qishenghu/CodeInstruct/src/bootstrap_instructions.py official repository ran MIT (permissive) · e23c1c2c0288f4d7 · report
query_for_scenarios qishenghu/CodeInstruct/src/generate_scenarios.py official repository ran MIT (permissive) · 9e26c9a9ed5f3dd2 · report
read_problems qishenghu/CodeInstruct/edit_eval/data.py official repository unverified MIT (permissive) · 776a712a353130e7 · report
sample_items qishenghu/instructcoder/src/bootstrap_instructions.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · e62750b3c8c67f42 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections