← Open Source
openai

human-eval

Code for the paper "Evaluating Large Language Models Trained on Code".

AI EngineeringTest & guardPython
Open on GitHub
Momentum
+2stars in 24 hours+0.1%
3.41k
Stars
475
Forks
+9
This week
3
Contributors
Created 2021-07-06 · Updated 2026-10-16 · #3545 today
Top developers
mpokrassqimingyuanLinyxus

openai/human-eval is ranked 3,545 with 3,406 stars.

Same-category comparison

openai/human-eval is ranked 3,545 among these 8 peers; fantastic-admin/basic is ranked 3,544.

Same-category comparison
NameRankMetrics
ericosiu/ai-marketing-skills3,527
Language:
Python
Stars:
3,637
Forks:
687
any4ai/AnyCrawl3,538
Language:
TypeScript
Stars:
3,481
Forks:
370
Description:
AnyCrawl 🚀: A Node.js/TypeScript crawler that turns websites into LLM-ready data and extracts structured SERP results from Google/Bing/Baidu/etc. Native multi-threading for bulk processing.
batrachianai/toad3,539
Language:
Python
Stars:
3,478
Forks:
158
Description:
A unified interface for AI in your terminal.
fantastic-admin/basic3,544
Language:
Vue
Stars:
3,418
Forks:
399
Description:
AI-oriented management system framework, compatible with PC and mobile device.
ANative-Lab/EvoAgentX3,549
Language:
Python
Stars:
3,384
Forks:
317
Description:
🚀 EvoAgentX: Building a Self-Evolving Ecosystem of AI Agents.
vladmandic/human3,554
Language:
HTML
Stars:
3,351
Forks:
454
Description:
Human: AI-powered 3D Face Detection & Rotation Tracking, Face Description & Recognition, Body Pose Tracking, 3D Hand & Finger Tracking, Iris Analysis, Age & Gender & Emotion Prediction, Gaze Tracking, Gesture Recognition.
vectara/hallucination-leaderboard3,556
Language:
Python
Stars:
3,321
Forks:
107
Description:
Leaderboard Comparing LLM Performance at Producing Hallucinations when Summarizing Short Documents.
pasky/chrome-cdp-skill3,563
Language:
JavaScript
Stars:
3,279
Forks:
202
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryAI Engineering
SubcategoryTest & guard
KeywordsBenchmarks
Stars3,406
Forks475
Contributors3
Created date2021-07-06
Updated date2026-10-16
Stars in 1 day2
Stars in 7 days9
Rank3,545
Previous rank2,980
Rank change-565
7-day stars rank4,155
Previous 7-day stars rank5,021
7-day stars rank change866
Total stars rank4,026
Previous total stars rank4,022
Total stars rank change-4
CountryUSA
README summary

HumanEval: Hand-Written Evaluation Set **Deprecated and unmaintained:** This repository is no longer maintained and is provided for historical reference, without ongoing support or updates. This is an evaluation harness for the HumanEval problem solving dataset described in the paper "Evaluating Large Language Models Trained on Code". 7 or later: Check out and install this repository: Usage **This program exists to run untrusted model-generated code. Users are strongly encouraged not to do so outside of a robust security sandbox

. The execution call in is deliberately commented out to ensure users read this disclaimer before running code in a potentially unsafe manner. See the comment in for more information and instructions. ** After following the above instructions to enable execution, generate samples and save them in the following JSON Lines (jsonl) format, where each sample is formatted into a single line like so: We provide and under to illustrate the format and help with debugging. Here is nearly functional example code

(you just have to provide to make it work) that saves generated completions to . To evaluate the samples, run This script provides more fine-grained information in a new file ending in . Each row now contains whether the completion along with the execution which is one of "passed", "timed out", or "failed". As a quick sanity-check, the example samples should yield 0. Because there is no unbiased way of estimating pass@k when there are fewer samples than k

, the script does not evaluate pass@k for these cases. For other options, see However, we recommend that you use the default values for the rest. Known Issues While evaluation uses very little memory, you might see the following error message when the system is running out of RAM. Since this may cause some correct programs to fail, we recommend that you free some memory and try again. Citation Please cite using the following bibtex entry:

Frequently asked questions

How many stars and forks are recorded?

openai/human-eval has 3,406 stars and 475 forks.

What is the repository rank?

openai/human-eval is ranked 3,545.

What language and category are recorded?

openai/human-eval has 3,406 stars, uses Python and belongs to AI Engineering.

Which repository is closest in rank?

openai/human-eval is compared with fantastic-admin/basic, ranked 3,544 with 3,418 stars.

README

HumanEval: Hand-Written Evaluation Set

