A C++ inference server that serves OpenVINO-optimized generative AI and classic deep learning models over OpenAI-compatible and KServe APIs.
openvinotoolkit/openvino.genai
A C++/Python/Node.js library for running generative AI models such as LLMs, image, speech and embedding models on OpenVINO Runtime.
- Stars
- 602
- Forks
- 484
- Open issues
- 191
- Last commit
- 2 hours ago
What is it?
OpenVINO GenAI is a library of ready-made pipelines for popular generative AI models, built on top of the OpenVINO Runtime. It exposes simple C++, Python and Node.js APIs so developers can run text generation, vision-language, image and video generation, Whisper speech recognition, SpeechT5 text-to-speech, and text embedding and reranking workflows without assembling the model pipeline themselves.
The library is aimed at running models locally on PC and laptop hardware with modest resource use. It bundles its core functionality, including tokenization through openvino-tokenizers, so it needs no extra dependencies at runtime. Inference can target CPU, GPU or NPU devices, and switching devices requires only a change of the device name.
The library also includes LLM optimizations such as speculative decoding, KV cache token eviction, sparse attention for prefill, prefix caching, and continuous batching, which OpenVINO Model Server uses to serve LLMs. LoRA adapters are supported for text, image and video generation, including loading several adapters per model and blending them with coefficients.
Key features
- 01Python, C++ and Node.js APIs for running generative AI pipelines
- 02Supports LLM, vision-language, image, video, speech and embedding models
- 03Runs on CPU, GPU and NPU through OpenVINO Runtime
- 04Includes speculative decoding, KV cache eviction and sparse attention
- 05Provides prefix caching and continuous batching for LLM serving
- 06Supports loading and blending multiple LoRA adapters
Use cases
- Running a local chatbot with an open LLM on an Intel laptop or desktop
- Generating images or short videos with Stable Diffusion or Flux models on local hardware
- Building a RAG pipeline with local text embedding and reranking models
- Adding offline speech-to-text with Whisper to a desktop or C++ application
Quick start
- 1
Install OpenVINO GenAI from PyPI
pip install openvino-genai - 2
Export a model from Hugging Face to OpenVINO IR format
optimum-cli export openvino --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 --weight-format int4 --trust-remote-code TinyLlama_1_1b_v1_ov - 3
Run inference with LLMPipeline in Python
import openvino_genai as ov_genai pipe = ov_genai.LLMPipeline("TinyLlama_1_1b_v1_ov", "CPU") # Use CPU or GPU as devices without any other code change print(pipe.generate("What is OpenVINO?", max_new_tokens=100))
Things to know
- Runs on top of OpenVINO Runtime, so hardware support is limited to its CPU, GPU and NPU platform matrix.
- Models must be converted to OpenVINO IR format before use, which requires an extra export step.
In collections
Topics
FAQ
- What is openvino.genai?
- A C++/Python/Node.js library for running generative AI models such as LLMs, image, speech and embedding models on OpenVINO Runtime. OpenVINO GenAI is a library of ready-made pipelines for popular generative AI models, built on top of the OpenVINO Runtime. It exposes simple C++, Python and Node.js APIs so developers can run text generation, vision-language, image and video generation, Whisper speech recognition, SpeechT5 text-to-speech, and text embedding and reranking workflows without assembling the model pipeline themselves.
- Is openvino.genai free to use? What license does it have?
- openvino.genai is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is openvino.genai still maintained?
- Actively maintained. The last commit to openvino.genai was on Oct 22, 2026.
- What can I use openvino.genai for?
- Running a local chatbot with an open LLM on an Intel laptop or desktop Generating images or short videos with Stable Diffusion or Flux models on local hardware Building a RAG pipeline with local text embedding and reranking models Adding offline speech-to-text with Whisper to a desktop or C++ application
- How do I install openvino.genai?
- Install OpenVINO GenAI from PyPI: pip install openvino-genai Export a model from Hugging Face to OpenVINO IR format: optimum-cli export openvino --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 --weight-format int4 --trust-remote-code TinyLlama_1_1b_v1_ov Run inference with LLMPipeline in Python: import openvino_genai as ov_genai pipe = ov_genai.LLMPipeline("TinyLlama_1_1b_v1_ov", "CPU") # Use CPU or GPU as devices without any other code change print(pipe.generate("What is OpenVINO?", max_new_tokens=100))
- Where can I get openvino.genai?
- The source code and installation instructions are on GitHub: https://github.com/openvinotoolkit/openvino.genai
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Python framework for compressing neural networks via quantization, pruning and sparsity to speed up inference in OpenVINO, PyTorch and ONNX.
A Stable Diffusion image generator optimized to run on CPUs and Intel AI PCs, with desktop GUI, web UI, CLI and API interfaces.
Open-source toolkit for optimizing and deploying deep learning models for inference on Intel CPUs, GPUs and NPUs.
A C#/.NET library for running LLaMA-family and other GGUF language models locally on CPU or GPU, built on llama.cpp.
A Python library for building and serving AI model inference APIs, multi-model pipelines and LLM apps, with Docker and Kubernetes deployment.