Lighteval documentation

Installation

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.13.0).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Installation

Lighteval can be installed from PyPI or from source. This guide covers all installation options and dependencies.

System Requirements

  • Python: 3.10 or higher
  • PyTorch: 2.0 or higher (but less than 3.0)
  • CUDA: Optional, for GPU acceleration

From PyPI

The simplest way to install Lighteval is from PyPI:

pip install lighteval

This installs the core package with all essential dependencies for basic evaluation tasks.

From Source

Source installation is recommended for developers who want to contribute to Lighteval or need the latest features:

git clone https://github.com/huggingface/lighteval.git
cd lighteval
pip install -e .

Optional Dependencies (Extras)

Lighteval provides several optional dependency groups that you can install based on your needs. Use the format pip install lighteval[<group>] or pip install -e .[<group>] for source installation.

Backend Extras

ExtraDescriptionDependencies
vllmUse VLLM as backend for high-performance inferencevllm>=0.10.0, ray, more_itertools
tgiUse Text Generation Inference APItext-generation>=0.6.0
litellmUse LiteLLM for unified API accesslitellm, diskcache
optimumUse Optimum for optimized modelsoptimum==1.12.0
quantizationEvaluate quantized modelsbitsandbytes>=0.41.0, auto-gptq>=0.4.2
adaptersEvaluate adapter models (PEFT, Delta)peft==0.3.0
nanotronEvaluate Nanotron modelsnanotron, tensorboardX

Task and Feature Extras

ExtraDescriptionDependencies
extended_tasksExtended evaluation taskslangdetect, openai>1.87, tiktoken
multilingualMultilingual evaluation supportstanza, spacy[ja,ko,th], jieba, pyvi
mathMathematical reasoning taskslatex2sympy2_extended==1.0.6

Storage and Logging Extras

ExtraDescriptionDependencies
s3Upload results to S3s3fs
tensorboardXUpload results to TensorBoardtensorboardX
wandbLog results to Weights & Biaseswandb
trackioLog results to Trackiotrackio

Development Extras

ExtraDescriptionDependencies
qualityCode quality toolsruff>=v0.11.0, pre-commit
testsTesting dependenciespytest>=7.4.0, deepdiff
docsDocumentation buildinghf-doc-builder, watchdog
devAll development dependenciesIncludes accelerate, quality, tests, multilingual, math, extended_tasks, vllm
Update on GitHub