Benchmark a language model across standard tasks with lm-evaluation-harness

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 the package with pip install lm-eval (optionally with a backend extra like lm-eval[hf])
  2. Run an evaluation with lm_eval --model hf --model_args pretrained=<model>,dtype=float32 --tasks hellaswag,mmlu
  3. List available tasks with lm-eval ls tasks to pick the right benchmark set
  4. Control few-shot prompting with --num_fewshot and set --batch_size (a fixed integer, or auto to let it detect the largest batch that fits)
  5. Save results with --output_path, and use --apply_chat_template for instruct-tuned models that need chat formatting

Known gotchas

Related routes

Run lm-evaluation-harness to benchmark a language model on standard NLP tasks
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,500+ 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