evaluating-llms-harness

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

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/xu1713/openhorse --skill evaluating-llms-harness-xu1713
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evaluating-llms-harness
Source: https://github.com/xu1713/openhorse/tree/main/openhorse/openhorse/skills/mlops/evaluation/lm-evaluation-harness
Command: npx skills add https://github.com/xu1713/openhorse --skill evaluating-llms-harness-xu1713

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: Run 60+ academic benchmarks (MMLU, GSM8K, HumanEval, TruthfulQA, HellaSwag, ARC) with consistent prompts and metrics via the lm_eval CLI. - Multiple Backends: Evaluate HuggingFace models, vLLM-served models (5-10x faster), quantized checkpoints, and API models like GPT-4 and Claude. - Training Progress Tracking: Automate periodic checkpoint evaluation during training and plot learning curves from JSON results. - Use Case: Compare Llama-2-7B, Mistral-7B, and Phi-2 on MMLU, GSM8K, HellaSwag, and TruthfulQA, then generate a markdown comparison table from the JSON result files. ## Quick Start Ask the AI to evaluate a HuggingFace model 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 with lm-evaluation-harness?

Run lm_eval with --model hf, --model_args pretrained=your-model, --tasks mmlu, and --num_fewshot 5 for the standard 5-shot setting. Add --batch_size auto and --output_path to save JSON results.

How can I make LLM evaluation faster?

Use the vLLM backend with --model vllm and tensor_parallel_size set to your GPU count, which runs 5-10x faster than the HuggingFace backend. You can also reduce num_fewshot to 0 or evaluate MMLU subsets like mmlu_stem.

Can lm-evaluation-harness evaluate OpenAI and Anthropic API models?

Yes, it supports openai-chat-completions and anthropic-chat model types using your API keys. Note that chat APIs lack logprobs, so they only work with generation tasks like MMLU and GSM8K, not perplexity tasks.

Why does my evaluation run out of GPU memory?

Large models exceed single-GPU VRAM; a 7B model needs about 16GB in bf16. Reduce batch size, use load_in_8bit quantization, or enable parallelize=True to shard the model across multiple GPUs.

Why do my benchmark scores differ from published results?

Score differences usually come from mismatched few-shot settings (most papers use 5-shot), wrong task variants, or tokenizer mismatches. Verify num_fewshot, exact task names, and that the tokenizer matches the model.

When should I use HELM or MT-Bench instead of lm-evaluation-harness?

Use HELM for broader evaluation covering fairness, efficiency, and calibration, or MT-Bench for multi-turn conversational assessment. lm-evaluation-harness is best for standardized academic benchmarks and reproducible model comparisons.