AI Datasets
Esc

    ↑↓ move↵ open/ search from any page

    Papers / LLMs

    Codex (2021)

    Evaluating Large Language Models Trained on Code

    A GPT model fine-tuned on GitHub code, and HumanEval, the benchmark that grades generated programs by running their unit tests.

    Why it matters

    A production version of Codex powered GitHub Copilot, the first coding assistant used by millions of programmers. HumanEval and pass@k became the standard way to measure code generation for years, and the idea of grading by execution carried over to every coding benchmark since, including SWE-bench and Terminal-Bench.

    First page of “Evaluating Large Language Models Trained on Code”

    The first page, as published. Read the full paper, with summaries and discussion, on alphaxiv.org.

    Year
    2021
    Authors
    Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al.
    Venue
    arXiv July 2021
    Data
    HumanEval

    The idea

    Fine-tune GPT models of up to 12B parameters on 159 GB of Python files from 54 million public GitHub repositories. Judge the output the way programmers do: a generated function counts only if it passes hidden unit tests, not if it looks like a reference solution. To make that measurable, write 164 new problems by hand (HumanEval) and report pass@k, the chance that at least one of k samples passes.

    The result

    Codex-12B solved 28.8% of HumanEval problems with one sample, where GPT-3 solved none and the 6B GPT-J 11.6%. A version further tuned on standalone functions reached 37.7%, and 77.5% when allowed 100 samples and a check against the tests. Similar-looking code was often wrong: BLEU scores barely separated correct from incorrect programs.

    The data

    HumanEval

    2021

    164 hand-written Python problems graded by unit tests. (same year)

    def how_many_times(string: str, substring: str) -> int:

    Builds on

    • GPT-3 (2020): A 175-billion-parameter language model that learns new tasks from a few examples in its prompt.

    Led to

    • SWE-bench (2023): Turned 2,294 real GitHub issues into tasks where a model must patch the repository so that the project's own tests pass.