{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "eleutherai-lm-evaluation-harness--benchmark-a-hugging-face-model-with-lm-eval",
 "repo": "EleutherAI/lm-evaluation-harness",
 "repo_url": "https://github.com/EleutherAI/lm-evaluation-harness",
 "repo_slug": "eleutherai-lm-evaluation-harness",
 "title": "Score a model on standard benchmarks in one command",
 "page_title": "How to score a model on standard benchmarks in one command with LM Evaluation Harness",
 "summary": "Install the harness with the Hugging Face backend and evaluate a hub model on named tasks.",
 "who": "An engineer who needs a number to compare two checkpoints.",
 "problem": "Everyone's homemade eval script measures something slightly different.",
 "outcome": "Benchmark scores for the tasks you named, on your own hardware.",
 "steps": [
  "Install the package with `git clone --depth 1 https://github.com/EleutherAI/lm-evaluation-harness`, `cd lm-evaluation-harness` and `pip install -e .`",
  "Add the backend with `pip install \"lm_eval[hf]\"`",
  "List what you can run with `lm-eval ls tasks`",
  "Evaluate with `lm_eval --model hf` plus `--model_args pretrained=EleutherAI/gpt-j-6B`, `--tasks hellaswag`, `--device cuda:0` and `--batch_size 8`"
 ],
 "agent_prompt": "Using EleutherAI/lm-evaluation-harness, install it with the hf extra and score <my model> on hellaswag and lambada_openai, then report the numbers in a small table.",
 "agents": [
  "claude-code",
  "codex",
  "cursor",
  "gemini-cli"
 ],
 "difficulty": "Intermediate",
 "time": "2 hours",
 "basis": "readme",
 "caveat": "Set --batch_size to auto if you are unsure what fits, as the README describes.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "",
 "requirements": [
  "Python with pip; the base package no longer includes transformers or torch",
  "A model backend extra such as `pip install \"lm_eval[hf]\"`, `pip install \"lm_eval[vllm]\"` or `pip install \"lm_eval[api]\"`",
  "A CUDA GPU for the local model examples, which pass --device cuda:0",
  "An API key in the environment for hosted models"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "cost",
   "notice": "Benchmark runs can take hours of GPU time per model."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/eleutherai-lm-evaluation-harness/benchmark-a-hugging-face-model-with-lm-eval/",
 "md": "https://dedupedai.com/use-cases/eleutherai-lm-evaluation-harness/benchmark-a-hugging-face-model-with-lm-eval/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/eleutherai-lm-evaluation-harness--benchmark-a-hugging-face-model-with-lm-eval.json",
 "api_version": "v1"
}
