Papers › Evaluating Large Language Models Trained on Code

Evaluating Large Language Models Trained on Code

7 Jul 2021arXiv:2107.03374archive 2025-07-28

Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, Dave Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William Hebgen Guss, Alex Nichol, Alex Paino, Nikolas Tezak, Jie Tang, Igor Babuschkin, Suchir Balaji, Shantanu Jain, William Saunders, Christopher Hesse, Andrew N. Carr, Jan Leike, Josh Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Bob McGrew, Dario Amodei, Sam McCandlish, Ilya Sutskever, Wojciech Zaremba

We introduce Codex, a GPT language model fine-tuned on publicly available code from GitHub, and study its Python code-writing capabilities. A distinct production version of Codex powers GitHub Copilot. On HumanEval, a new evaluation set we release to measure functional correctness for synthesizing programs from docstrings, our model solves 28.8% of the problems, while GPT-3 solves 0% and GPT-J solves 11.4%. Furthermore, we find that repeated sampling from the model is a surprisingly effective strategy for producing working solutions to difficult prompts. Using this method, we solve 70.2% of our problems with 100 samples per problem. Careful investigation of our model reveals its limitations, including difficulty with docstrings describing long chains of operations and with binding operations to variables. Finally, we discuss the potential broader impacts of deploying powerful code generation technologies, covering safety, security, and economics.

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="2107.03374")

Code

Syntology Ran 6 of 39 code samples harvested from 6 repositories linked to this paper; 33 have no recorded run. Of those that ran: 1 ran · honoured contract; 2 ran · our draft was wrong; 3 ran with no contract checked.

By repository: official repository: 5 samples from 1 repository, 2 ran; community (archive-listed): 22 samples from 4 repositories, 4 ran; found in paper text by Syntology: 12 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

13 repositories listed; official and paper-mentioned ones first.

openai/human-eval officialmentioned in papermentioned on GitHub report
2796gaurav/human-eval mentioned on GitHubMIT report
THUDM/CodeGeeX mentioned on GitHubmindsporeApache-2.0 report
codedotal/gpt-code-clippy mentioned on GitHubjaxApache-2.0 report
codefuse-ai/codefuse-evaluation mentioned on GitHubpytorchNOASSERTION report
fsoft-ai4code/codecapybara mentioned on GitHubpytorch report
glouppe/info8010-deep-learning mentioned on GitHubpytorch report
ncoop57/gpt-code-clippy mentioned on GitHubjaxApache-2.0 report
superli3/CYRMPR mentioned on GitHubtf report
superli3/codenavi mentioned on GitHubtf report
vhellendoorn/code-lms mentioned on GitHubMIT 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

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

1ran · honoured contract
2ran · our draft was wrong
3ran
33unverified

Licence: 2 of the 39 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 6 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.

