Optimum Library is an extension of the Hugging Face Transformers library, providing a framework to integrate third-party libraries from Hardware Partners and interface with their specific functionality.
Project description
Hugging Face - Optimum
🤗 Optimum is an extension of 🤗 Transformers, providing a set of performance optimization tools enabling maximum efficiency to train and run models on targeted hardware.
The AI ecosystem evolves quickly and more and more specialized hardware along with their own optimizations are emerging every day. As such, Optimum enables users to efficiently use any of these platforms with the same ease inherent to transformers.
Integration with Hardware Partners
🤗 Optimum aims at providing more diversity towards the kind of hardware users can target to train and finetune their models.
To achieve this, we are collaborating with the following hardware manufacturers in order to provide the best transformers integration:
- GraphCore IPUs - IPUs are a completely new kind of massively parallel processor to accelerate machine intelligence. More information here
- More to come soon! :star:
Optimizing models towards inference
Along with supporting dedicated AI hardware for training, Optimum also provides inference optimizations towards various frameworks and platforms.
We currently support ONNX runtime along with Intel Neural Compressor (INC).
Features | ONNX Runtime | Intel Neural Compressor |
---|---|---|
Post-training Dynamic Quantization | :heavy_check_mark: | :heavy_check_mark: |
Post-training Static Quantization | Stay tuned! :star: | :heavy_check_mark: |
Quantization Aware Training (QAT) | :x: | :heavy_check_mark: |
Pruning | N/A | :heavy_check_mark: |
Install
🤗 Optimum can be installed using pip as follows:
pip install optimum
🤗 Optimum with Intel Neural Compressor (INC) or ONNX runtime dependencies can be installed respectively using pip as follows:
pip install optimum[intel]
pip install optimum[onnxruntime]
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 must install the library from source:
pip install git+https://github.com/huggingface/optimum.git
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.