一、软件介绍
文末提供程序和源码下载
OpenVINO™ 开源程序是一个用于优化和部署 AI 推理的开源工具包。
二、软件优点
- 推理优化:提高计算机视觉、自动语音识别、生成式 AI、使用大型和小型语言模型进行自然语言处理以及许多其他常见任务中的深度学习性能。
- 灵活的模型支持:使用通过 PyTorch、TensorFlow、ONNX、Keras、PaddlePaddle 和 JAX/Flax 等常用框架训练的模型。使用 Optimum Intel 直接集成使用 Hugging Face Hub 的变压器和扩散器构建的模型。在没有原始框架的情况下转换和部署模型。
- 广泛的平台兼容性:减少资源需求,并在从边缘到云的一系列平台上高效部署。OpenVINO™支持在CPU(x86,ARM)、GPU(Intel集成和独立GPU)和AI加速器(Intel NPU)上进行推理。
- 社区和生态系统:加入一个活跃的社区,为提高各个领域的深度学习性能做出贡献。
三、Installation 安装
获取您喜欢的 OpenVINO 发行版或使用以下命令进行快速安装:
pip install -U openvino
四、Tutorials and Examples 教程和示例
以下是易于遵循的代码示例,演示了如何使用 OpenVINO 运行 PyTorch 和 TensorFlow 模型推理:
PyTorch Model PyTorch 模型
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 TensorFlow 模型
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 的生成式 AI
OpenVINO GenAI 安装入门,并参考详细指南以探索使用 OpenVINO 的生成式 AI 的功能。
在 OpenVINO™ GenAI 存储库中了解如何使用示例运行LLMs和 GenAI。查看 GenAI 与 Jupyter Notebooks 的运行情况:LLM支持的聊天机器人和LLM指令跟踪管道。
OpenVINO Ecosystem OpenVINO 生态系统
OpenVINO Tools OpenVINO 工具
- Neural Network Compression Framework (NNCF) - advanced model optimization techniques including quantization, filter pruning, binarization, and sparsity.
神经网络压缩框架 (NNCF) - 高级模型优化技术,包括量化、滤波器修剪、二值化和稀疏性。 - GenAI Repository and OpenVINO Tokenizers - resources and tools for developing and optimizing Generative AI applications.
GenAI 存储库和 OpenVINO Tokenizers - 用于开发和优化生成式 AI 应用程序的资源和工具。 - OpenVINO™ Model Server (OVMS) - a scalable, high-performance solution for serving models optimized for Intel architectures.
OpenVINO™ 模型服务器 (OVMS) - 一种可扩展的高性能解决方案,用于为针对 Intel 架构优化的模型提供服务。 - Intel® Geti™ - an interactive video and image annotation tool for computer vision use cases.
Intel® Geti™ - 适用于计算机视觉用例的交互式视频和图像注释工具。
Integrations 集成
- 🤗Optimum Intel - grab and use models leveraging OpenVINO within the Hugging Face API.
🤗最佳英特尔 - 在 Hugging Face API 中利用 OpenVINO 抓取和使用模型。 - Torch.compile - use OpenVINO for Python-native applications by JIT-compiling code into optimized kernels.
Torch.compile - 通过将代码 JIT 编译为优化的内核,将 OpenVINO 用于 Python 原生应用程序。 - OpenVINO LLMs inference and serving with vLLM - enhance vLLM's fast and easy model serving with the OpenVINO backend.
使用 vLLM 进行 OpenVINO LLMs 推理和服务 - 使用 OpenVINO 后端增强 vLLM 的快速简便的模型服务。 - OpenVINO Execution Provider for ONNX Runtime - use OpenVINO as a backend with your existing ONNX Runtime code.
适用于 ONNX 运行时的 OpenVINO 执行提供程序 - 将 OpenVINO 用作现有 ONNX 运行时代码的后端。 - LlamaIndex - build context-augmented GenAI applications with the LlamaIndex framework and enhance runtime performance with OpenVINO.
LlamaIndex - 使用 LlamaIndex 框架构建上下文增强的 GenAI 应用程序,并使用 OpenVINO 增强运行时性能。 - LangChain - integrate OpenVINO with the LangChain framework to enhance runtime performance for GenAI applications.
LangChain - 将 OpenVINO 与 LangChain 框架集成,以增强 GenAI 应用程序的运行时性能。 - Keras 3 - Keras 3 is a multi-backend deep learning framework. Users can switch model inference to the OpenVINO backend using the Keras API.
Keras 3 - Keras 3 是一个多后端深度学习框架。用户可以使用 Keras API 将模型推理切换到 OpenVINO 后端。
Check out the Awesome OpenVINO repository to discover a collection of community-made AI projects based on OpenVINO!
查看 Awesome OpenVINO 存储库,发现一系列基于 OpenVINO 的社区制作的 AI 项目!
五、软件下载
本文信息来源于GitHub作者地址:https://github.com/openvinotoolkit/openvino