Run standard benchmark evaluations on a Hugging Face model using EleutherAI's lm-evaluation-harness (lm-eval CLI)

domain: ml-ops · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Install from source: git clone --depth 1 https://github.com/EleutherAI/lm-evaluation-harness; cd lm-evaluation-harness; pip install -e .
  2. List available benchmarks: lm-eval ls tasks (or lm-eval ls groups for grouped benchmarks like mmlu)
  3. Run an evaluation: lm-eval run --model hf --model_args pretrained=<hf-model-id> --tasks hellaswag,arc_easy --num_fewshot 5
  4. Persist outputs for review: add --output_path ./results/ --log_samples to save per-example inputs/outputs alongside aggregate scores
  5. Optionally sanity-check a task config before a long run: lm-eval validate --tasks <task_name>
  6. Inspect the JSON results written under --output_path, or push them to the Hub via --hf_hub_log_args

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
Benchmark a language model across standard tasks with lm-evaluation-harness
github.com/EleutherAI/lm-evaluation-harness · 5 steps · unrated
configure scale-to-zero autoscaling for a hugging face inference endpoint
huggingface.co/docs/inference-endpoints · 5 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