evaluating-llms-harness

Benchmark LLMs across 60+ academic tasks using the lm-evaluation-harness framework.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/CHENHUI-X/toolbox --skill evaluating-llms-harness-chenhui-x
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evaluating-llms-harness
Source: https://github.com/CHENHUI-X/toolbox/tree/main/custom-skills/evaluation/evaluating-llms-harness
Command: npx skills add https://github.com/CHENHUI-X/toolbox --skill evaluating-llms-harness-chenhui-x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lm-eval, transformers, vllm, and includes references (resource) components.

What problem does it solve? Evaluating and comparing large language models requires standardized prompts, metrics, and benchmarks; running ad-hoc tests produces inconsistent, non-reproducible results that cannot be compared across models or papers. ## Core Features & Use Cases - Standardized Benchmarking: Evaluate models on 60+ academic benchmarks including MMLU, GSM8K, HumanEval, TruthfulQA, HellaSwag, and ARC with consistent prompts and metrics. - Multiple Backends: Run evaluations via HuggingFace transformers, vLLM for 5-10x faster inference, or API-based models like OpenAI GPT-4 and Anthropic Claude. - Training Progress Tracking: Automate periodic checkpoint evaluation during training and plot learning curves over time. - Use Case: Compare Llama-2-7B, Mistral-7B, and Phi-2 on MMLU, GSM8K, and HellaSwag, then generate a markdown comparison table of accuracy scores for a model selection report. ## Quick Start Ask the AI to evaluate a HuggingFace model like meta-llama/Llama-2-7b-hf on MMLU and GSM8K with 5-shot prompting and save the results to a JSON file.

Frequently Asked Questions about evaluating-llms-harness

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

FAQPage Schema
How do I benchmark an LLM on MMLU and GSM8K?

Install lm-eval and run lm_eval with --model hf, --model_args pretrained=your-model, --tasks mmlu,gsm8k, and --num_fewshot 5. Results with accuracy metrics and standard errors are saved to a JSON output file.

What is the difference between lm-evaluation-harness and HELM?

lm-evaluation-harness focuses on standardized academic benchmarks like MMLU and GSM8K with reproducible prompts, while HELM from Stanford covers broader dimensions including fairness, efficiency, and calibration. Use lm-eval for standard model comparisons.

Can I evaluate OpenAI or Anthropic API models with lm-eval?

Yes, use --model openai-chat-completions or --model anthropic-chat with your API key exported. Note that chat models lack logprobs, so they only support generation tasks like MMLU and GSM8K, not perplexity tasks.

Why is my LLM evaluation running so slowly?

Switch to the vLLM backend with --model vllm for 5-10x faster inference, reduce few-shot examples with --num_fewshot 0, or evaluate a subset like mmlu_stem instead of the full 57-subject MMLU benchmark.

Why does HumanEval fail to run in lm-eval?

Code-executing tasks like HumanEval and MBPP require the explicit --confirm_run_unsafe_code flag because they execute generated code. Without this flag, lm-eval refuses to run the task rather than silently skipping execution.

How much GPU memory do I need to evaluate a 70B model?

A 70B model in bfloat16 needs roughly 168GB, so it requires tensor parallelism across 4-8 GPUs using vLLM's tensor_parallel_size or HuggingFace's parallelize=True option. Quantization to 8-bit reduces requirements significantly.