Deprecated and unmaintained: This repository is no longer maintained and is provided for historical reference, without ongoing support or updates. Use it at your own risk.

This is an evaluation harness for the HumanEval problem solving dataset described in the paper "Evaluating Large Language Models Trained on Code".

Installation

Make sure to use python 3.7 or later:

$ conda create -n codex python=3.7
$ conda activate codex

Check out and install this repository:

$ git clone https://github.com/openai/human-eval
$ pip install -e human-eval

Usage

This program exists to run untrusted model-generated code. Users are strongly encouraged not to do so outside of a robust security sandbox. The execution call in execution.py is deliberately commented out to ensure users read this disclaimer before running code in a potentially unsafe manner. See the comment in execution.py for more information and instructions.

After following the above instructions to enable execution, generate samples and save them in the following JSON Lines (jsonl) format, where each sample is formatted into a single line like so:

{"task_id": "Corresponding HumanEval task ID", "completion": "Completion only without the prompt"}

We provide example_problem.jsonl and example_solutions.jsonl under data to illustrate the format and help with debugging.

Here is nearly functional example code (you just have to provide generate_one_completion to make it work) that saves generated completions to samples.jsonl.

from human_eval.data import write_jsonl, read_problems

problems = read_problems()

num_samples_per_task = 200
samples = [
    dict(task_id=task_id, completion=generate_one_completion(problems[task_id]["prompt"]))
    for task_id in problems
    for _ in range(num_samples_per_task)
]
write_jsonl("samples.jsonl", samples)

To evaluate the samples, run

$ evaluate_functional_correctness samples.jsonl
Reading samples...
32800it [00:01, 23787.50it/s]
Running test suites...
100%|...| 32800/32800 [16:11<00:00, 33.76it/s]
Writing results to samples.jsonl_results.jsonl...
100%|...| 32800/32800 [00:00<00:00, 42876.84it/s]
{'pass@1': ..., 'pass@10': ..., 'pass@100': ...}

This script provides more fine-grained information in a new file ending in _results.jsonl. Each row now contains whether the completion passed along with the execution result which is one of "passed", "timed out", or "failed".

As a quick sanity-check, the example samples should yield 0.5 pass@1.

$ evaluate_functional_correctness data/example_samples.jsonl --problem_file=data/example_problem.jsonl
Reading samples...
6it [00:00, 3397.11it/s]
Running example suites...
100%|...| 6/6 [00:03<00:00,  1.96it/s]
Writing results to data/example_samples.jsonl_results.jsonl...
100%|...| 6/6 [00:00<00:00, 6148.50it/s]
{'pass@1': 0.4999999999999999}

Because there is no unbiased way of estimating pass@k when there are fewer samples than k, the script does not evaluate pass@k for these cases. To evaluate with other k values, pass --k=. For other options, see

$ evaluate_functional_correctness --help

However, we recommend that you use the default values for the rest.

Known Issues

While evaluation uses very little memory, you might see the following error message when the system is running out of RAM. Since this may cause some correct programs to fail, we recommend that you free some memory and try again.

malloc: can't allocate region

Citation

Please cite using the following bibtex entry:

@article{chen2021codex,
  title={Evaluating Large Language Models Trained on Code},
  author={Mark Chen and Jerry Tworek and Heewoo Jun and Qiming Yuan and Henrique Ponde de Oliveira Pinto and Jared Kaplan and Harri Edwards and Yuri Burda and Nicholas Joseph and Greg Brockman and Alex Ray and Raul Puri and Gretchen Krueger and Michael Petrov and Heidy Khlaaf and Girish Sastry and Pamela Mishkin and Brooke Chan and Scott Gray and Nick Ryder and Mikhail Pavlov and Alethea Power and Lukasz Kaiser and Mohammad Bavarian and Clemens Winter and Philippe Tillet and Felipe Petroski Such and Dave Cummings and Matthias Plappert and Fotios Chantzis and Elizabeth Barnes and Ariel Herbert-Voss and William Hebgen Guss and Alex Nichol and Alex Paino and Nikolas Tezak and Jie Tang and Igor Babuschkin and Suchir Balaji and Shantanu Jain and William Saunders and Christopher Hesse and Andrew N. Carr and Jan Leike and Josh Achiam and Vedant Misra and Evan Morikawa and Alec Radford and Matthew Knight and Miles Brundage and Mira Murati and Katie Mayer and Peter Welinder and Bob McGrew and Dario Amodei and Sam McCandlish and Ilya Sutskever and Wojciech Zaremba},
  year={2021},
  eprint={2107.03374},
  archivePrefix={arXiv},
  primaryClass={cs.LG}
}
Nearby in the ranking
Similar items