lm-eval
A framework for evaluating language models
What it is and what it does
lm-eval is a standardized evaluation framework that runs language models against a collection of academic benchmarks and custom tasks. It abstracts away the boilerplate of loading models, preparing datasets, running inference, and computing metrics, letting researchers and practitioners focus on comparing model performance across consistent evaluation protocols.
The package supports multiple inference backends, each installed as an optional extra to keep the base installation lean. Tasks are defined via YAML configuration files with Jinja2 templating for prompt design, and the CLI provides subcommands to list available tasks, validate configurations, and run evaluations. It powers the Open LLM Leaderboard and has been cited in hundreds of research papers.
Use it for:
- Benchmark a new model against standard tasks to compare performance with published results.
- Evaluate fine-tuned or quantized variants of a base model to measure the impact of training changes.
- Run custom evaluation tasks defined in YAML with domain-specific prompts and metrics.
- Batch-evaluate multiple models across different inference backends to find speed/accuracy tradeoffs.
- Reproduce leaderboard-style evaluations locally for internal model development.
- Integrate evaluation into CI/CD pipelines to track model quality metrics across checkpoints.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Unified framework for evaluating generative language models against over 60 standard academic benchmarks with hundreds of task variants, supporting multiple model backends and inference engines.
Yes. lm-eval is the de facto standard for language model evaluation, actively maintained, permissively licensed, and designed with low friction—base install is lightweight and model backends are optional. If you need to benchmark models against academic tasks or reproduce published results, this is the right tool. Install only if you have a model backend in mind and Python >=3.10.
Install
lm-eval on PyPI
pip
pip install lm-evaluv
uv add lm-evalpoetry
poetry add lm-evalInstalling lm-eval
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with recent releases; last commit 2026-08-14. Base package is intentionally lightweight—model backends are installed separately via optional extras, reducing bloat for users who need only the evaluation framework.
License in practice
MIT license (permissive) allows commercial and private use without restriction. No copyleft obligations; you can modify and redistribute under your own terms.
Quickstart
pip install lm_eval[hf]
lm-eval ls tasks
lm-eval run --model hf --model_args pretrained=EleutherAI/gpt-j-6B --tasks hellaswag --device cuda:0 --batch_size 8
Requires Python >=3.10. Model backends must be installed separately via optional extras. Evaluation performance depends on available compute resources.
Verify before relying
- Exact count of 'over 60' benchmarks and 'hundreds' of subtasks—documentation may have more precise numbers.
- Performance characteristics (throughput, memory usage) for different model backends and batch sizes.
- Compatibility matrix for specific model quantization methods and their installation requirements.
- Whether multimodal evaluation (hf-multimodal, vllm-vlm) is production-ready or remains experimental.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 14 — datasets, numpy, evaluate, jinja2, pytablewriter, rouge-score, sacrebleu, scikit-learn, sqlitedict, dill, word2number, more_itertools, typing_extensions, tqdm |
| Maintenance | actively maintained — 95 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,572,996/month — #3,748 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: lm_eval-0.4.12-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
bfcl-evalEvaluates and benchmarks large language models'…
permissive · top 15,000 on PyPI
evalplusEvalPlus provides a rigorous evaluation…
permissive · top 15,000 on PyPI
nvidia-lm-evalEvaluates language models against standardized…
permissive · top 15,000 on PyPI
unitxtUnitxt provides a unified framework for…
permissive · top 15,000 on PyPI
garakGarak is a command-line tool that probes large…
unclear · top 15,000 on PyPI
terminal-benchTerminal-Bench provides a benchmark suite and…
unclear · top 15,000 on PyPI
clip-benchmarkEvaluates CLIP-like vision-language models on…
permissive · top 15,000 on PyPI
ell-aiell-ai is a functional prompt engineering…
permissive · top 15,000 on PyPI
lm-format-enforcerConstrains language model token generation to…
permissive · top 5,000 on PyPI
ipex-llmAccelerates large language model inference on…
permissive · top 15,000 on PyPI