Registry / ai-ml / openvino-genai

openvino-genai

JSON →
library2026.2.1.0pypypi✓ verified 83d ago

OpenVINO GenAI provides optimized pipelines and execution methods for generative AI models (LLMs, image generation, etc.) leveraging Intel OpenVINO. Current version 2026.1.0.0, with quarterly releases. It enables efficient inference on Intel hardware.

pip install openvino-genai
INSTALL
IMPORT
SIG · OPENVINO-GENAI
O
openvino-genai
ai-mlpythonv2026.2.1.0
Install
6.4s avg
Import
652ms
Disk
282MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2026.2.1.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
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 6.4s · import 0.652s · 280MB
282MB installed
● package 282MB
Code
Verified usage

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

LLMPipeline
from openvino_genai import LLMPipeline
from openvino_genai.pipeline import LLMPipeline
LLMPipeline is directly under openvino_genai, not a submodule
VLMPipeline
from openvino_genai import VLMPipeline
from openvino_genai import VLM
Correct class name is VLMPipeline, not VLM
ImageGenerationPipeline
from openvino_genai import ImageGenerationPipeline
from openvino_genai import StableDiffusionPipeline
Use ImageGenerationPipeline for any image generation model

Basic LLM inference using OpenVINO GenAI. Ensure model is converted to OpenVINO IR format.

import openvino_genai from openvino_genai import LLMPipeline # Create pipeline with a model directory (assuming model files are present) pipeline = LLMPipeline("./tiny-llama") # Generate a response result = pipeline.generate("What is the capital of France?", max_new_tokens=100) print(result)
Debug
Known issues
breakingIn 2025.1.0, the `generate` method signature changed: `max_new_tokens` is now required (no longer defaults to 256). Code using older versions may fail with TypeError.
fix
Always pass `max_new_tokens` explicitly, e.g., `pipeline.generate(prompt, max_new_tokens=100)`.
affects: >=2025.1.0
breakingIn 2026.0.0, the `import openvino_genai.pipeline` was removed. You must import directly from openvino_genai.
fix
Use `from openvino_genai import LLMPipeline` instead of `from openvino_genai.pipeline import LLMPipeline`.
affects: >=2026.0.0
gotchaModel must be in OpenVINO IR format (`.xml` + `.bin`). Loading a Hugging Face model directly without conversion throws `RuntimeError: Model not in OpenVINO format`.
fix
Use `optimum-cli export openvino --model <hf-id> <output-dir>` to convert first.
affects: all
deprecated`openvino_genai.StableDiffusionPipeline` is deprecated in favor of `ImageGenerationPipeline` as of 2025.1.0.
fix
Replace `StableDiffusionPipeline` with `ImageGenerationPipeline`.
affects: >=2025.1.0
gotchaWhen using GPU (OpenVINO with GPU plugin), ensure that OpenCL runtime is installed and compatible with your Intel GPU.
fix
Install `openvino-2025.0.0` or later with GPU plugin; check `git clone` for GPU driver install scripts.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'LLMPipeline' from 'openvino_genai'
Incorrect import path or missing installation (openvino-genai not installed).
fix
Run `pip install openvino-genai` and use correct import: `from openvino_genai import LLMPipeline`.
RuntimeError: Model not in OpenVINO format
Trying to load a Hugging Face model directly without converting to OpenVINO IR.
fix
Convert using `optimum-cli export openvino --model <model-id> <output-dir>` before loading.
TypeError: generate() missing required positional argument: 'max_new_tokens'
Using API version >=2025.1.0 where max_new_tokens became required.
fix
Pass `max_new_tokens` argument to generate method.
Upgrade
Version history
2026.2.1.0latest on PyPI · released Jun 17, 2026
Audit
Dependencies
openvinorequiredCore OpenVINO runtime required
transformersoptionalUsed for Hugging Face model compatibility
torchoptionalRequired for PyTorch model export/optimization
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
openvino-genai — pip install openvino-genai · libregistry