Installation¶
Installation is as simple as:
pip install mteb
uv add mteb
Model Specific Installations¶
If you want to run certain models implemented within mteb you will often need some additional dependencies. These can be installed using:
pip install mteb[cohere]
uv add "mteb[cohere]"
If a specific model requires a dependency it will raise an error with the recommended installation. To see full list of available models you can look at the models overview.
Automatically installing model dependencies¶
Instead of installing extras manually for every model, you can let mteb install the missing ones for you by setting the MTEB_AUTO_INSTALL_EXTRAS environment variable. When it is set to a truthy value (1, true, yes, on), loading a model whose extras are missing will install them automatically (using uv if it is available, otherwise pip) before raising:
export MTEB_AUTO_INSTALL_EXTRAS=1
Audio Tasks¶
If you want to run audio tasks, install the audio dependencies:
pip install mteb[audio]
uv add "mteb[audio]"
Additional Requirements for datasets>=4¶
If you are using datasets>=4, you will need to:
-
Install FFmpeg: The
datasetslibrary version 4+ usestorchcodecfor audio processing, which requires FFmpeg to be installed on your system. -
Use
transformers>=4.57.6: Due to compatibility issues withdatasets>=4, you need a recent version of transformers:pip install "transformers>=4.57.6"
If you are using datasets<4, no additional requirements are needed beyond the mteb[audio] installation.
Migrating to uv (for Contributors)¶
If you're a contributor currently using pip, here's how to migrate to uv for faster dependency management:
Why uv?¶
- Faster: 10-100x faster dependency resolution
- Reliable: Deterministic builds with uv.lock
- Simpler: One tool for virtual environments and packages
Migration Steps¶
-
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh -
Replace your workflow:
pip install -e .→uv syncpip install mteb[extra]→uv sync --extra extrapython -m pytest→uv run pytest
Development Groups¶
For contributors, uv provides organized dependency groups:
uv sync --group test- Install test dependenciesuv sync --group docs- Install documentation dependenciesuv sync --group typing- Install type checking dependenciesuv sync --group lint- Install linting dependenciesuv sync --group dev- Install all development dependencies (recommended)