OpenVINO Model Server (OVMS)

repository·main·Indexed 21 days ago

https://github.com/openvinotoolkit/model_server

A high-performance inference server that hosts models and exposes them via REST and gRPC APIs. Designed for deployment in cloud, edge, and microservices environments, it supports various frameworks and provides compatibility with popular APIs like OpenAI and KServe.

Tokens
214K
Snippets
558
Records
791
Agent score
75%

What's inside OpenVINO Model Server

  1. Overview of OpenVINO™ Model Server (OVMS)

    main

    OpenVINO™ Model Server (OVMS) is a high-performance C++ system designed for serving models via standard network protocols (REST and gRPC). It enables remote inference, allowing lightweight clients to perform API calls to edge or cloud deployments without needing the model framework or hardware-specific drivers locally.

    Key architectural benefits include:

    • Framework Independence: Client applications are decoupled from the model framework and hardware device.
    • Security: Model topology and weights are not exposed directly to clients.
    • Scalability: Supports horizontal and vertical inference scaling, making it ideal for microservices in Kubernetes or OpenShift.
    • Interoperability: Supports multiple frameworks (TensorFlow, PaddlePaddle, ONNX) and provides APIs compatible with OpenAI, Cohere, KServe, and TensorFlow Serving.
  2. Overview of OpenVINO Model Server (OVMS)

    main

    OpenVINO Model Server (OVMS) is a high-performance system designed to host models and make them accessible via standard network protocols. It allows clients to perform remote inference, decoupling the application logic from the model framework, hardware device, and infrastructure.

    Key characteristics include:

    • Protocol Support: Provides inference services via gRPC or REST API.
    • API Compatibility: Uses APIs compatible with OpenAI, Cohere, and KServe.
    • Deployment Flexibility: Can be deployed in Docker containers, on Bare Metal, or within Kubernetes environments.
    • Scalability: Supports horizontal and vertical inference scaling.
    • Framework Support: Compatible with multiple frameworks including TensorFlow, PaddlePaddle, and ONNX.
    • Hardware Support: Optimized for Intel architectures and supports various AI accelerators.
  3. Generative AI endpoints in OpenVINO Model Server

    main

    OpenVINO Model Server (OVMS) provides a /v3 frontend specifically designed for Generative AI use cases. These endpoints are compatible with OpenAI and Cohere API standards and can be extended using MediaPipe graphs.

    OpenAI Compatible Endpoints

    • chat/completions
    • completions
    • embeddings
    • images/generations
    • images/edit
    • audio/transcriptions
    • audio/translations
    • audio/speech
    • tokenize
    • /models
    • /models/{model}

    Cohere Compatible Endpoints

    • rerank
  4. Deploy text embeddings models via OpenAI API

    main
    This demo demonstrates how to deploy text embedding models in the OpenVINO Model Server (OVMS) to perform text feature extractions. The deployment exposes the embedding functionality through the OpenAI-compatible embeddings endpoint, allowing clients to use standard OpenAI API patterns to interact with OpenVINO-optimized models.
  5. Explore OpenVINO Model Server MediaPipe and DAG Pipeline Demos

    main

    OVMS supports complex inference workflows using MediaPipe graphs and Directed Acyclic Graph (DAG) pipelines:

    • MediaPipe Graphs: Implement chains of models for tasks like object detection, iris detection, and holistic tracking.
    • DAG Pipelines: Use the pipeline feature with custom nodes and demultiplexers for advanced workflows:
      • OCR: Horizontal text detection and full Optical Character Recognition (OCR) pipelines.
      • Face Analysis: Single or multi-face analysis (age, gender, emotion) and face blurring.
      • Vehicle Analysis: Detection and attribute recognition.
      • Ensembles: Combining multiple classification models to improve accuracy.
  6. Explore OpenVINO Model Server Generative AI Demos

    main

    OpenVINO Model Server (OVMS) provides several specialized demos for Generative AI workloads, including LLMs, VLMs, and Image Generation. Key capabilities include:

    • LLM & VLM Serving: Support for continuous batching pipelines to optimize text and vision-language model generation.
    • API Compatibility: Endpoints compatible with OpenAI API for text embeddings and Cohere API for reranking.
    • Hardware Acceleration: Specific guidance for running LLMs and VLMs on NPUs.
    • Integration: Support for Open WebUI as an inference provider and Visual Studio Code (via the Continue extension) for local AI assistance.
    • Advanced LLM Features: Support for GGUF models and recommendations for handling long-context LLMs.
  7. Serve audio models via OpenAI API

    main

    OpenVINO Model Server (OVMS) can serve speech generation and speech recognition models using OpenAI-compatible endpoints. Supported endpoints include:

    • audio/speech (Speech generation)
    • audio/transcriptions (Speech-to-text)
    • audio/translations (Speech-to-text translation)

    Note that audio/transcriptions supports speech-to-text streaming responses. This demo specifically focuses on the Kokoro model for speech generation.

  8. Real Time Stream Analysis Demo Overview

    main

    The Real Time Stream Analysis Demo demonstrates how to build an application that performs AI analysis on video content using OpenVINO Model Server (OVMS).

    Key Concepts:

    • Client Responsibility: The client reads the video source (USB camera, encoded file, or network stream) and sends frames to OVMS via gRPC.
    • Processing Pipelines: Analysis can be fully delegated to OVMS using a MediaPipe graph or DAG. If only inference is used, the client must handle preprocessing and postprocessing.
    • Communication Patterns:
      • gRPC streaming: Recommended for MediaPipe graphs, especially for stateful analysis (e.g., object tracking).
      • gRPC unary calls: Recommended for inference-only tasks on DAG graphs, allowing for easier load balancing and scalability.

    Hardware/Network Requirements:

    • Images sent over gRPC are unencoded. For real-time high-rate analysis, a network connectivity of at least 100Mb/s is recommended.
  9. Integrate Open WebUI with OpenVINO Model Server

    main

    This demo provides a workflow to integrate Open WebUI with OpenVINO Model Server (OVMS). Open WebUI serves as the user interface for generative models, while OVMS handles the execution of models (text generation, embeddings, and reranking) via standard APIs compatible with OpenAI.

    Prerequisites

    • Architecture: x86_64
    • OS: Linux (requires Docker Engine) or Windows
    • Python: 3.11 with pip
    • Account: HuggingFace account for model downloads

    Deployment Options

    • Linux: Use Docker containers.
    • Windows: Use the binary package.
    • Hardware Note: For hosts with limited VRAM, consider using a subset of models or changing the target_device to CPU or NPU.
  10. Deployment options for OpenVINO Model Server

    main

    OpenVINO Model Server (OVMS) can be deployed using several different methods depending on your infrastructure requirements:

    • Docker: Use pre-built container images from Docker Hub or the Red Hat Ecosystem Catalog, or build a custom image from source.
    • Baremetal (Linux or Windows): Download the packaged binary and run it directly on your host system.
    • Kubernetes: Deploy using a Helm chart, the Kubernetes Operator, or the OpenShift Operator.

    Once deployed, the server can be configured via various startup modes, parameters, and accelerator settings.

  11. Supported APIs in OpenVINO Model Server

    main

    OpenVINO™ Model Server provides several API interfaces to allow integration with different inference workflows. Depending on your use case, you can use one of the following:

    • KServe API: Used for general inference. It supports both gRPC and REST interfaces.
    • OpenAI API: Used for Generative AI tasks, specifically:
      • Text generation (Chat Completions and Completions)
      • Embeddings
      • Image generation
      • Speech recognition (Speech-to-Text)
      • Speech generation (Text-to-Speech)
    • Cohere API: Used for reranking tasks.

    For REST-based generative use cases, the endpoints support both streamed and unary responses.