You are viewing v1.14.0 version.
A newer version
v1.23.3 is available.
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