evaluating-code-models

Evaluate code generation models across HumanEval, MBPP, MultiPL-E, and 15+ benchmarks with pass@k metrics.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/hhhi21g/HealthCenter --skill evaluating-code-models-hhhi21g
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evaluating-code-models
Source: https://github.com/hhhi21g/HealthCenter/tree/main/.codex/skills/bigcode-evaluation-harness
Command: npx skills add https://github.com/hhhi21g/HealthCenter --skill evaluating-code-models-hhhi21g

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires transformers>=4.25.1, accelerate>=0.13.2, datasets>=2.6.1, bigcode-evaluation-harness, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill solves the problem of benchmarking and comparing code generation models across a wide range of benchmarks, allowing users to assess the performance and capabilities of different models.

Core Features & Use Cases

  • Benchmarking: Evaluate models on benchmarks like HumanEval, MBPP, MultiPL-E, and more.
  • Comparison: Compare models based on pass@k metrics to understand their coding abilities and multi-language support.
  • Use Case: For researchers and developers looking to test and compare code generation models, this Skill provides a comprehensive evaluation suite to measure code generation quality and performance.

Quick Start

To evaluate a code generation model on HumanEval using the BigCode Evaluation Harness, run the following command:

accelerate launch main.py \
  --model bigcode/starcoder2-7b \
  --tasks humaneval \
  --max_length_generation 512 \
  --temperature 0.2 \
  --n_samples 20 \
  --batch_size 10 \
  --allow_code_execution \
  --save_generations

Frequently Asked Questions about evaluating-code-models

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to benchmark code generation models on HumanEval and MBPP?

pass@k metrics measure the probability that at least one of the top k generated code samples passes the unit tests for a given benchmark task. They are the industry standard for evaluating code generation models on benchmarks like HumanEval and MBPP.

How do I evaluate a code generation model with HuggingFace transformers and accelerate?

To evaluate a code generation model, launch the evaluation harness using accelerate with your chosen transformers model, specify tasks like humaneval, set generation parameters, and allow code execution. This runs the model against the benchmarks and saves the generated outputs.

Does the BigCode evaluation harness support MultiPL-E for multi-language code generation benchmarks?

Yes, the BigCode evaluation harness supports MultiPL-E, allowing you to evaluate code generation models across multiple programming languages. It includes 15+ benchmarks to comprehensively test multi-language coding capabilities using pass@k metrics.

What dependencies do I need to run pass@k evaluations for code generation?

To run pass@k evaluations for code generation, you need the bigcode-evaluation-harness along with transformers, accelerate, and datasets libraries. These dependencies facilitate model loading, distributed execution, and benchmark dataset processing.

Why do I need to allow code execution when evaluating code generation models?

Allowing code execution is required to verify the functional correctness of the generated code samples against the benchmark unit tests. The evaluation harness executes the generated code to calculate accurate pass@k metrics for models on benchmarks like HumanEval and MBPP.