evaluating-code-models

Benchmarks code generation models on HumanEval, MBPP, and MultiPL-E with pass@k metrics.

5|2|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/MedTiLab/Auto-meta-analysis --skill evaluating-code-models-medtilab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: evaluating-code-models
Source: https://github.com/MedTiLab/Auto-meta-analysis/tree/main/skills/evaluation/bigcode-evaluation-harness
Command: npx skills add https://github.com/MedTiLab/Auto-meta-analysis --skill evaluating-code-models-medtilab

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Measuring the functional correctness of code generation models requires executing generated code against unit tests across many benchmarks, which is tedious and error-prone to set up manually. This Skill standardizes evaluation of code models across 15+ benchmarks with consistent pass@k metrics comparable to HuggingFace leaderboards. ## Core Features & Use Cases - Standard Benchmark Evaluation: Run HumanEval, HumanEval+, MBPP, and MBPP+ with configurable temperature, n_samples, and pass@k estimation. - Multi-Language Evaluation: Test models across 18 programming languages via MultiPL-E, using Docker containers for safe code execution. - Instruction Model Support: Evaluate chat and instruction-tuned models with instruct-humaneval and HumanEvalPack tasks using proper instruction tokens. - Use Case: Compare StarCoder2, CodeLlama, and DeepSeek-Coder on HumanEval and MBPP, then generate a markdown comparison table of pass@1 scores for a model selection report. ## Quick Start Ask the AI to evaluate the bigcode/starcoder2-7b model on the HumanEval benchmark with 200 samples and report the pass@1, pass@10, and pass@100 scores.

Frequently Asked Questions about evaluating-code-models

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

FAQPage Schema
How do I evaluate a code generation model on HumanEval?▼

Run accelerate launch main.py with --model pointing to your HuggingFace model, --tasks humaneval, --n_samples 200, --temperature 0.8, and --allow_code_execution. Results are saved as JSON containing pass@1, pass@10, and pass@100 scores.

What is the difference between HumanEval and HumanEval+?▼

HumanEval+ uses the same 164 problems as HumanEval but with 80 times more test cases per problem, catching solutions that pass original tests but fail on edge cases. Execution takes longer due to the additional tests.

How do I evaluate code models across multiple programming languages?▼

Use MultiPL-E tasks named multiple-{lang} for 18 languages including JavaScript, Java, C++, Go, and Rust. Generate solutions on the host with --generation_only, then evaluate inside the official MultiPL-E Docker image for safe execution.

Why do my pass@k results differ from published leaderboard scores?▼

Mismatches usually come from wrong n_samples (use 200 for accurate pass@k), incorrect temperature (0.2 for pass@1, 0.8 for higher k), inexact task names, or missing instruction tokens for chat models. Verify each parameter against the reference configuration.

How do I fix CUDA out of memory errors during evaluation?▼

Enable quantization with --load_in_8bit or --load_in_4bit, reduce --batch_size to 1, set --max_memory_per_gpu to a limit like 20GiB, or use half precision with --precision fp16. A 7B model needs about 14GB VRAM in fp16 or 6GB in 4-bit.

When should I use BigCode Evaluation Harness versus lm-evaluation-harness?▼

Use BigCode Evaluation Harness for code generation benchmarks requiring functional correctness testing with pass@k metrics. Use lm-evaluation-harness for general LLM benchmarks like MMLU, GSM8K, and HellaSwag that do not involve code execution.