Optimum documentation

Installation

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v1.13.1).
Model Database's logo
Join the Model Database community

and get access to the augmented documentation experience

to get started

Installation

🤗 Optimum can be installed using pip as follows:

python -m pip install optimum

If you’d like to use the accelerator-specific features of 🤗 Optimum, you can install the required dependencies according to the table below:

Accelerator Installation
ONNX runtime pip install --upgrade-strategy eager install optimum[onnxruntime]
Intel Neural Compressor (INC) pip install --upgrade-strategy eager optimum[neural-compressor]
Intel OpenVINO pip install --upgrade-strategy eager optimum[openvino,nncf]
Habana Gaudi Processor (HPU) pip install --upgrade-strategy eager optimum[habana]
FuriosaAI pip install --upgrade-strategy eager optimum[furiosa]

The --upgrade-strategy eager option is needed to ensure the different packages are upgraded to the latest possible version.

If you’d like to play with the examples or need the bleeding edge of the code and can’t wait for a new release, you can install the base library from source as follows:

python -m pip install git+https://github.com/huggingface/optimum.git

For the accelerator-specific features, you can install them by appending optimum[accelerator_type] to the pip command, e.g.

python -m pip install optimum[onnxruntime]@git+https://github.com/huggingface/optimum.git