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
Optimum
Install
To install the latest release of this package:
pip install optimum
or from current main branch:
pip install https://github.com/huggingface/optimum.git
or for development, clone the repo and install it from the local copy:
git clone https://github.com/huggingface/optimum.git
cd optimum
pip install -e .
Usage
Convert a hub model:
optimum_convert
Optimize a hub model:
optimum_optimize
Apply LPOT quantization:
python examples/pytorch/text-classification/run_glue.py \
--model_name_or_path textattack/bert-base-uncased-SST-2 \
--task_name sst2 \
--provider lpot \
--quantize \
--quantization_approach dynamic \
--config_name_or_path echarlaix/bert-base-dynamic-quant-test \
--do_eval \
--output_dir /tmp/sst2_output/
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.
Source Distribution
optimum-0.0.1.tar.gz
(13.3 kB
view hashes)
Built Distribution
optimum-0.0.1-py3-none-any.whl
(19.3 kB
view hashes)