openvino README

The project's README from github.com/openvinotoolkit/openvino. As one markdown file: README.md.

OpenVINO

Open-source software toolkit for optimizing and deploying deep learning models.

Documentation • Blog • Key Features • Tutorials • Integrations • Benchmarks • Generative AI

PyPI Status NPM Anaconda Status brew Status

PyPI Downloads Anaconda Downloads brew Downloads

Check out the OpenVINO Cheat Sheet and Key Features for a quick reference.

Installation

Get your preferred distribution of OpenVINO or use this command for quick installation:

pip install -U openvino

Verify Installation

After installation, you can verify OpenVINO is installed correctly by running:

import openvino as ov
print(ov.__version__)

Check system requirements and supported devices for detailed information.

Tutorials and Examples

OpenVINO Quickstart example will walk you through the basics of deploying your first model.

Learn how to optimize and deploy popular models with the OpenVINO Notebooks 📚:

Discover more examples in the OpenVINO Samples (Python & C++) and Notebooks (Python).

Here are easy-to-follow code examples demonstrating how to run PyTorch and TensorFlow model inference using OpenVINO:

PyTorch Model

import openvino as ov
import torch
import torchvision

# load PyTorch model into memory
model = torch.hub.load("pytorch/vision", "shufflenet_v2_x1_0", weights="DEFAULT")

# convert the model into OpenVINO model
example = torch.randn(1, 3, 224, 224)
ov_model = ov.convert_model(model, example_input=(example,))

# compile the model for CPU device
core = ov.Core()
compiled_model = core.compile_model(ov_model, 'CPU')

# infer the model on random data
output = compiled_model({0: example.numpy()})

TensorFlow Model

import numpy as np
import openvino as ov
import tensorflow as tf

# load TensorFlow model into memory
model = tf.keras.applications.MobileNetV2(weights='imagenet')

# convert the model into OpenVINO model
ov_model = ov.convert_model(model)

# compile the model for CPU device
core = ov.Core()
compiled_model = core.compile_model(ov_model, 'CPU')

# infer the model on random data
data = np.random.rand(1, 224, 224, 3)
output = compiled_model({0: data})

OpenVINO supports the CPU, GPU, and NPU devices and works with models from PyTorch, TensorFlow, ONNX, TensorFlow Lite, PaddlePaddle, and JAX/Flax frameworks. It includes APIs in C++, Python, C, NodeJS, and offers the GenAI API for optimized model pipelines and performance.

Generative AI with OpenVINO

Get started with the OpenVINO GenAI installation and refer to the detailed guide to explore the capabilities of Generative AI using OpenVINO.

Learn how to run LLMs and GenAI with Samples in the OpenVINO™ GenAI repo. See GenAI in action with Jupyter notebooks: LLM-powered Chatbot and LLM Instruction-following pipeline.

Documentation

User documentation contains detailed information about OpenVINO and guides you from installation through optimizing and deploying models for your AI applications.

Developer documentation focuses on the OpenVINO architecture and describes building and contributing processes.

OpenVINO Ecosystem

OpenVINO Tools

Integrations

Check out the Awesome OpenVINO repository to discover a collection of community-made AI projects based on OpenVINO!

Performance

Explore OpenVINO Performance Benchmarks to discover the optimal hardware configurations and plan your AI deployment based on verified data.

Contribution and Support

Check out Contribution Guidelines for more details. Read the Good First Issues section, if you're looking for a place to start contributing. We welcome contributions of all kinds!

You can ask questions and get support on:

Resources

Telemetry

OpenVINO™ collects software performance and usage data for the purpose of improving OpenVINO™ tools. This data is collected directly by OpenVINO™ or through the use of Google Analytics 4. You can opt-out at any time by running the command:

opt_in_out --opt_out

More Information is available at OpenVINO™ Telemetry.

License

OpenVINO™ Toolkit is licensed under Apache License Version 2.0. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.


* Other names and brands may be claimed as the property of others.

openvino (openvinotoolkit/openvino)

Searching Database…

这是什么?OpenVINO 是 Intel 的开源工具包,用于优化和部署 AI 推理。它可以把训练好的深度学习模型——涵盖视觉、语音、自然语言处理和生成式 AI——跑得更快,从边缘设备一直覆盖到云端服务器。
它是我写代码调用的库,还是我直接运行的运行时?它是需要你编写代码来调用的运行时——提供 C++、Python、C 和 NodeJS 的 API,还有一个面向大语言模型和扩散模型的 GenAI API,内置了优化好的流水线。模型在导入时完成转换,所以运行时不需要原来的框架。
怎么安装?README 里有一行命令的快速安装方式(通过 pip 执行 pip install openvino),文档中还列出了其他预编译发行版,并附带一个验证步骤来确认一切正常。Quickstart 示例会接着带你部署第一个模型。
它能直接用我的 PyTorch 模型吗,还是需要特殊的格式?它支持来自 PyTorch、TensorFlow、ONNX、TensorFlow Lite、Keras、PaddlePaddle 以及 JAX/Flax 的模型,Hugging Face 的 transformers 和 diffusers 也可以通过 Optimum Intel 直接接入。模型会被转换,所以运行时不需要原来的框架。
我必须有 Intel 显卡吗,还是普通的 CPU 就行?普通 CPU 就可以——x86 和 ARM 都支持。CPU 之外的硬件加速则仅限 Intel:Intel 集成显卡或独立显卡以及 Intel NPU,而且同一套部署可以从边缘设备无缝扩展到云端。
它能在本地跑大语言模型和 Stable Diffusion 吗?可以——GenAI API 为大语言模型和扩散模型提供了优化好的流水线,官方笔记本示例展示了通过 OpenVINO 运行基于大语言模型的聊天机器人、指令跟随、Whisper 语音识别、文生图,以及 LLaVa 多模态助手。
我可以把模型通过网络对外提供服务,而不是把推理嵌进我的应用里吗?可以——OpenVINO Model Server(OVMS)是一个可扩展、高性能的模型服务方案,专为 Intel 架构优化模型;此外 vLLM 也可以把 OpenVINO 作为后端来服务大语言模型。
它能和 LangChain、Hugging Face 这类工具配合使用吗?可以:Optimum Intel 让 Hugging Face 的 API 能直接使用 OpenVINO 优化过的模型,另外还有与 LlamaIndex、LangChain、Keras 3、ExecuTorch、torch.compile 以及 ONNX Runtime 执行后端的集成。
部署之前,我可以用什么来压缩模型?神经网络压缩框架(NNCF)提供了量化、稀疏化等高级优化技术,Intel 还发布了性能基准测试,帮你为部署选择合适的硬件。
Size
988 MB
Stars
11K
Age
8y
Commits · 90 Days