Running benchmark evals from the command line: lm-eval and Inspect
Answer: lm-evaluation-harness runs evaluation tasks with model backends such as hf or vllm. Inspect runs a Task with a dataset, solver and scorer.
lm-evaluation-harness (lm_eval)
- Example:
lm_eval --model hf --model_args pretrained=... --tasks hellaswag --device cuda:0 --batch_size 8. - Install model backends separately:
pip install lm_eval[hf],lm_eval[vllm]and so on. - Host the model on the OpenAI-compliant API of vLLM, and use the
local-completionsmodel type to evaluate it. - The README recommends
--limit 10first: look at a few sample outputs to confirm answer extraction and scoring.
Inspect
- An Inspect evaluation is a Task that brings together a dataset, a solver and a scorer.
- Run
inspect eval simpleqa.py --model openai/...after installingopenaiand settingOPENAI_API_KEY. - Use
inspect viewto view the results.
See also
- ao-evals-inspect-scorers
- ao-sandbox-inspect-docker-tools
- ao-evals-promptfoo-and-openai-evals
- ao-evals-agent-benchmarks-and-judges
Claims
- id: C1 claim: lm_eval takes model, tasks and batch size. source: S1 evidence: "lm_eval --model hf"
- id: C2 claim: Check samples with --limit 10 first. source: S1 evidence: "looking at a few sample outputs using
--limit 10first"
- id: C3 claim: inspect view shows results. source: S2 evidence: "Use
inspect viewto view the results"
Sources
- [S1] lm-evaluation-harness README. EleutherAI/lm-evaluation-harness (GitHub). https://github.com/EleutherAI/lm-evaluation-harness/blob/main/README.md . License: MIT. Accessed 2026-11-16.
- [S2] Inspect AI documentation home. UKGovernmentBEIS/inspect_ai (GitHub). https://github.com/UKGovernmentBEIS/inspect_ai/blob/main/docs/index.qmd . License: MIT. Accessed 2026-11-16.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: EleutherAI/lm-evaluation-harness (GitHub), lm-evaluation-harness README, MIT (https://raw.githubusercontent.com/EleutherAI/lm-evaluation-harness/main/LICENSE). Copyright (c) 2020 EleutherAI; UKGovernmentBEIS/inspect_ai (GitHub), Inspect AI documentation home, MIT (https://raw.githubusercontent.com/UKGovernmentBEIS/inspect_ai/main/LICENSE). Copyright (c) 2024 UK AI Security Institute. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: EleutherAI/lm-evaluation-harness (GitHub), lm-evaluation-harness README, MIT (https://raw.githubusercontent.com/EleutherAI/lm-evaluation-harness/main/LICENSE). Copyright (c) 2020 EleutherAI; UKGovernmentBEIS/inspect_ai (GitHub), Inspect AI documentation home, MIT (https://raw.githubusercontent.com/UKGovernmentBEIS/inspect_ai/main/LICENSE). Copyright (c) 2024 UK AI Security Institute.
Cite this
iinventedlight. 2026. "Running benchmark evals from the command line: lm-eval and Inspect." iinventedlight Library, iil:note:m8fabjnx, version of 2026-11-16. https://iinventedlight.com/library/notes/ao-evals-cli-lm-eval-and-inspect/. License: CC-BY-4.0.
@misc{iil_note_m8fabjnx,
author = {{iinventedlight}},
title = {{Running benchmark evals from the command line: lm-eval and Inspect}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-16},
url = {https://iinventedlight.com/library/notes/ao-evals-cli-lm-eval-and-inspect/},
note = {Permanent ID iil:note:m8fabjnx. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/ao-evals-cli-lm-eval-and-inspect.md.