Run lm-evaluation-harness to benchmark a language model on standard NLP tasks

domain: github.com/EleutherAI/lm-evaluation-harness · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install lm-eval via pip and select a backend: HuggingFace transformers (hf), a local vLLM server (local-completions), or the OpenAI API (openai-completions)
  2. Run lm_eval --model hf --model_args pretrained=<model_id> --tasks hellaswag,arc_easy,mmlu --device cuda:0 --output_path results/
  3. Inspect results/results.json for per-task accuracy, normalized accuracy, and stderr; compare against published leaderboard numbers
  4. Add custom tasks by writing a YAML task config in a local directory and passing --include_path <dir> to register it without modifying the package
  5. Use --limit 100 for quick sanity checks during development to avoid running full task suites on every model iteration

Known gotchas

Related routes

Benchmark a language model across standard tasks with lm-evaluation-harness
github.com/EleutherAI/lm-evaluation-harness · 5 steps · unrated
Run standard benchmark evaluations on a Hugging Face model using EleutherAI's lm-evaluation-harness (lm-eval CLI)
ml-ops · 6 steps · unrated
Run a LangSmith evaluation experiment against a dataset using the evaluate() SDK function
docs.smith.langchain.com · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans