Skip to main content

A lightweight and configurable evaluation package

Project description


lighteval library logo

Your go-to toolkit for lightning-fast, flexible LLM evaluation, from Hugging Face's Leaderboard and Evals Team.

Tests Quality Python versions License Version


Documentation: Lighteval's Wiki


Unlock the Power of LLM Evaluation with Lighteval 🚀

Lighteval is your all-in-one toolkit for evaluating LLMs across multiple backends—whether it's transformers, tgi, vllm, or nanotron—with ease. Dive deep into your model’s performance by saving and exploring detailed, sample-by-sample results to debug and see how your models stack-up.

Customization at your fingertips: letting you either browse all our existing tasks and metrics or effortlessly create your own custom task and custom metric, tailored to your needs.

Seamlessly experiment, benchmark, and store your results on the Hugging Face Hub, S3, or locally.

🔑 Key Features

⚡️ Installation

pip install lighteval

Lighteval allows for many extras when installing, see here for a complete list.

If you want to push results to the Hugging Face Hub, add your access token as an environment variable:

huggingface-cli login

🚀 Quickstart

Lighteval offers the following entry points for model evaluation:

Here’s a quick command to evaluate using the Accelerate backend:

lighteval accelerate \
    "pretrained=gpt2" \
    "leaderboard|truthfulqa:mc|0|0"

🙏 Acknowledgements

Lighteval started as an extension of the fantastic Eleuther AI Harness (which powers the Open LLM Leaderboard) and draws inspiration from the amazing HELM framework.

While evolving Lighteval into its own standalone tool, we are grateful to the Harness and HELM teams for their pioneering work on LLM evaluations.

🌟 Contributions Welcome 💙💚💛💜🧡

Got ideas? Found a bug? Want to add a task or metric? Contributions are warmly welcomed!

If you're adding a new feature, please open an issue first.

If you open a PR, don't forget to run the styling!

pip install -e .[dev]
pre-commit install
pre-commit run --all-files

📜 Citation

@misc{lighteval,
  author = {Habib, Nathan and Fourrier, Clémentine and Kydlíček, Hynek and Wolf, Thomas and Tunstall, Lewis},
  title = {LightEval: A lightweight framework for LLM evaluation},
  year = {2023},
  version = {0.7.0},
  url = {https://github.com/huggingface/lighteval}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lighteval-0.8.1.tar.gz (324.6 kB view details)

Uploaded Source

Built Distribution

lighteval-0.8.1-py3-none-any.whl (411.1 kB view details)

Uploaded Python 3

File details

Details for the file lighteval-0.8.1.tar.gz.

File metadata

  • Download URL: lighteval-0.8.1.tar.gz
  • Upload date:
  • Size: 324.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for lighteval-0.8.1.tar.gz
Algorithm Hash digest
SHA256 310b3bf17b4c89e9e0952168503f311b15c977156edc14f37b3bd610000f3526
MD5 474d6170a051098dfe266081059a6c64
BLAKE2b-256 114d9387d49759cc02c9f546ec7e9975a19e88ff573170823153375e58a34c4a

See more details on using hashes here.

File details

Details for the file lighteval-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: lighteval-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 411.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for lighteval-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 420d142c079bc9256bd15e612a9744e2e465ef3823be1683ad889ad24101068b
MD5 0ca050453463e940f4b2e51721e871c8
BLAKE2b-256 52888c120913b07a1a828b7c2874055a022e2ce098327736ca7602d14d323ad7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page