chdir openai/human-eval/human_eval/execution.py official repository ran · our draft was wrong MIT (permissive) · 4ed7a6255ffcd3e2 · report
create_tempdir openai/human-eval/human_eval/execution.py official repository ran MIT (permissive) · 1214e44aeb74f364 · report
check_correctness openai/human-eval/human_eval/execution.py official repository unverified MIT (permissive) · 87135198de7ec14b · report
reliability_guard openai/human-eval/human_eval/execution.py official repository unverified MIT (permissive) · 53e4784adcaf6602 · report
unsafe_execute openai/human-eval/human_eval/execution.py official repository unverified MIT (permissive) · 3c91bdab594f03c5 · report
estimate_pass_at_k 2796gaurav/human-eval/human_eval/evaluation.py community (archive-listed) ran · our draft was wrong fingerprinted MIT recorded; this copy not marked cleared · pointer only · e080db2eaa81fdb3 · report
find_indentation codedotal/gpt-code-clippy/reindent.py community (archive-listed) ran Apache-2.0 (permissive) · f05983c38acfa250 · report
pass_at_k microsoft/PythonProgrammingPuzzles/solvers/codex/run_codex_experiments.py community (archive-listed) ran · honoured contract fingerprinted MIT (permissive) · 2a310ceef0a63386 · report
replace_inline_tabs codedotal/gpt-code-clippy/reindent.py community (archive-listed) ran Apache-2.0 (permissive) · 27f23c533d62061a · report
generate_prompt codedotal/gpt-code-clippy/evaluation/apps_utils/generate_gpt_codes.py community (archive-listed) unverified Apache-2.0 (permissive) · 5bcc0e96c2ae8311 · report
generate_prompt codedotal/gpt-code-clippy/data_processing/apps.py community (archive-listed) unverified Apache-2.0 (permissive) · 73c40ea3df62ea10 · report
get_output_and_retry my-other-github-account/llm-humaneval-benchmarks/launch_pod.py community (archive-listed) unverified MIT (permissive) · 32636ddfa64b46bc · report
get_question codedotal/gpt-code-clippy/evaluation/apps_eval_util.py community (archive-listed) unverified Apache-2.0 (permissive) · ed8331339b4de97c · report
get_solutions codedotal/gpt-code-clippy/evaluation/apps_eval_util.py community (archive-listed) unverified Apache-2.0 (permissive) · 0c83bb0f43b8dc57 · report
get_valid_problems codedotal/gpt-code-clippy/evaluation/apps_eval_util.py community (archive-listed) unverified Apache-2.0 (permissive) · 8bbb265e59e23293 · report
is_digit codedotal/gpt-code-clippy/data_processing/download_license_info.py community (archive-listed) unverified Apache-2.0 (permissive) · 257503e1cf9966ff · report
launch_pod my-other-github-account/llm-humaneval-benchmarks/launch_pod.py community (archive-listed) unverified MIT (permissive) · 8339ab6beb446371 · report
read_problems 2796gaurav/human-eval/human_eval/data.py community (archive-listed) unverified MIT recorded; this copy not marked cleared · pointer only · d3d6eed5a7c21746 · report
reindent_code codedotal/gpt-code-clippy/data_processing/apps.py community (archive-listed) unverified Apache-2.0 (permissive) · b6404d68982b4e0b · report
run microsoft/PythonProgrammingPuzzles/solvers/codex/run_codex_experiments.py community (archive-listed) unverified MIT (permissive) · aa03c033d83047b0 · report
run my-other-github-account/llm-humaneval-benchmarks/benchmark_utils.py community (archive-listed) unverified MIT (permissive) · de45bd615801ae81 · report
run_async my-other-github-account/llm-humaneval-benchmarks/benchmark_utils.py community (archive-listed) unverified MIT (permissive) · f7666066f684b48f · report
run_sync my-other-github-account/llm-humaneval-benchmarks/benchmark_utils.py community (archive-listed) unverified MIT (permissive) · 4d5e8113a82b291c · report
split_into_chunks codedotal/gpt-code-clippy/data_processing/download_license_info.py community (archive-listed) unverified Apache-2.0 (permissive) · d27e3a9c64e09294 · report
start_server my-other-github-account/llm-humaneval-benchmarks/benchmark_manager.py community (archive-listed) unverified MIT (permissive) · 5263f985bd2e84c0 · report
timeout codedotal/gpt-code-clippy/data_processing/download_license_info.py community (archive-listed) unverified Apache-2.0 (permissive) · 2e22b41539e9cf87 · report
wait_for_pod my-other-github-account/llm-humaneval-benchmarks/launch_pod.py community (archive-listed) unverified MIT (permissive) · 8d76e5a80e6c961c · report
add openai/code-align-evals-data/bad-solutions/add.py found in paper text by Syntology unverified MIT (permissive) · 9f6bcf31e58add54 · report
add_elements openai/code-align-evals-data/bad-solutions/add_elements.py found in paper text by Syntology unverified MIT (permissive) · 2cc1153eb2697bbf · report
all_prefixes openai/code-align-evals-data/bad-solutions/all_prefixes.py found in paper text by Syntology unverified MIT (permissive) · 5e866b54fbf03be3 · report
anti_shuffle openai/code-align-evals-data/bad-solutions/anti_shuffle.py found in paper text by Syntology unverified MIT (permissive) · 1a25d7256e5f4bb5 · report
any_int openai/code-align-evals-data/bad-solutions/any_int.py found in paper text by Syntology unverified MIT (permissive) · c3efafd6833cfa4b · report
below_threshold openai/code-align-evals-data/bad-solutions/below_threshold.py found in paper text by Syntology unverified MIT (permissive) · db66d9a5e3e1895b · report
below_zero openai/code-align-evals-data/bad-solutions/below_zero.py found in paper text by Syntology unverified MIT (permissive) · 92fc2114d3e87e85 · report
bf openai/code-align-evals-data/bad-solutions/bf.py found in paper text by Syntology unverified MIT (permissive) · 2ef1476740b6e3dd · report
by_length openai/code-align-evals-data/bad-solutions/by_length.py found in paper text by Syntology unverified MIT (permissive) · f63bbaac0df6c6fe · report
can_arange openai/code-align-evals-data/bad-solutions/can_arange.py found in paper text by Syntology unverified MIT (permissive) · d3bd061f24d302d4 · report
car_race_collision openai/code-align-evals-data/bad-solutions/car_race_collision.py found in paper text by Syntology unverified MIT (permissive) · 968da8e551331977 · report
change_base openai/code-align-evals-data/bad-solutions/change_base.py found in paper text by Syntology unverified MIT (permissive) · 63c649d1e83343f6 · report

