[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6QEDA7QZPSB5QGSZNK0PVGZ":3,"skill-same:01M6QEDA7QZPSB5QGSZNK0PVGZ":92},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":14,"repositoryHtmlUrl":58,"repositoryHomepageUrl":59,"ownerHtmlUrl":60,"ownerBlogUrl":61,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M6QEDA7QZPSB5QGSZNK0PVGZ","evaluating-code-models",null,"Evaluates code generation models across HumanEval, MBPP, MultiPL-E, and 15+ benchmarks with pass@k metrics. Use when benchmarking code models, comparing coding abilities, testing multi-language support, or measuring code generation quality. Industry standard from BigCode Project used by HuggingFace leaderboards.","Tashima-Tarsh\u002FDisha6.6","Tashima-Tarsh","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F269906498?v=4","01M6PBH98X03XERH0HFT4PFB1P","NITISH KUMAR","01M6PBH9DA0M6KM3Z12P848F0K",0,"MIT","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-evaluating-code-models\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"evaluating code models","code","models","Code Models","BigCode","multipl","Accelerate","project","across","Safety","Transformers","testing","Pass@k","MultiPL-E","MBPP","HumanEval","Code Generation","Evaluation","benchmarking","support","2026-11-10 10:12:30",false,"---\nname: evaluating-code-models\ndescription: Evaluates code generation models across HumanEval, MBPP, MultiPL-E, and 15+ benchmarks with pass@k metrics. Use when benchmarking code models, comparing coding abilities, testing multi-language support, or measuring code generation quality. Industry standard from BigCode Project used by HuggingFace leaderboards.\nlicense: MIT\nmetadata:\n  version: 1.0.0\n  category: ml-evaluation-and-safety\n  maintainer: Kalaris Labs\n  tags: Evaluation, Code Generation, HumanEval, MBPP, MultiPL-E, Pass@k, BigCode, Benchmarking, Code Models\n  dependencies: bigcode-evaluation-harness, transformers>=4.25.1, accelerate>=0.13.2, datasets>=2.6.1\n---\n\n# BigCode Evaluation Harness - Code Model Benchmarking\n\n## Quick Start\n\nBigCode Evaluation Harness evaluates code generation models across 15+ benchmarks including HumanEval, MBPP, and MultiPL-E (18 languages).\n\n**Installation**:\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fbigcode-project\u002Fbigcode-evaluation-harness.git\ncd bigcode-evaluation-harness\npip install -e .\naccelerate config\n```\n\n**Evaluate on HumanEval**:\n```bash\naccelerate launch main.py \\\n  --model bigcode\u002Fstarcoder2-7b \\\n  --tasks humaneval \\\n  --max_length_generation 512 \\\n  --temperature 0.2 \\\n  --n_samples 20 \\\n  --batch_size 10 \\\n  --allow_code_execution \\\n  --save_generations\n```\n\n**View available tasks**:\n```bash\npython -c \"from bigcode_eval.tasks import ALL_TASKS; print(ALL_TASKS)\"\n```\n\n## Common Workflows\n\n### Workflow 1: Standard Code Benchmark Evaluation\n\nEvaluate model on core code benchmarks (HumanEval, MBPP, HumanEval+).\n\n**Checklist**:\n```\nCode Benchmark Evaluation:\n- [ ] Step 1: Choose benchmark suite\n- [ ] Step 2: Configure model and generation\n- [ ] Step 3: Run evaluation with code execution\n- [ ] Step 4: Analyze pass@k results\n```\n\n**Step 1: Choose benchmark suite**\n\n**Python code generation** (most common):\n- **HumanEval**: 164 handwritten problems, function completion\n- **HumanEval+**: Same 164 problems with 80× more tests (stricter)\n- **MBPP**: 500 crowd-sourced problems, entry-level difficulty\n- **MBPP+**: 399 curated problems with 35× more tests\n\n**Multi-language** (18 languages):\n- **MultiPL-E**: HumanEval\u002FMBPP translated to C++, Java, JavaScript, Go, Rust, etc.\n\n**Advanced**:\n- **APPS**: 10,000 problems (introductory\u002Finterview\u002Fcompetition)\n- **DS-1000**: 1,000 data science problems across 7 libraries\n\n**Step 2: Configure model and generation**\n\n```bash\n# Standard HuggingFace model\naccelerate launch main.py \\\n  --model bigcode\u002Fstarcoder2-7b \\\n  --tasks humaneval \\\n  --max_length_generation 512 \\\n  --temperature 0.2 \\\n  --do_sample True \\\n  --n_samples 200 \\\n  --batch_size 50 \\\n  --allow_code_execution\n\n# Quantized model (4-bit)\naccelerate launch main.py \\\n  --model codellama\u002FCodeLlama-34b-hf \\\n  --tasks humaneval \\\n  --load_in_4bit \\\n  --max_length_generation 512 \\\n  --allow_code_execution\n\n# Custom\u002Fprivate model\naccelerate launch main.py \\\n  --model \u002Fpath\u002Fto\u002Fmy-code-model \\\n  --tasks humaneval \\\n  --trust_remote_code \\\n  --use_auth_token \\\n  --allow_code_execution\n```\n\n**Step 3: Run evaluation**\n\n```bash\n# Full evaluation with pass@k estimation (k=1,10,100)\naccelerate launch main.py \\\n  --model bigcode\u002Fstarcoder2-7b \\\n  --tasks humaneval \\\n  --temperature 0.8 \\\n  --n_samples 200 \\\n  --batch_size 50 \\\n  --allow_code_execution \\\n  --save_generations \\\n  --metric_output_path results\u002Fstarcoder2-humaneval.json\n```\n\n**Step 4: Analyze results**\n\nResults in `results\u002Fstarcoder2-humaneval.json`:\n```json\n{\n  \"humaneval\": {\n    \"pass@1\": 0.354,\n    \"pass@10\": 0.521,\n    \"pass@100\": 0.689\n  },\n  \"config\": {\n    \"model\": \"bigcode\u002Fstarcoder2-7b\",\n    \"temperature\": 0.8,\n    \"n_samples\": 200\n  }\n}\n```\n\n### Workflow 2: Multi-Language Evaluation (MultiPL-E)\n\nEvaluate code generation across 18 programming languages.\n\n**Checklist**:\n```\nMulti-Language Evaluation:\n- [ ] Step 1: Generate solutions (host machine)\n- [ ] Step 2: Run evaluation in Docker (safe execution)\n- [ ] Step 3: Compare across languages\n```\n\n**Step 1: Generate solutions on host**\n\n```bash\n# Generate without execution (safe)\naccelerate launch main.py \\\n  --model bigcode\u002Fstarcoder2-7b \\\n  --tasks multiple-py,multiple-js,multiple-java,multiple-cpp \\\n  --max_length_generation 650 \\\n  --temperature 0.8 \\\n  --n_samples 50 \\\n  --batch_size 50 \\\n  --generation_only \\\n  --save_generations \\\n  --save_generations_path generations_multi.json\n```\n\n**Step 2: Evaluate in Docker container**\n\n```bash\n# Pull the MultiPL-E Docker image\ndocker pull ghcr.io\u002Fbigcode-project\u002Fevaluation-harness-multiple\n\n# Run evaluation inside container\ndocker run -v $(pwd)\u002Fgenerations_multi.json:\u002Fapp\u002Fgenerations.json:ro \\\n  -it evaluation-harness-multiple python3 main.py \\\n  --model bigcode\u002Fstarcoder2-7b \\\n  --tasks multiple-py,multiple-js,multiple-java,multiple-cpp \\\n  --load_generations_path \u002Fapp\u002Fgenerations.json \\\n  --allow_code_execution \\\n  --n_samples 50\n```\n\n**Supported languages**: Python, JavaScript, Java, C++, Go, Rust, TypeScript, C#, PHP, Ruby, Swift, Kotlin, Scala, Perl, Julia, Lua, R, Racket\n\n### Workflow 3: Instruction-Tuned Model Evaluation\n\nEvaluate chat\u002Finstruction models with proper formatting.\n\n**Checklist**:\n```\nInstruction Model Evaluation:\n- [ ] Step 1: Use instruction-tuned tasks\n- [ ] Step 2: Configure instruction tokens\n- [ ] Step 3: Run evaluation\n```\n\n**Step 1: Choose instruction tasks**\n\n- **instruct-humaneval**: HumanEval with instruction prompts\n- **humanevalsynthesize-{lang}**: HumanEvalPack synthesis tasks\n\n**Step 2: Configure instruction tokens**\n\n```bash\n# For models with chat templates (e.g., CodeLlama-Instruct)\naccelerate launch main.py \\\n  --model codellama\u002FCodeLlama-7b-Instruct-hf \\\n  --tasks instruct-humaneval \\\n  --instruction_tokens \"\u003Cs>[INST],\u003C\u002Fs>,[\u002FINST]\" \\\n  --max_length_generation 512 \\\n  --allow_code_execution\n```\n\n**Step 3: HumanEvalPack for instruction models**\n\n```bash\n# Test code synthesis across 6 languages\naccelerate launch main.py \\\n  --model codellama\u002FCodeLlama-7b-Instruct-hf \\\n  --tasks humanevalsynthesize-python,humanevalsynthesize-js \\\n  --prompt instruct \\\n  --max_length_generation 512 \\\n  --allow_code_execution\n```\n\n### Workflow 4: Compare Multiple Models\n\nBenchmark suite for model comparison.\n\n**Step 1: Create evaluation script**\n\n```bash\n#!\u002Fbin\u002Fbash\n# eval_models.sh\n\nMODELS=(\n  \"bigcode\u002Fstarcoder2-7b\"\n  \"codellama\u002FCodeLlama-7b-hf\"\n  \"deepseek-ai\u002Fdeepseek-coder-6.7b-base\"\n)\nTASKS=\"humaneval,mbpp\"\n\nfor model in \"${MODELS[@]}\"; do\n  model_name=$(echo $model | tr '\u002F' '-')\n  echo \"Evaluating $model\"\n\n  accelerate launch main.py \\\n    --model $model \\\n    --tasks $TASKS \\\n    --temperature 0.2 \\\n    --n_samples 20 \\\n    --batch_size 20 \\\n    --allow_code_execution \\\n    --metric_output_path results\u002F${model_name}.json\ndone\n```\n\n**Step 2: Generate comparison table**\n\n```python\nimport json\nimport pandas as pd\n\nmodels = [\"bigcode-starcoder2-7b\", \"codellama-CodeLlama-7b-hf\", \"deepseek-ai-deepseek-coder-6.7b-base\"]\nresults = []\n\nfor model in models:\n    with open(f\"results\u002F{model}.json\") as f:\n        data = json.load(f)\n        results.append({\n            \"Model\": model,\n            \"HumanEval pass@1\": f\"{data['humaneval']['pass@1']:.3f}\",\n            \"MBPP pass@1\": f\"{data['mbpp']['pass@1']:.3f}\"\n        })\n\ndf = pd.DataFrame(results)\nprint(df.to_markdown(index=False))\n```\n\n## When to Use vs Alternatives\n\n**Use BigCode Evaluation Harness when:**\n- Evaluating **code generation** models specifically\n- Need **multi-language** evaluation (18 languages via MultiPL-E)\n- Testing **functional correctness** with unit tests (pass@k)\n- Benchmarking for **BigCode\u002FHuggingFace leaderboards**\n- Evaluating **fill-in-the-middle** (FIM) capabilities\n\n**Use alternatives instead:**\n- **lm-evaluation-harness**: General LLM benchmarks (MMLU, GSM8K, HellaSwag)\n- **EvalPlus**: Stricter HumanEval+\u002FMBPP+ with more test cases\n- **SWE-bench**: Real-world GitHub issue resolution\n- **LiveCodeBench**: Contamination-free, continuously updated problems\n- **CodeXGLUE**: Code understanding tasks (clone detection, defect prediction)\n\n## Supported Benchmarks\n\n| Benchmark | Problems | Languages | Metric | Use Case |\n|-----------|----------|-----------|--------|----------|\n| HumanEval | 164 | Python | pass@k | Standard code completion |\n| HumanEval+ | 164 | Python | pass@k | Stricter evaluation (80× tests) |\n| MBPP | 500 | Python | pass@k | Entry-level problems |\n| MBPP+ | 399 | Python | pass@k | Stricter evaluation (35× tests) |\n| MultiPL-E | 164×18 | 18 languages | pass@k | Multi-language evaluation |\n| APPS | 10,000 | Python | pass@k | Competition-level |\n| DS-1000 | 1,000 | Python | pass@k | Data science (pandas, numpy, etc.) |\n| HumanEvalPack | 164×3×6 | 6 languages | pass@k | Synthesis\u002Ffix\u002Fexplain |\n| Mercury | 1,889 | Python | Efficiency | Computational efficiency |\n\n## Common Issues\n\n**Issue: Different results than reported in papers**\n\nCheck these factors:\n```bash\n# 1. Verify n_samples (need 200 for accurate pass@k)\n--n_samples 200\n\n# 2. Check temperature (0.2 for greedy-ish, 0.8 for sampling)\n--temperature 0.8\n\n# 3. Verify task name matches exactly\n--tasks humaneval  # Not \"human_eval\" or \"HumanEval\"\n\n# 4. Check max_length_generation\n--max_length_generation 512  # Increase for longer problems\n```\n\n**Issue: CUDA out of memory**\n\n```bash\n# Use quantization\n--load_in_8bit\n# OR\n--load_in_4bit\n\n# Reduce batch size\n--batch_size 1\n\n# Set memory limit\n--max_memory_per_gpu \"20GiB\"\n```\n\n**Issue: Code execution hangs or times out**\n\nUse Docker for safe execution:\n```bash\n# Generate on host (no execution)\n--generation_only --save_generations\n\n# Evaluate in Docker\ndocker run ... --allow_code_execution --load_generations_path ...\n```\n\n**Issue: Low scores on instruction models**\n\nEnsure proper instruction formatting:\n```bash\n# Use instruction-specific tasks\n--tasks instruct-humaneval\n\n# Set instruction tokens for your model\n--instruction_tokens \"\u003Cs>[INST],\u003C\u002Fs>,[\u002FINST]\"\n```\n\n**Issue: MultiPL-E language failures**\n\nUse the dedicated Docker image:\n```bash\ndocker pull ghcr.io\u002Fbigcode-project\u002Fevaluation-harness-multiple\n```\n\n## Command Reference\n\n| Argument | Default | Description |\n|----------|---------|-------------|\n| `--model` | - | HuggingFace model ID or local path |\n| `--tasks` | - | Comma-separated task names |\n| `--n_samples` | 1 | Samples per problem (200 for pass@k) |\n| `--temperature` | 0.2 | Sampling temperature |\n| `--max_length_generation` | 512 | Max tokens (prompt + generation) |\n| `--batch_size` | 1 | Batch size per GPU |\n| `--allow_code_execution` | False | Enable code execution (required) |\n| `--generation_only` | False | Generate without evaluation |\n| `--load_generations_path` | - | Load pre-generated solutions |\n| `--save_generations` | False | Save generated code |\n| `--metric_output_path` | results.json | Output file for metrics |\n| `--load_in_8bit` | False | 8-bit quantization |\n| `--load_in_4bit` | False | 4-bit quantization |\n| `--trust_remote_code` | False | Allow custom model code |\n| `--precision` | fp32 | Model precision (fp32\u002Ffp16\u002Fbf16) |\n\n## Hardware Requirements\n\n| Model Size | VRAM (fp16) | VRAM (4-bit) | Time (HumanEval, n=200) |\n|------------|-------------|--------------|-------------------------|\n| 7B | 14GB | 6GB | ~30 min (A100) |\n| 13B | 26GB | 10GB | ~1 hour (A100) |\n| 34B | 68GB | 20GB | ~2 hours (A100) |\n\n## Resources\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fbigcode-project\u002Fbigcode-evaluation-harness\n- **Documentation**: https:\u002F\u002Fgithub.com\u002Fbigcode-project\u002Fbigcode-evaluation-harness\u002Ftree\u002Fmain\u002Fdocs\n- **BigCode Leaderboard**: https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fbigcode\u002Fbigcode-models-leaderboard\n- **HumanEval Dataset**: https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fopenai\u002Fopenai_humaneval\n- **MultiPL-E**: https:\u002F\u002Fgithub.com\u002Fnuprl\u002FMultiPL-E\n\n## Agent operating procedure\n\n1. **Check the environment.** Confirm the model, checkpoint, benchmark version and evaluation harness version.\n2. **Pin down the inputs.** Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.\n3. **Run a small version first.** Evaluate on a small subset to verify prompts, parsing and scoring.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Use the benchmark's official splits and metrics; check for contamination; report variance across seeds or prompts.\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| Scores differ from published numbers | Check prompt format, few-shot settings and harness version before concluding. |\n| A function, flag or endpoint in these instructions is missing in the installed version | Check the installed version's own documentation (`help()`, `--help`, official docs), adapt, and tell the user. Never invent an API. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Report evaluation settings in full; never cherry-pick prompts, seeds or subsets.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n\n## Related skills\n\n- `evaluating-llms-harness`: Evaluates LLMs across 60+ academic benchmarks (MMLU, HumanEval, GSM8K, TruthfulQA, HellaSwag).\n- `nemo-evaluator-sdk`: Evaluates LLMs across 100+ benchmarks from 18+ harnesses (MMLU, HumanEval, GSM8K, safety, VLM) with multi-backend execution.\n","# BigCode Evaluation Harness - Code Model Benchmarking\n\n## Quick Start\n\nBigCode Evaluation Harness evaluates code generation models across 15+ benchmarks including HumanEval, MBPP, and MultiPL-E (18 languages).\n\n**Installation**:\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fbigcode-project\u002Fbigcode-evaluation-harness.git\ncd bigcode-evaluation-harness\npip install -e .\naccelerate config\n```\n\n**Evaluate on HumanEval**:\n```bash\naccelerate launch main.py \\\n  --model bigcode\u002Fstarcoder2-7b \\\n  --tasks humaneval \\\n  --max_length_generation 512 \\\n  --temperature 0.2 \\\n  --n_samples 20 \\\n  --batch_size 10 \\\n  --allow_code_execution \\\n  --save_generations\n```\n\n**View available tasks**:\n```bash\npython -c \"from bigcode_eval.tasks import ALL_TASKS; print(ALL_TASKS)\"\n```\n\n## Common Workflows\n\n### Workflow 1: Standard Code Benchmark Evaluation\n\nEvaluate model on core code benchmarks (HumanEval, MBPP, HumanEval+).\n\n**Checklist**:\n```\nCode Benchmark Evaluation:\n- [ ] Step 1: Choose benchmark suite\n- [ ] Step 2: Configure model and generation\n- [ ] Step 3: Run evaluation with code execution\n- [ ] Step 4: Analyze pass@k results\n```\n\n**Step 1: Choose benchmark suite**\n\n**Python code generation** (most common):\n- **HumanEval**: 164 handwritten problems, function completion\n- **HumanEval+**: Same 164 problems with 80× more tests (stricter)\n- **MBPP**: 500 crowd-sourced problems, entry-level difficulty\n- **MBPP+**: 399 curated problems with 35× more tests\n\n**Multi-language** (18 languages):\n- **MultiPL-E**: HumanEval\u002FMBPP translated to C++, Java, JavaScript, Go, Rust, etc.\n\n**Advanced**:\n- **APPS**: 10,000 problems (introductory\u002Finterview\u002Fcompetition)\n- **DS-1000**: 1,000 data science problems across 7 libraries\n\n**Step 2: Configure model and generation**\n\n```bash\n# Standard HuggingFace model\naccelerate launch main.py \\\n  --model bigcode\u002Fstarcoder2-7b \\\n  --tasks humaneval \\\n  --max_length_generation 512 \\\n  --temperature 0.2 \\\n  --do_sample True \\\n  --n_samples 200 \\\n  --batch_size 50 \\\n  --allow_code_execution\n\n# Quantized model (4-bit)\naccelerate launch main.py \\\n  --model codellama\u002FCodeLlama-34b-hf \\\n  --tasks humaneval \\\n  --load_in_4bit \\\n  --max_length_generation 512 \\\n  --allow_code_execution\n\n# Custom\u002Fprivate model\naccelerate launch main.py \\\n  --model \u002Fpath\u002Fto\u002Fmy-code-model \\\n  --tasks humaneval \\\n  --trust_remote_code \\\n  --use_auth_token \\\n  --allow_code_execution\n```\n\n**Step 3: Run evaluation**\n\n```bash\n# Full evaluation with pass@k estimation (k=1,10,100)\naccelerate launch main.py \\\n  --model bigcode\u002Fstarcoder2-7b \\\n  --tasks humaneval \\\n  --temperature 0.8 \\\n  --n_samples 200 \\\n  --batch_size 50 \\\n  --allow_code_execution \\\n  --save_generations \\\n  --metric_output_path results\u002Fstarcoder2-humaneval.json\n```\n\n**Step 4: Analyze results**\n\nResults in `results\u002Fstarcoder2-humaneval.json`:\n```json\n{\n  \"humaneval\": {\n    \"pass@1\": 0.354,\n    \"pass@10\": 0.521,\n    \"pass@100\": 0.689\n  },\n  \"config\": {\n    \"model\": \"bigcode\u002Fstarcoder2-7b\",\n    \"temperature\": 0.8,\n    \"n_samples\": 200\n  }\n}\n```\n\n### Workflow 2: Multi-Language Evaluation (MultiPL-E)\n\nEvaluate code generation across 18 programming languages.\n\n**Checklist**:\n```\nMulti-Language Evaluation:\n- [ ] Step 1: Generate solutions (host machine)\n- [ ] Step 2: Run evaluation in Docker (safe execution)\n- [ ] Step 3: Compare across languages\n```\n\n**Step 1: Generate solutions on host**\n\n```bash\n# Generate without execution (safe)\naccelerate launch main.py \\\n  --model bigcode\u002Fstarcoder2-7b \\\n  --tasks multiple-py,multiple-js,multiple-java,multiple-cpp \\\n  --max_length_generation 650 \\\n  --temperature 0.8 \\\n  --n_samples 50 \\\n  --batch_size 50 \\\n  --generation_only \\\n  --save_generations \\\n  --save_generations_path generations_multi.json\n```\n\n**Step 2: Evaluate in Docker container**\n\n```bash\n# Pull the MultiPL-E Docker image\ndocker pull ghcr.io\u002Fbigcode-project\u002Fevaluation-harness-multiple\n\n# Run evaluation inside container\ndocker run -v $(pwd)\u002Fgenerations_multi.json:\u002Fapp\u002Fgenerations.json:ro \\\n  -it evaluation-harness-multiple python3 main.py \\\n  --model bigcode\u002Fstarcoder2-7b \\\n  --tasks multiple-py,multiple-js,multiple-java,multiple-cpp \\\n  --load_generations_path \u002Fapp\u002Fgenerations.json \\\n  --allow_code_execution \\\n  --n_samples 50\n```\n\n**Supported languages**: Python, JavaScript, Java, C++, Go, Rust, TypeScript, C#, PHP, Ruby, Swift, Kotlin, Scala, Perl, Julia, Lua, R, Racket\n\n### Workflow 3: Instruction-Tuned Model Evaluation\n\nEvaluate chat\u002Finstruction models with proper formatting.\n\n**Checklist**:\n```\nInstruction Model Evaluation:\n- [ ] Step 1: Use instruction-tuned tasks\n- [ ] Step 2: Configure instruction tokens\n- [ ] Step 3: Run evaluation\n```\n\n**Step 1: Choose instruction tasks**\n\n- **instruct-humaneval**: HumanEval with instruction prompts\n- **humanevalsynthesize-{lang}**: HumanEvalPack synthesis tasks\n\n**Step 2: Configure instruction tokens**\n\n```bash\n# For models with chat templates (e.g., CodeLlama-Instruct)\naccelerate launch main.py \\\n  --model codellama\u002FCodeLlama-7b-Instruct-hf \\\n  --tasks instruct-humaneval \\\n  --instruction_tokens \"\u003Cs>[INST],\u003C\u002Fs>,[\u002FINST]\" \\\n  --max_length_generation 512 \\\n  --allow_code_execution\n```\n\n**Step 3: HumanEvalPack for instruction models**\n\n```bash\n# Test code synthesis across 6 languages\naccelerate launch main.py \\\n  --model codellama\u002FCodeLlama-7b-Instruct-hf \\\n  --tasks humanevalsynthesize-python,humanevalsynthesize-js \\\n  --prompt instruct \\\n  --max_length_generation 512 \\\n  --allow_code_execution\n```\n\n### Workflow 4: Compare Multiple Models\n\nBenchmark suite for model comparison.\n\n**Step 1: Create evaluation script**\n\n```bash\n#!\u002Fbin\u002Fbash\n# eval_models.sh\n\nMODELS=(\n  \"bigcode\u002Fstarcoder2-7b\"\n  \"codellama\u002FCodeLlama-7b-hf\"\n  \"deepseek-ai\u002Fdeepseek-coder-6.7b-base\"\n)\nTASKS=\"humaneval,mbpp\"\n\nfor model in \"${MODELS[@]}\"; do\n  model_name=$(echo $model | tr '\u002F' '-')\n  echo \"Evaluating $model\"\n\n  accelerate launch main.py \\\n    --model $model \\\n    --tasks $TASKS \\\n    --temperature 0.2 \\\n    --n_samples 20 \\\n    --batch_size 20 \\\n    --allow_code_execution \\\n    --metric_output_path results\u002F${model_name}.json\ndone\n```\n\n**Step 2: Generate comparison table**\n\n```python\nimport json\nimport pandas as pd\n\nmodels = [\"bigcode-starcoder2-7b\", \"codellama-CodeLlama-7b-hf\", \"deepseek-ai-deepseek-coder-6.7b-base\"]\nresults = []\n\nfor model in models:\n    with open(f\"results\u002F{model}.json\") as f:\n        data = json.load(f)\n        results.append({\n            \"Model\": model,\n            \"HumanEval pass@1\": f\"{data['humaneval']['pass@1']:.3f}\",\n            \"MBPP pass@1\": f\"{data['mbpp']['pass@1']:.3f}\"\n        })\n\ndf = pd.DataFrame(results)\nprint(df.to_markdown(index=False))\n```\n\n## When to Use vs Alternatives\n\n**Use BigCode Evaluation Harness when:**\n- Evaluating **code generation** models specifically\n- Need **multi-language** evaluation (18 languages via MultiPL-E)\n- Testing **functional correctness** with unit tests (pass@k)\n- Benchmarking for **BigCode\u002FHuggingFace leaderboards**\n- Evaluating **fill-in-the-middle** (FIM) capabilities\n\n**Use alternatives instead:**\n- **lm-evaluation-harness**: General LLM benchmarks (MMLU, GSM8K, HellaSwag)\n- **EvalPlus**: Stricter HumanEval+\u002FMBPP+ with more test cases\n- **SWE-bench**: Real-world GitHub issue resolution\n- **LiveCodeBench**: Contamination-free, continuously updated problems\n- **CodeXGLUE**: Code understanding tasks (clone detection, defect prediction)\n\n## Supported Benchmarks\n\n| Benchmark | Problems | Languages | Metric | Use Case |\n|-----------|----------|-----------|--------|----------|\n| HumanEval | 164 | Python | pass@k | Standard code completion |\n| HumanEval+ | 164 | Python | pass@k | Stricter evaluation (80× tests) |\n| MBPP | 500 | Python | pass@k | Entry-level problems |\n| MBPP+ | 399 | Python | pass@k | Stricter evaluation (35× tests) |\n| MultiPL-E | 164×18 | 18 languages | pass@k | Multi-language evaluation |\n| APPS | 10,000 | Python | pass@k | Competition-level |\n| DS-1000 | 1,000 | Python | pass@k | Data science (pandas, numpy, etc.) |\n| HumanEvalPack | 164×3×6 | 6 languages | pass@k | Synthesis\u002Ffix\u002Fexplain |\n| Mercury | 1,889 | Python | Efficiency | Computational efficiency |\n\n## Common Issues\n\n**Issue: Different results than reported in papers**\n\nCheck these factors:\n```bash\n# 1. Verify n_samples (need 200 for accurate pass@k)\n--n_samples 200\n\n# 2. Check temperature (0.2 for greedy-ish, 0.8 for sampling)\n--temperature 0.8\n\n# 3. Verify task name matches exactly\n--tasks humaneval  # Not \"human_eval\" or \"HumanEval\"\n\n# 4. Check max_length_generation\n--max_length_generation 512  # Increase for longer problems\n```\n\n**Issue: CUDA out of memory**\n\n```bash\n# Use quantization\n--load_in_8bit\n# OR\n--load_in_4bit\n\n# Reduce batch size\n--batch_size 1\n\n# Set memory limit\n--max_memory_per_gpu \"20GiB\"\n```\n\n**Issue: Code execution hangs or times out**\n\nUse Docker for safe execution:\n```bash\n# Generate on host (no execution)\n--generation_only --save_generations\n\n# Evaluate in Docker\ndocker run ... --allow_code_execution --load_generations_path ...\n```\n\n**Issue: Low scores on instruction models**\n\nEnsure proper instruction formatting:\n```bash\n# Use instruction-specific tasks\n--tasks instruct-humaneval\n\n# Set instruction tokens for your model\n--instruction_tokens \"\u003Cs>[INST],\u003C\u002Fs>,[\u002FINST]\"\n```\n\n**Issue: MultiPL-E language failures**\n\nUse the dedicated Docker image:\n```bash\ndocker pull ghcr.io\u002Fbigcode-project\u002Fevaluation-harness-multiple\n```\n\n## Command Reference\n\n| Argument | Default | Description |\n|----------|---------|-------------|\n| `--model` | - | HuggingFace model ID or local path |\n| `--tasks` | - | Comma-separated task names |\n| `--n_samples` | 1 | Samples per problem (200 for pass@k) |\n| `--temperature` | 0.2 | Sampling temperature |\n| `--max_length_generation` | 512 | Max tokens (prompt + generation) |\n| `--batch_size` | 1 | Batch size per GPU |\n| `--allow_code_execution` | False | Enable code execution (required) |\n| `--generation_only` | False | Generate without evaluation |\n| `--load_generations_path` | - | Load pre-generated solutions |\n| `--save_generations` | False | Save generated code |\n| `--metric_output_path` | results.json | Output file for metrics |\n| `--load_in_8bit` | False | 8-bit quantization |\n| `--load_in_4bit` | False | 4-bit quantization |\n| `--trust_remote_code` | False | Allow custom model code |\n| `--precision` | fp32 | Model precision (fp32\u002Ffp16\u002Fbf16) |\n\n## Hardware Requirements\n\n| Model Size | VRAM (fp16) | VRAM (4-bit) | Time (HumanEval, n=200) |\n|------------|-------------|--------------|-------------------------|\n| 7B | 14GB | 6GB | ~30 min (A100) |\n| 13B | 26GB | 10GB | ~1 hour (A100) |\n| 34B | 68GB | 20GB | ~2 hours (A100) |\n\n## Resources\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fbigcode-project\u002Fbigcode-evaluation-harness\n- **Documentation**: https:\u002F\u002Fgithub.com\u002Fbigcode-project\u002Fbigcode-evaluation-harness\u002Ftree\u002Fmain\u002Fdocs\n- **BigCode Leaderboard**: https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fbigcode\u002Fbigcode-models-leaderboard\n- **HumanEval Dataset**: https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fopenai\u002Fopenai_humaneval\n- **MultiPL-E**: https:\u002F\u002Fgithub.com\u002Fnuprl\u002FMultiPL-E\n\n## Agent operating procedure\n\n1. **Check the environment.** Confirm the model, checkpoint, benchmark version and evaluation harness version.\n2. **Pin down the inputs.** Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.\n3. **Run a small version first.** Evaluate on a small subset to verify prompts, parsing and scoring.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Use the benchmark's official splits and metrics; check for contamination; report variance across seeds or prompts.\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| Scores differ from published numbers | Check prompt format, few-shot settings and harness version before concluding. |\n| A function, flag or endpoint in these instructions is missing in the installed version | Check the installed version's own documentation (`help()`, `--help`, official docs), adapt, and tell the user. Never invent an API. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Report evaluation settings in full; never cherry-pick prompts, seeds or subsets.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n\n## Related skills\n\n- `evaluating-llms-harness`: Evaluates LLMs across 60+ academic benchmarks (MMLU, HumanEval, GSM8K, TruthfulQA, HellaSwag).\n- `nemo-evaluator-sdk`: Evaluates LLMs across 100+ benchmarks from 18+ harnesses (MMLU, HumanEval, GSM8K, safety, VLM) with multi-backend execution.\n",{"name":5,"license":15,"metadata":49,"description":7},{"tags":50,"version":51,"category":52,"maintainer":53,"dependencies":54},"Evaluation, Code Generation, HumanEval, MBPP, MultiPL-E, Pass@k, BigCode, Benchmarking, Code Models","1.0.0","ml-evaluation-and-safety","Kalaris Labs","bigcode-evaluation-harness, transformers>=4.25.1, accelerate>=0.13.2, datasets>=2.6.1","main","0da4485785ee599388900be50db1635489d53056",".agents\u002Fskills\u002Fkal-evaluating-code-models","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6","https:\u002F\u002Fdisha6.6.thenitishkr.in\u002F","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh","www.thenitishkr","thenitishkr | AI • Cyber-security • Research\r\n","2026-11-08 03:33:25",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add Tashima-Tarsh\u002FDisha6.6 --skill evaluating-code-models",{"tool":70,"command":71},"bunx","bunx skills add Tashima-Tarsh\u002FDisha6.6 --skill evaluating-code-models",{"tool":73,"command":74},"pnpm","pnpm dlx skills add Tashima-Tarsh\u002FDisha6.6 --skill evaluating-code-models","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-evaluating-code-models\u002FSKILL.md",true,[78,84,88],{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fbenchmarks.md","REFERENCE","参考文档",9168,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-evaluating-code-models\u002Freferences\u002Fbenchmarks.md",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fcustom-tasks.md",10378,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-evaluating-code-models\u002Freferences\u002Fcustom-tasks.md",{"path":89,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fissues.md",8085,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-evaluating-code-models\u002Freferences\u002Fissues.md",[93,125,150,177,202,224],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":104,"publishedAt":44},"01M6QRD07D4TGNDK6VJ4EHF8BV","youtube-full","Use when the user needs YouTube transcripts, video search, channel browsing, playlist extraction, or content monitoring. Trigger phrases: 'get the transcript for', 'search YouTube for', 'what are the latest videos on', 'list this playlist', 'monitor this channel', or any request involving a YouTube URL, video ID, or @handle. Do NOT use for downloading video or audio files, YouTube engagement data (likes, comments), or private\u002Fage-restricted videos.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fyoutube-full\u002FSKILL.md",[99],{"categoryNo":100,"categoryName":101,"taxonomyType":102,"taxonomyTypeDesc":103},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124],"youtube full","youtube","full","transcript","search","monitoring","data","Video","Audio","list","files","do","get","age","trigger","URL","for","browsing","request","youtube transcripts",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":44},"01M6QRCJ3112VYPA97YG7KGMC2","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[132,133,134,135,109,136,137,138,139,140,141,142,143,144,145,146,147,148,149,121],"twitter","x twitter growth","growth","research","content","engineering","plan","web search","competitors","analyze","engine","write","strategy","use","platform","grow","posting","competitive",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":159,"publishedAt":44},"01M6QRBN3EHQNJY42RERP7A149","write-a-skill","Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, build, or author a new skill.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwrite-a-skill\u002FSKILL.md",[156],{"categoryNo":157,"categoryName":158,"taxonomyType":102,"taxonomyTypeDesc":103},"01JBSEEDCAT000000000000023","Skill与智能体开发",[160,143,161,162,163,164,165,166,145,167,168,55,169,170,171,172,173,174,175,176],"write a skill","github","create","https","productivity","matt pocock","direct","example","build","new skill","structure","new agent","resources","with","tree","progressive disclosure","author",{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":44},"01M6QRB6G8P33PNGAF9Y69EJ9T","wrap-up","Close out a launched Claude Managed Agent — recap every primitive the founder now owns, regenerate the single-file overview page, and suggest the next 1-2 upgrades. Use when the user says \"wrap up\", \"close this out\", \"what do I own now\", \"give me the summary\", \"recap the agent\", or when the orchestrator routes phase=wrap-up. primitives_inventory.py tables everything owned (agent, environment, session, memory, outcome, deployment); overview_page.py regenerates a self-contained .\u002Fmy-agent\u002Fagent-overview.html; upgrade_suggester.py ranks the next moves from recorded deferrals plus standing hardening steps. Companion to run-without-you; the last stop before phase=done.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwrap-up\u002FSKILL.md",[],[184,185,186,187,188,189,190,191,192,145,193,116,194,195,196,197,198,199,200,201],"wrap up","up","wrap","gemini","deployment","run","file","hardening","closeout","stop","upgrade","founder","close","companion","you","tables","directions","phase",{"skillNo":203,"name":204,"nameZh":6,"description":205,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":206,"categories":207,"keywords":209,"publishedAt":44},"01M6QRA5AYC1RBFZ39GTWGS3N8","workflow-builder","Design and write deterministic multi-agent workflow scripts (.js files in .claude\u002Fworkflows\u002F) for Claude Code's Workflow tool. Use when a user wants to build, create, author, scaffold, or run a custom Claude Code workflow, orchestrate sub-agents (fan-out, pipeline, loop, judge-panel), or automate a repeatable multi-step task across fresh-context agents.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkflow-builder\u002FSKILL.md",[208],{"categoryNo":157,"categoryName":158,"taxonomyType":102,"taxonomyTypeDesc":103},[210,211,212,213,214,162,189,25,215,216,217,218,143,219,115,32,220,221,222,223],"workflow","workflow builder","builder","design","workflows","orchestrate","pipeline","loop","multi-agent","context","fresh","scripts","judge","claude code workflow",{"skillNo":225,"name":226,"nameZh":6,"description":227,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":228,"categories":229,"keywords":230,"publishedAt":44},"01M6QR7QMCZESKQA0ERW1E657M","weekly-review","Use when someone wants to run a weekly review, close open loops, audit stalled projects and commitments, get their system back to trusted, restart a lapsed review habit, or says \"\u002Fcs:weekly-review\". Walks David Allen's three-phase loop — GET CLEAR, GET CURRENT, GET CREATIVE — with deterministic scripts that inventory open loops, gate the checklist with named gaps, and score commitment health 0-100.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fweekly-review\u002FSKILL.md",[],[231,232,233,234,235,236,237,238,239,217,240,241,242,243,244,31,117,245,246,201],"review","weekly review","weekly","deterministic scripts","reflect","feeds","inventory","open","team","projects","project-management","scanner","conversation","back","sprint","cadence"]