Introduction to OpenVINO GenAI | OpenVINO GenAI (original) (raw)

What is OpenVINO GenAI?​

OpenVINOβ„’ GenAI is a library of the most popular Generative AI model pipelines, optimized execution methods, and samples that run on top of highly performant OpenVINO Runtime. It provides simplified APIs for running generative models, hiding the complexity of the generation process and enabling developers to easily integrate state-of-the-art generative models into their applications with minimal code.

As a lightweight solution designed for efficient inference, OpenVINO GenAI includes all the core functionality needed for generative model execution (e.g. tokenization via openvino-tokenizers) with no external dependencies required. This library is friendly to PC and laptop execution, and optimized for resource consumption.

Key Features and Benefits​

Workflow Overview​

Using OpenVINO GenAI typically involves three main steps:

  1. Model Preparation:
    • Download pre-converted model in OpenVINO IR format (e.g. from OpenVINO Toolkit organization on Hugging Face).
    • Convert model from other frameworks to the OpenVINO IR format (e.g. using optimum-intel), optionally applying weights compression.
  2. Pipeline Setup: Initialize the appropriate pipeline for your task (LLMPipeline, Text2ImagePipeline, WhisperPipeline, VLMPipeline, etc.) with the converted model.
  3. Inference: Run the model with your inputs using the pipeline's simple API.

OpenVINO GenAI Workflow

Comparison with Alternatives​

Unlike base OpenVINO, which requires manual implementation of generation loops, tokenization, scheduling etc., OpenVINO GenAI provides these components in a ready-to-use package.

Compared to Hugging Face Optimum Intel, OpenVINO GenAI offers a smaller footprint, fewer dependencies, and better performance optimization options, particularly for C++ applications.

Feature OpenVINO GenAI Base OpenVINO Hugging Face Optimum Intel
Easy-to-use APIs βœ… ❌ βœ…
Low footprint βœ… βœ… ❌
C++ support βœ… βœ… ❌
Node.js bindings βœ… βœ… ❌
Pre-built pipelines βœ… ❌ βœ…
Model variety Medium High High

Additional Resources​

Explore blogs to setup your first hands-on experience with OpenVINO GenAI: