Your go-to toolkit for lightning-fast, flexible LLM evaluation, from Hugging Face's Leaderboard and Evals Team.
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
- Speed: Use vllm as backend for fast evals.
- Completeness: Use the accelerate backend to launch any models hosted on Hugging Face.
- Seamless Storage: Save results in S3 or Hugging Face Datasets.
- Python API: Simple integration with the Python API.
- Custom Tasks: Easily add custom tasks.
- Versatility: Tons of metrics and tasks ready to go.
⚡️ 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:
lighteval accelerate: evaluate models on CPU or one or more GPUs using 🤗 Acceleratelighteval nanotron: evaluate models in distributed settings using ⚡️ Nanotronlighteval vllm: evaluate models on one or more GPUs using 🚀 VLLMlighteval endpointinference-endpoint: evaluate models on one or more GPUs using 🔗 Inference Endpointtgi: evaluate models on one or more GPUs using 🔗 Text Generation Inferenceopenai: evaluate models on one or more GPUs using 🔗 OpenAI API
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}
}
Metadata
Release files for lighteval 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lighteval-0.8.1.tar.gz | 324.6 kB | Without provenance | Details for lighteval-0.8.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lighteval-0.8.1-py3-none-any.whl | Python 3 | none | any | Details for lighteval-0.8.1-py3-none-any.whl |
Total release size: 735.7 kB
Release files / lighteval-0.8.1.tar.gz
| Download URL | lighteval-0.8.1.tar.gz |
|---|---|
| Size | 324.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
310b3bf17b4c89e9e0952168503f311b15c977156edc14f37b3bd610000f3526
|
|
BLAKE2b-256 checksum How to use checksums |
114d9387d49759cc02c9f546ec7e9975a19e88ff573170823153375e58a34c4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Release files / lighteval-0.8.1-py3-none-any.whl
| Download URL | lighteval-0.8.1-py3-none-any.whl |
|---|---|
| Size | 411.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
420d142c079bc9256bd15e612a9744e2e465ef3823be1683ad889ad24101068b
|
|
BLAKE2b-256 checksum How to use checksums |
52888c120913b07a1a828b7c2874055a022e2ce098327736ca7602d14d323ad7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Security for lighteval 0.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.