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
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.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)
Errors
Common errors & fixes
ImportError: cannot import name 'LLMPipeline' from 'openvino_genai'
Incorrect import path or missing installation (openvino-genai not installed).
fixRun `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.
fixConvert 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.
fixPass `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