Registry / ai-ml / optimum-intel

optimum-intel

JSON →
library2.0.0pypypiunverified

Optimum Intel extends the Hugging Face Transformers and Diffusers libraries, providing a framework to integrate Intel's specialized tools and libraries like OpenVINO, Neural Compressor, and Intel Extension for PyTorch. It enables optimization, conversion (e.g., to OpenVINO IR format), and accelerated inference of deep learning models on Intel architectures. The library is actively maintained with frequent minor version releases, currently at 1.27.0.

pip install --upgrade-strategy eager "optimum-intel[openvino]"
INSTALL
IMPORT
SIG · OPTIMUM-INTEL
O
optimum-intel
ai-mlpythonv2.0.0
Install
75.8s avg
Import
20603ms
Disk
5530MB
Pass rate
1/ 10
Env Coverage1 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.27.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
1/4 runs
py 3.11
✕ build_error
1/4 runs
py 3.12
✕ build_error
1/4 runs
py 3.13
✕ build_error
✓ 75.85s
py 3.9
✕ build_error
✕ timeout
5530MB installed
● package 5530MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OVModelForCausalLM
from optimum.intel import OVModelForCausalLM
from transformers import AutoModelForCausalLM
Use `OVModelForCausalLM` for OpenVINO-optimized causal language models.
OVModelForSeq2SeqLM
from optimum.intel import OVModelForSeq2SeqLM
from transformers import AutoModelForSeq2SeqLM
Use `OVModelForSeq2SeqLM` for OpenVINO-optimized sequence-to-sequence models.
OVStableDiffusionPipeline
from optimum.intel import OVStableDiffusionPipeline
from diffusers import StableDiffusionPipeline
Use `OVStableDiffusionPipeline` for OpenVINO-optimized Diffusers Stable Diffusion pipelines.
INCModelForSequenceClassification
from optimum.intel import INCModelForSequenceClassification
from optimum.intel.lpot.quantization import LpotQuantizerForSequenceClassification
Older versions used `lpot` which was renamed to `neural_compressor`, then simplified to direct import under `optimum.intel`.

This quickstart demonstrates loading a pre-trained sentiment analysis model, converting it to OpenVINO Intermediate Representation (IR) format on the fly using `export=True`, and running inference with a Hugging Face pipeline. Ensure `optimum-intel[openvino]` and `transformers` are installed.

from transformers import AutoTokenizer, pipeline from optimum.intel import OVModelForSequenceClassification model_id = "distilbert-base-uncased-finetuned-sst-2-english" tokenizer = AutoTokenizer.from_pretrained(model_id) # Load and convert the model to OpenVINO IR format on the fly model = OVModelForSequenceClassification.from_pretrained(model_id, export=True) # Run inference classifier = pipeline("text-classification", model=model, tokenizer=tokenizer) results = classifier("Optimum Intel is great!") print(results)
optimum-cli --version
Debug
Known issues
deprecatedThe installation extras for specific backends (e.g., `[openvino]`, `[nncf]`, `[neural-compressor]`, `[ipex]`) via `pip install optimum-intel[...]` are deprecated and will be removed in a future release. Users are encouraged to install `optimum` and its specific backend extras directly or install `optimum-intel` base and then the backend libraries separately.
fix
For future compatibility, install `optimum` with relevant extras (e.g., `pip install optimum[openvino]`) or install `optimum-intel` then individual dependencies like `openvino-dev`.
affects: >=1.27.0
breakingThe `nf4_fp8` quantization modes have been removed. Code relying on these specific quantization modes will break.
fix
Review your quantization configurations and migrate to supported quantization modes, such as INT8 or INT4 weight-only quantization with NNCF.
affects: >=1.27.0
gotchaWhen using OpenVINO Runtime with PyTorch for post-processing (e.g., beam search), OpenVINO's default threading (oneTBB) can interact poorly with PyTorch's OpenMP, leading to performance degradation or delays.
fix
It is recommended to limit the number of CPU threads used by PyTorch with `torch.set_num_threads()` to mitigate this interaction.
affects: All versions
Upgrade
Version history
2.0.0latest on PyPI · released Jun 10, 2026
Audit
Dependencies
optimumrequiredCore Optimum library for hardware optimizations.
transformersrequiredHugging Face Transformers models are the primary target for optimization.
torchrequiredPyTorch backend often used for original models and post-processing.
optimum-onnxrequiredRequired by core `optimum-intel` for ONNX capabilities.
openvinooptionalRequired for OpenVINO runtime and model conversion.
nncfoptionalRequired for Neural Network Compression Framework (NNCF) quantization features.
intel-extension-for-pytorchoptionalRequired for IPEX optimizations.
diffusersoptionalRequired for optimizing and inferencing Hugging Face Diffusers models (e.g., Stable Diffusion).
Agent activity
4 hits · last 30 days
node
4
Resources
optimum-intel — pip install optimum-intel · libregistry