Buckets:

hf-doc-build/doc-dev / optimum /pr_2452 /en /installation.md
|
download
raw
2.67 kB

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 --upgrade-strategy eager optimum[onnxruntime]
OpenVINO pip install --upgrade --upgrade-strategy eager optimum[openvino]
NVIDIA TensorRT-LLM docker run -it --gpus all --ipc host huggingface/optimum-nvidia
AMD Instinct GPUs and Ryzen AI NPU pip install --upgrade --upgrade-strategy eager optimum[amd]
AWS Trainum & Inferentia pip install --upgrade --upgrade-strategy eager optimum[neuronx]
Habana Gaudi Processor (HPU) pip install --upgrade --upgrade-strategy eager optimum[habana]
FuriosaAI pip install --upgrade --upgrade-strategy eager optimum[furiosa]

The --upgrade --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

Xet Storage Details

Size:
2.67 kB
·
Xet hash:
8a83a4eaabe0254691db2c5e1cf315a89c08111046058dbf28a9c482b546ee87

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.