Last Updated: May 1, 2025
Core Metrics
| Metric | Measures | Range | Best For |
|---|---|---|---|
| Perplexity (PPL) | How 'surprised' model is by text | 1 to ∞ (lower=better) | Language modeling quality |
| BLEU | N-gram overlap with reference | 0–100 (higher=better) | Translation, summarization |
| ROUGE-1/2/L | Recall-oriented n-gram overlap | 0–100 (higher=better) | Summarization recall |
| METEOR | BLEU + synonyms + stemming | 0–100 (higher=better) | Translation with paraphrasing |
| BERTScore | Semantic similarity via embeddings | 0–1 (higher=better) | Captures meaning, not exact words |
| Exact Match (EM) | Exact string match | 0 or 1 | QA with short answers |
| F1 Score | Token-level precision + recall | 0–100 (higher=better) | QA, NER, classification |
| chrF | Character n-gram F-score | 0–100 (higher=better) | Morphologically rich languages |
Popular Benchmarks
| Benchmark | What It Tests | Dataset Size | Notable Models |
|---|---|---|---|
| MMLU | 57 subjects — knowledge + reasoning | ~14K questions | GPT-4 86.4%, Claude 3 88.7% |
| HellaSwag | Commonsense reasoning | ~10K completions | Tests grounded reasoning |
| HumanEval | Python code generation | 164 problems | Code-focused evaluation |
| MT-Bench | Multi-turn conversation quality | 80 questions × 2 turns | GPT-4 judges responses |
| AlpacaEval | Instruction following | 805 prompts | Win rate vs reference (GPT-4) |
| BigBench | 200+ diverse reasoning tasks | Varies by task | Broad cognitive evaluation |
| TruthfulQA | Factual accuracy vs misconceptions | 817 questions | Measures hallucination tendency |
| GSM8K | Grade-school math word problems | 8.5K problems | Multi-step math reasoning |
Running lm-eval-harness
pip install lm-evalInstall the EleutherAI evaluation harness
lm_eval --model hf --model_args pretrained=meta-llama/Llama-2-7b-hf --tasks mmlu --num_fewshot 5Run MMLU with 5-shot prompting on Llama-2
lm_eval --model hf --model_args pretrained=gpt2 --tasks hellaswag,arc_easy --batch_size 8Evaluate on multiple tasks in one run
lm_eval --model openai --model_args model=gpt-4 --tasks gsm8k --num_fewshot 8Evaluate OpenAI models via API
lm_eval --model vllm --model_args pretrained=model-name,tensor_parallel_size=2 --tasks mmluUse vLLM backend for faster inference
--output_path ./resultsSave evaluation results to a directory
--limit 100Limit evaluation to 100 examples per task (quick test)
--log_samplesLog individual predictions alongside aggregate metrics
Human Evaluation Methods
| Item | Description |
|---|---|
Pairwise Comparison | Humans compare two model outputs side-by-side — used in LMSys Chatbot Arena |
Likert Scale Rating | Rate outputs 1-5 on quality, relevance, safety, and helpfulness |
A/B Testing | Deploy two models to production and measure user engagement/satisfaction |
Vibe Check | Qualitative assessment by domain experts — essential for creative/ nuanced tasks |
Red Teaming | Adversarial testing — humans deliberately try to elicit unsafe or incorrect outputs |
Inter-Annotator Agreement | Measure consistency between human judges (Cohen's kappa, Fleiss' kappa) |
Elo Rating System | Derive rankings from pairwise battles (used by Chatbot Arena) |
LLM-as-Judge | Use GPT-4 to evaluate other models — correlates well with human judgment |
Pro Tip: Never rely on a single metric. Combine automatic metrics (perplexity/BLEU/ROUGE) with human evaluation and task-specific benchmarks for a complete picture of model quality.