Evaluating large language models trained on code

OpenAI Blog Papers

Summary

OpenAI introduces Codex, a GPT model fine-tuned on GitHub code, achieving 28.8% functional correctness on HumanEval (a new benchmark for code synthesis from docstrings), significantly outperforming GPT-3 (0%) and GPT-J (11.4%). The paper demonstrates that repeated sampling improves performance to 70.2% with 100 samples, and discusses limitations and broader impacts of code generation systems.

No content available
Original Article
View Cached Full Text

Cached at: 04/20/26, 02:55 PM

# Evaluating large language models trained on code Source: [https://openai.com/index/evaluating-large-language-models-trained-on-code/](https://openai.com/index/evaluating-large-language-models-trained-on-code/) ## Abstract 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\.

Similar Articles

OpenAI Codex

OpenAI Blog

OpenAI Codex is a GPT-3 descendant trained on natural language and billions of lines of source code, capable of generating working code across 15+ programming languages with 3.5x more context memory than GPT-3, now available in private beta via API.

Introducing GPT-5.3-Codex

OpenAI Blog

OpenAI introduces GPT-5.3-Codex, an advanced agentic coding model that combines frontier coding capabilities with reasoning and professional knowledge, achieving state-of-the-art performance on SWE-Bench Pro and Terminal-Bench while being 25% faster than its predecessor.

Introducing upgrades to Codex

OpenAI Blog

OpenAI releases GPT-5-Codex, an optimized version of GPT-5 specialized for agentic software engineering tasks, available via API and across Codex's integrated development environment with improved code review capabilities and long-form task execution.

Building more with GPT-5.1-Codex-Max

OpenAI Blog

OpenAI introduces GPT-5.1-Codex-Max, a new agentic coding model with improved reasoning, token efficiency, and the ability to maintain coherent work across millions of tokens through a 'compaction' mechanism. The model is faster, more intelligent, and can sustain long-running tasks for hours or days, representing a significant advancement in AI-assisted software engineering.

Addendum to GPT-5 system card: GPT-5-Codex

OpenAI Blog

OpenAI has released GPT-5-Codex, a version of GPT-5 optimized for agentic coding tasks, trained with reinforcement learning on real-world coding environments. It is available via Codex CLI, IDE extensions, GitHub, and ChatGPT mobile, with comprehensive safety measures including sandboxing and prompt injection mitigations.