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