skillfed

lm-eval

A framework for evaluating language models

lm-eval v0.4.12 1.6M downloads/30d#3,748 on PyPI13,633
Permissive license MIT Active released

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-eval

uv

uv add lm-eval

poetry

poetry add lm-eval

Installing 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

Development Status :: 3 - AlphaOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

language model evaluation frameworkLLM benchmark harnessgenerative model testingacademic benchmark suitemodel evaluation taskslanguage model assessmentLLM leaderboard evaluation
llm-evaluationbenchmarkingmodel-testing

More Artificial Intelligence packages

Further reading