{"id":24175,"library":"openvino-genai","title":"OpenVINO GenAI","description":"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.","status":"active","version":"2026.1.0.0","language":"python","source_language":"en","source_url":"https://github.com/openvinotoolkit/openvino.genai","tags":["openvino","genai","llm","inference","intel","generative-ai"],"install":[{"cmd":"pip install openvino-genai","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core OpenVINO runtime required","package":"openvino","optional":false},{"reason":"Used for Hugging Face model compatibility","package":"transformers","optional":true},{"reason":"Required for PyTorch model export/optimization","package":"torch","optional":true}],"imports":[{"note":"LLMPipeline is directly under openvino_genai, not a submodule","wrong":"from openvino_genai.pipeline import LLMPipeline","symbol":"LLMPipeline","correct":"from openvino_genai import LLMPipeline"},{"note":"Correct class name is VLMPipeline, not VLM","wrong":"from openvino_genai import VLM","symbol":"VLMPipeline","correct":"from openvino_genai import VLMPipeline"},{"note":"Use ImageGenerationPipeline for any image generation model","wrong":"from openvino_genai import StableDiffusionPipeline","symbol":"ImageGenerationPipeline","correct":"from openvino_genai import ImageGenerationPipeline"}],"quickstart":{"code":"import openvino_genai\nfrom openvino_genai import LLMPipeline\n\n# Create pipeline with a model directory (assuming model files are present)\npipeline = LLMPipeline(\"./tiny-llama\")\n\n# Generate a response\nresult = pipeline.generate(\"What is the capital of France?\", max_new_tokens=100)\nprint(result)\n","lang":"python","description":"Basic LLM inference using OpenVINO GenAI. Ensure model is converted to OpenVINO IR format."},"warnings":[{"fix":"Always pass `max_new_tokens` explicitly, e.g., `pipeline.generate(prompt, max_new_tokens=100)`.","message":"In 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.","severity":"breaking","affected_versions":">=2025.1.0"},{"fix":"Use `from openvino_genai import LLMPipeline` instead of `from openvino_genai.pipeline import LLMPipeline`.","message":"In 2026.0.0, the `import openvino_genai.pipeline` was removed. You must import directly from openvino_genai.","severity":"breaking","affected_versions":">=2026.0.0"},{"fix":"Use `optimum-cli export openvino --model <hf-id> <output-dir>` to convert first.","message":"Model must be in OpenVINO IR format (`.xml` + `.bin`). Loading a Hugging Face model directly without conversion throws `RuntimeError: Model not in OpenVINO format`.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace `StableDiffusionPipeline` with `ImageGenerationPipeline`.","message":"`openvino_genai.StableDiffusionPipeline` is deprecated in favor of `ImageGenerationPipeline` as of 2025.1.0.","severity":"deprecated","affected_versions":">=2025.1.0"},{"fix":"Install `openvino-2025.0.0` or later with GPU plugin; check `git clone` for GPU driver install scripts.","message":"When using GPU (OpenVINO with GPU plugin), ensure that OpenCL runtime is installed and compatible with your Intel GPU.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install openvino-genai` and use correct import: `from openvino_genai import LLMPipeline`.","cause":"Incorrect import path or missing installation (openvino-genai not installed).","error":"ImportError: cannot import name 'LLMPipeline' from 'openvino_genai'"},{"fix":"Convert using `optimum-cli export openvino --model <model-id> <output-dir>` before loading.","cause":"Trying to load a Hugging Face model directly without converting to OpenVINO IR.","error":"RuntimeError: Model not in OpenVINO format"},{"fix":"Pass `max_new_tokens` argument to generate method.","cause":"Using API version >=2025.1.0 where max_new_tokens became required.","error":"TypeError: generate() missing required positional argument: 'max_new_tokens'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}