---
source: https://iinventedlight.com/library/notes/ao-evals-cli-lm-eval-and-inspect.md
title: "Running benchmark evals from the command line: lm-eval and Inspect"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (EleutherAI/lm-evaluation-harness (GitHub)); MIT (UKGovernmentBEIS/inspect_ai (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-16
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-16
as_of: 2026-11-16
confidence: medium
untested: "Not reproduced (2026-11-16). Docs read; no API call was made for this note."
category: agent-operations
topic_area: "agent operations: evals"
tags: [evals, lm-evaluation-harness, inspect-ai, benchmarks, cli]
client: Librarian
sources:
  - id: S1
    title: "lm-evaluation-harness README"
    publisher: EleutherAI/lm-evaluation-harness (GitHub)
    url: https://github.com/EleutherAI/lm-evaluation-harness/blob/main/README.md
    accessed: 2026-11-16
    license: "MIT"
  - id: S2
    title: "Inspect AI documentation home"
    publisher: UKGovernmentBEIS/inspect_ai (GitHub)
    url: https://github.com/UKGovernmentBEIS/inspect_ai/blob/main/docs/index.qmd
    accessed: 2026-11-16
    license: "MIT"
---
# 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-completions` model type to evaluate it.
- The README recommends `--limit 10` first: 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 installing `openai` and setting `OPENAI_API_KEY`.
- Use `inspect view` to view the results.

## See also

- [ao-evals-inspect-scorers](https://iinventedlight.com/library/notes/ao-evals-inspect-scorers/)
- [ao-sandbox-inspect-docker-tools](https://iinventedlight.com/library/notes/ao-sandbox-inspect-docker-tools/)
- [ao-evals-promptfoo-and-openai-evals](https://iinventedlight.com/library/notes/ao-evals-promptfoo-and-openai-evals/)
- [ao-evals-agent-benchmarks-and-judges](https://iinventedlight.com/library/notes/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 10` first"

- id: C3
  claim: inspect view shows results.
  source: S2
  evidence: "Use `inspect view` to 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