Tasks

Code GenerationHumanEvalLanguage ModelingLanguage ModellingMulti-task Language Understanding

Datasets

Introduced by this paper, per the archive.

HumanEval

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Code Generation APPS Codex 12B (Raw) Competition Pass@1 0.50% #12 of 18 Archive leaderboard report
Code Generation APPS Codex 12B (Raw) Competition Pass@1000 13.51% #12 of 18 Archive leaderboard report
Code Generation APPS Codex 12B (Raw) Competition Pass@5 1.00% #12 of 18 Archive leaderboard report
Code Generation APPS Codex 12B (Raw) Competition Pass@any 13.51% #12 of 18 Archive leaderboard report
Code Generation APPS Codex 12B (Raw) Interview Pass@1 1.00% #12 of 18 Archive leaderboard report
Code Generation APPS Codex 12B (Raw) Interview Pass@1000 13.15% #12 of 18 Archive leaderboard report
Code Generation APPS Codex 12B (Raw) Interview Pass@5 1.73% #12 of 18 Archive leaderboard report
Code Generation APPS Codex 12B (Raw) Interview Pass@any 13.15% #12 of 18 Archive leaderboard report
Code Generation APPS Codex 12B (Raw) Introductory Pass@1 5.60% #12 of 18 Archive leaderboard report
Code Generation APPS Codex 12B (Raw) Introductory Pass@1000 35.20% #12 of 18 Archive leaderboard report
Code Generation APPS Codex 12B (Raw) Introductory Pass@5 9.20% #12 of 18 Archive leaderboard report
Code Generation APPS Codex 12B (Raw) Introductory Pass@any 35.20% #12 of 18 Archive leaderboard report
Multi-task Language Understanding BBH-alg code-davinci-002 175B (CoT) Average (%) 73.9 #1 of 7 Archive leaderboard report
Multi-task Language Understanding BBH-nlp code-davinci-002 175B (CoT) Average (%) 73.5 #9 of 15 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

AdamAttentionAttention DropoutBPECosine AnnealingDense ConnectionsDiscriminative Fine-TuningDropoutGPTGPT-3Layer NormalizationLinear LayerLinear Warmup With Cosine AnnealingMulti-Head AttentionResidual ConnectionSoftmaxWeight Decay

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