Compare commits
52 Commits
master
...
releases/2
| Author | SHA1 | Date |
|---|---|---|
|
|
20c24631ff | |
|
|
bb9761ff72 | |
|
|
0310b9e7b5 | |
|
|
1ec25f551c | |
|
|
a169deb0fb | |
|
|
a161198877 | |
|
|
39e437c09a | |
|
|
62091b13a3 | |
|
|
b2ce7c27e3 | |
|
|
ab3e3c7653 | |
|
|
d7ca3abcd5 | |
|
|
ae0e43d717 | |
|
|
9396198ec2 | |
|
|
f7f3c55646 | |
|
|
80118be29c | |
|
|
fce4d6ce74 | |
|
|
c28d46ad4b | |
|
|
bbb718a096 | |
|
|
4b6e23e3c3 | |
|
|
ecd57078c0 | |
|
|
c16163c625 | |
|
|
028acf7fc6 | |
|
|
44ef76bbab | |
|
|
6c0e190cf8 | |
|
|
1a9713978d | |
|
|
34d0ed7625 | |
|
|
e3523dbc3b | |
|
|
6a053639ce | |
|
|
599c63a925 | |
|
|
f5e1214487 | |
|
|
60a5115dd0 | |
|
|
43cd8e2726 | |
|
|
f4afc98325 | |
|
|
9cca685867 | |
|
|
41df232aae | |
|
|
50adefead8 | |
|
|
ad720269e5 | |
|
|
ccedc42ba9 | |
|
|
f64e9d937c | |
|
|
3173681438 | |
|
|
082c8c06a6 | |
|
|
4a2080a607 | |
|
|
0613e8d894 | |
|
|
79de10583a | |
|
|
7f39e2c337 | |
|
|
312ca83aea | |
|
|
7f3d349cbb | |
|
|
804abc1f3d | |
|
|
c691a85ac7 | |
|
|
e6c24e17b9 | |
|
|
7ddcd57d24 | |
|
|
e327d878f6 |
|
|
@ -87,7 +87,6 @@ jobs:
|
|||
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/json
|
||||
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gtest
|
||||
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gflags
|
||||
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo
|
||||
popd
|
||||
|
||||
- name: Clone vcpkg
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ jobs:
|
|||
repository: 'openvinotoolkit/openvino_contrib'
|
||||
path: ${{ env.OPENVINO_CONTRIB_REPO }}
|
||||
submodules: 'true'
|
||||
ref: 'master'
|
||||
ref: 'releases/2024/1'
|
||||
|
||||
#
|
||||
# Dependencies
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ jobs:
|
|||
- name: Install debian packages & check conflicts
|
||||
run: |
|
||||
apt-get update -y
|
||||
|
||||
|
||||
if [[ "${{ runner.arch }}" == "X64" ]]; then
|
||||
# Install debian packages from previous release
|
||||
apt-get install --no-install-recommends -y gnupg wget ca-certificates
|
||||
|
|
@ -66,21 +66,26 @@ jobs:
|
|||
run: |
|
||||
/usr/share/openvino/samples/cpp/build_samples.sh
|
||||
/usr/share/openvino/samples/c/build_samples.sh
|
||||
|
||||
|
||||
[[ "${{ runner.arch }}" == "X64" ]] && path_by_arch="intel64" || path_by_arch="aarch64"
|
||||
~/openvino_cpp_samples_build/$path_by_arch/Release/hello_query_device
|
||||
|
||||
|
||||
# check integrity of OpenVINO Python API installation
|
||||
apt-get install python3-pip -y
|
||||
python3 -m pip check
|
||||
|
||||
python3 /usr/share/openvino/samples/python/hello_query_device/hello_query_device.py
|
||||
python3 -c 'from openvino import Core; Core().get_property("CPU", "AVAILABLE_DEVICES")'
|
||||
|
||||
|
||||
if [[ "${{ runner.arch }}" == "X64" ]]; then
|
||||
python3 -c 'from openvino import Core; Core().get_property("GPU", "AVAILABLE_DEVICES")'
|
||||
fi
|
||||
|
||||
|
||||
python3 -c 'from openvino import Core; Core().get_property("AUTO", "SUPPORTED_PROPERTIES")'
|
||||
python3 -c 'from openvino import Core; Core().get_property("MULTI", "SUPPORTED_PROPERTIES")'
|
||||
python3 -c 'from openvino import Core; Core().get_property("HETERO", "SUPPORTED_PROPERTIES")'
|
||||
python3 -c 'from openvino import Core; Core().get_property("BATCH", "SUPPORTED_PROPERTIES")'
|
||||
python3 -c 'from openvino.frontend import FrontEndManager; assert len(FrontEndManager().get_available_front_ends()) == 6'
|
||||
benchmark_app --help
|
||||
opt_in_out --help
|
||||
ovc --help
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ jobs:
|
|||
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
|
||||
OPENVINO_JS_DIR: ${{ github.workspace }}/openvino/src/bindings/js
|
||||
OPENVINO_JS_LIBS_DIR: ${{ github.workspace }}/openvino/src/bindings/js/node/bin
|
||||
NODE_VERSION: 18
|
||||
NODE_VERSION: 20
|
||||
steps:
|
||||
- name: Fetch OpenVINO JS sources
|
||||
uses: actions/checkout@v4
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ jobs:
|
|||
repository: 'openvinotoolkit/openvino_contrib'
|
||||
path: ${{ env.OPENVINO_CONTRIB_REPO }}
|
||||
submodules: 'true'
|
||||
# ref: 'master'
|
||||
# ref: 'releases/2024/1'
|
||||
ref: 3eeb2326e0d974f61a83f8e67d37e918ccfa1edd
|
||||
|
||||
#
|
||||
|
|
@ -618,7 +618,7 @@ jobs:
|
|||
with:
|
||||
repository: 'openvinotoolkit/openvino_contrib'
|
||||
path: ${{ env.OPENVINO_CONTRIB_REPO }}
|
||||
ref: 'master'
|
||||
ref: 'releases/2024/1'
|
||||
|
||||
#
|
||||
# Dependencies
|
||||
|
|
@ -709,7 +709,7 @@ jobs:
|
|||
with:
|
||||
repository: 'openvinotoolkit/openvino_tokenizers'
|
||||
path: ${{ env.OPENVINO_TOKENIZERS_REPO }}
|
||||
ref: 'master'
|
||||
ref: 'releases/2024/1'
|
||||
|
||||
- name: Download OpenVINO package
|
||||
uses: actions/download-artifact@v4
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ jobs:
|
|||
repository: 'openvinotoolkit/openvino_contrib'
|
||||
path: ${{ env.OPENVINO_CONTRIB_REPO }}
|
||||
submodules: 'true'
|
||||
# ref: 'master'
|
||||
# ref: 'releases/2024/1'
|
||||
ref: 3eeb2326e0d974f61a83f8e67d37e918ccfa1edd
|
||||
|
||||
#
|
||||
|
|
@ -125,6 +125,9 @@ jobs:
|
|||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 30
|
||||
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 30
|
||||
|
||||
# For building the latest h5py
|
||||
apt install --assume-yes --no-install-recommends libhdf5-dev
|
||||
|
||||
- name: Install sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.4
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ jobs:
|
|||
repository: 'openvinotoolkit/testdata'
|
||||
path: ${{ env.MODELS_PATH }}
|
||||
lfs: 'true'
|
||||
ref: 'master'
|
||||
ref: 'releases/2024/1'
|
||||
|
||||
#
|
||||
# Print system info
|
||||
|
|
@ -296,7 +296,7 @@ jobs:
|
|||
repository: 'openvinotoolkit/testdata'
|
||||
path: ${{ env.MODELS_PATH }}
|
||||
lfs: 'true'
|
||||
ref: 'master'
|
||||
ref: 'releases/2024/1'
|
||||
|
||||
- name: Download selective build statistics package
|
||||
uses: actions/download-artifact@v4
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ jobs:
|
|||
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/json
|
||||
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gtest
|
||||
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gflags
|
||||
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/telemetry
|
||||
git submodule update --init -- ${OPENVINO_REPO}/src/plugins/intel_cpu
|
||||
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo
|
||||
popd
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ jobs:
|
|||
repository: 'openvinotoolkit/openvino_contrib'
|
||||
path: ${{ env.OPENVINO_CONTRIB_REPO }}
|
||||
submodules: 'true'
|
||||
ref: 'master'
|
||||
ref: 'releases/2024/1'
|
||||
|
||||
#
|
||||
# Print system info
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ jobs:
|
|||
with:
|
||||
repository: 'openvinotoolkit/openvino_contrib'
|
||||
path: 'openvino_contrib'
|
||||
# ref: 'master'
|
||||
# ref: 'releases/2024/1'
|
||||
ref: 3eeb2326e0d974f61a83f8e67d37e918ccfa1edd
|
||||
|
||||
#
|
||||
|
|
@ -437,7 +437,7 @@ jobs:
|
|||
with:
|
||||
repository: 'openvinotoolkit/openvino_tokenizers'
|
||||
path: ${{ env.OPENVINO_TOKENIZERS_REPO }}
|
||||
ref: 'master'
|
||||
ref: 'releases/2024/1'
|
||||
|
||||
- name: Download OpenVINO package
|
||||
uses: actions/download-artifact@v4
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ jobs:
|
|||
repository: 'openvinotoolkit/testdata'
|
||||
path: 'testdata'
|
||||
lfs: 'true'
|
||||
ref: 'master'
|
||||
ref: 'releases/2024/1'
|
||||
|
||||
#
|
||||
# Print system info
|
||||
|
|
@ -300,7 +300,7 @@ jobs:
|
|||
repository: 'openvinotoolkit/testdata'
|
||||
path: 'testdata'
|
||||
lfs: 'true'
|
||||
ref: 'master'
|
||||
ref: 'releases/2024/1'
|
||||
|
||||
- name: Download selective build statistics package
|
||||
uses: actions/download-artifact@v4
|
||||
|
|
|
|||
|
|
@ -78,3 +78,6 @@
|
|||
[submodule "src/plugins/intel_npu/thirdparty/level-zero-ext"]
|
||||
path = src/plugins/intel_npu/thirdparty/level-zero-ext
|
||||
url = https://github.com/intel/level-zero-npu-extensions.git
|
||||
[submodule "thirdparty/telemetry"]
|
||||
path = thirdparty/telemetry
|
||||
url = https://github.com/openvinotoolkit/telemetry.git
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ Choose the component your Good First Issue is related to. You can run tests to m
|
|||
- [Auto plugin](https://github.com/openvinotoolkit/openvino/blob/master/src/plugins/auto)
|
||||
- [CPU plugin](https://github.com/openvinotoolkit/openvino/blob/master/src/plugins/intel_cpu)
|
||||
- [GPU plugin](https://github.com/openvinotoolkit/openvino/blob/master/src/plugins/intel_gpu)
|
||||
- [NPU plugin](https://github.com/openvinotoolkit/openvino/blob/master/src/plugins/intel_npu)
|
||||
- [Hetero plugin](https://github.com/openvinotoolkit/openvino/blob/master/src/plugins/hetero)
|
||||
- [Template plugin](https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/template)
|
||||
|
||||
|
|
|
|||
10
README.md
10
README.md
|
|
@ -33,7 +33,7 @@ OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference.
|
|||
- Reduce resource demands and efficiently deploy on a range of Intel® platforms from edge to cloud
|
||||
|
||||
|
||||
This open-source version includes several components: namely [OpenVINO Model Converter (OVC)], [OpenVINO™ Runtime], as well as CPU, GPU, multi device and heterogeneous plugins to accelerate deep learning inference on Intel® CPUs and Intel® Processor Graphics.
|
||||
This open-source version includes several components: namely [OpenVINO Model Converter (OVC)], [OpenVINO™ Runtime], as well as CPU, GPU, NPU, multi device and heterogeneous plugins to accelerate deep learning inference on Intel® CPUs and Intel® Processor Graphics.
|
||||
It supports pre-trained models from [Open Model Zoo], along with 100+ open
|
||||
source and public models in popular formats such as TensorFlow, ONNX, PaddlePaddle, MXNet, Caffe, Kaldi.
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ The OpenVINO™ Runtime can infer models on different hardware devices. This sec
|
|||
<tr>
|
||||
<td> <a href="https://docs.openvino.ai/2024/openvino-workflow/running-inference/inference-devices-and-modes/cpu-device.html">ARM CPU</a></tb>
|
||||
<td><b><i><a href="./src/plugins/intel_cpu">openvino_arm_cpu_plugin</a></i></b></td>
|
||||
<td>Raspberry Pi™ 4 Model B, Apple® Mac mini with Apple silicon
|
||||
<td>ARM CPUs with armv7a and higher, ARM64 CPUs with arm64-v8a and higher, Apple® Mac with Apple silicon
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GPU</td>
|
||||
|
|
@ -82,6 +82,12 @@ The OpenVINO™ Runtime can infer models on different hardware devices. This sec
|
|||
<td><b><i><a href="./src/plugins/intel_gpu">openvino_intel_gpu_plugin</a></i></b></td>
|
||||
<td>Intel Processor Graphics, including Intel HD Graphics and Intel Iris Graphics</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>NPU</td>
|
||||
<td><a href="https://docs.openvino.ai/2024/openvino-workflow/running-inference/inference-devices-and-modes/npu-device.html">Intel NPU</a></td>
|
||||
<td><b><i><a href="./src/plugins/intel_npu">openvino_intel_npu_plugin</a></i></b></td>
|
||||
<td>Intel® Core™ Ultra Processors</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ macro(ov_cpack_settings)
|
|||
(NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE}_python.*" OR ENABLE_PYTHON_PACKAGING) AND
|
||||
# temporary block nvidia
|
||||
NOT item STREQUAL "nvidia" AND
|
||||
# don't install node_addon
|
||||
NOT item MATCHES "node_addon" AND
|
||||
# don't install Intel OpenMP
|
||||
NOT item STREQUAL "omp" AND
|
||||
# the same for pugixml
|
||||
|
|
@ -89,7 +91,7 @@ macro(ov_cpack_settings)
|
|||
2023.1.0
|
||||
2023.2.0
|
||||
2023.3.0 2023.3.1 2023.3.2 2023.3.3 2023.3.4 2023.3.5
|
||||
2024.0
|
||||
2024.0.0
|
||||
)
|
||||
|
||||
#
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ macro(ov_cpack_settings)
|
|||
(NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE}_python.*" OR ENABLE_PYTHON_PACKAGING) AND
|
||||
# temporary block nvidia
|
||||
NOT item STREQUAL "nvidia" AND
|
||||
# don't install node_addon
|
||||
NOT item MATCHES "node_addon" AND
|
||||
# temporary block npu
|
||||
NOT item STREQUAL "npu" AND
|
||||
# don't install Intel OpenMP
|
||||
|
|
@ -77,7 +79,7 @@ macro(ov_cpack_settings)
|
|||
2023.1.0
|
||||
2023.2.0
|
||||
2023.3.0 2023.3.1 2023.3.2 2023.3.3 2023.3.4 2023.3.5
|
||||
2024.0
|
||||
2024.0.0
|
||||
)
|
||||
|
||||
find_host_program(rpmlint_PROGRAM NAMES rpmlint DOC "Path to rpmlint")
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ About OpenVINO
|
|||
|
||||
about-openvino/performance-benchmarks
|
||||
about-openvino/compatibility-and-support
|
||||
about-openvino/system-requirements
|
||||
Release Notes <about-openvino/release-notes-openvino>
|
||||
Additional Resources <about-openvino/additional-resources>
|
||||
|
||||
|
|
@ -40,7 +39,7 @@ OpenVINO accelerates deep learning models on various hardware platforms, ensurin
|
|||
|
||||
* `Deployment on a server <https://github.com/openvinotoolkit/model_server>`__
|
||||
|
||||
A model can be deployed either locally using OpenVINO Runtime or on a model server. Runtime is a set of C++ libraries with C and Python bindings providing a common API to deliver inference solutions. The model server enables quick model inference using external about-openvino/additional-resources.
|
||||
A model can be deployed either locally using OpenVINO Runtime or on a model server. Runtime is a set of C++ libraries with C and Python bindings providing a common API to deliver inference solutions. The model server enables quick model inference using external resources.
|
||||
|
||||
Architecture
|
||||
##############################################################
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Additional Resources
|
|||
|
||||
|
||||
.. meta::
|
||||
:description: Learn more about OpenVINO from benchmark results, case studies
|
||||
:description: Learn more about OpenVINO from benchmark results, case studies
|
||||
and lists of supported models, operations and devices.
|
||||
|
||||
.. toctree::
|
||||
|
|
@ -14,7 +14,7 @@ Additional Resources
|
|||
:hidden:
|
||||
|
||||
additional-resources/glossary
|
||||
additional-resources/legal-information
|
||||
Legal and Responsible AI Information <./additional-resources/legal-information>
|
||||
additional-resources/telemetry
|
||||
Case Studies <https://www.intel.com/openvino-success-stories>
|
||||
|
||||
|
|
@ -23,9 +23,9 @@ Additional Resources
|
|||
|
||||
:doc:`Glossary <additional-resources/glossary>` contains terms used in OpenVINO.
|
||||
|
||||
:doc:`Legal Information <additional-resources/legal-information>` has trademark information and other legal statements.
|
||||
:doc:`Legal and Responsible AI Information <additional-resources/legal-information>` provides trademark information and other legal statements.
|
||||
|
||||
:doc:`OpenVINO™ Telemetry <additional-resources/telemetry>` has detailed information on the telemetry data collection.
|
||||
:doc:`OpenVINO™ Telemetry <additional-resources/telemetry>` has detailed information on the telemetry data collection.
|
||||
|
||||
`Case Studies <https://www.intel.com/openvino-success-stories>`__ are articles about real-world examples of OpenVINO™ usage.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.. {#openvino_docs_Legal_Information}
|
||||
|
||||
Legal Information
|
||||
=================
|
||||
Legal and Responsible AI Information
|
||||
=====================================
|
||||
|
||||
|
||||
.. meta::
|
||||
|
|
@ -46,4 +46,12 @@ Intel Global Human Right Principles
|
|||
Intel is committed to respecting human rights and avoiding causing or contributing to adverse
|
||||
impacts on human rights. See `Intel's Global Human Rights Principles <https://www.intel.com/content/dam/www/central-libraries/us/en/documents/policy-human-rights.pdf>`__.
|
||||
Intel's products and software are intended only to be used in applications that do not cause or
|
||||
contribute to adverse impacts on human rights.
|
||||
contribute to adverse impacts on human rights.
|
||||
|
||||
Model Card Statement
|
||||
###########################################################
|
||||
|
||||
We recommend that users, wherever you are sourcing the model from, should check for a model card,
|
||||
consult the model card for each model you access and use, and create one if you are developing
|
||||
or updating a model. A model card is a short document that provides key information to assess
|
||||
performance and validation and ensure appropriate use.
|
||||
|
|
@ -16,7 +16,7 @@ deep learning models:
|
|||
:doc:`NPU <../../openvino-workflow/running-inference/inference-devices-and-modes/npu-device>`.
|
||||
|
||||
| For their usage guides, see :doc:`Devices and Modes <../../openvino-workflow/running-inference/inference-devices-and-modes>`.
|
||||
| For a detailed list of devices, see :doc:`System Requirements <../system-requirements>`.
|
||||
| For a detailed list of devices, see :doc:`System Requirements <../release-notes-openvino/system-requirements>`.
|
||||
|
||||
Beside running inference with a specific device,
|
||||
OpenVINO offers the option of running automated inference with the following inference modes:
|
||||
|
|
|
|||
|
|
@ -17,10 +17,12 @@ Performance Benchmarks
|
|||
performance-benchmarks/getting-performance-numbers
|
||||
|
||||
|
||||
This page presents benchmark results for `Intel® Distribution of OpenVINO™ toolkit <https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit.html>`__
|
||||
and :doc:`OpenVINO Model Server <../ovms_what_is_openvino_model_server>`, for a representative selection of public neural networks and Intel® devices.
|
||||
The results may help you decide which hardware to use in your applications or plan AI workload for the hardware you have already implemented in your solutions.
|
||||
Click the buttons below to see the chosen benchmark data.
|
||||
This page presents benchmark results for
|
||||
`Intel® Distribution of OpenVINO™ toolkit <https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit.html>`__
|
||||
and :doc:`OpenVINO Model Server <../ovms_what_is_openvino_model_server>`, for a representative
|
||||
selection of public neural networks and Intel® devices. The results may help you decide which
|
||||
hardware to use in your applications or plan AI workload for the hardware you have already
|
||||
implemented in your solutions. Click the buttons below to see the chosen benchmark data.
|
||||
|
||||
.. grid:: 1 1 2 2
|
||||
:gutter: 4
|
||||
|
|
@ -66,36 +68,41 @@ Please visit the tabs below for more information on key performance indicators a
|
|||
throughput per dollar of system cost is the best measure of value. The value KPI is
|
||||
calculated as “Throughput measured as inferences per second / price of inference engine”.
|
||||
This means for a 2 socket system 2x the price of a CPU is used. Prices are as per
|
||||
date of benchmarking and sources can be found as links in the Hardware Platforms (PDF) description below.
|
||||
date of benchmarking and sources can be found as links in the Hardware Platforms (PDF)
|
||||
description below.
|
||||
|
||||
.. tab-item:: Efficiency
|
||||
:sync: efficiency
|
||||
|
||||
System power is a key consideration from the edge to the data center. When selecting
|
||||
deep learning solutions, power efficiency (throughput/watt) is a critical factor to consider.
|
||||
Intel designs provide excellent power efficiency for running deep learning workloads.
|
||||
The efficiency KPI is calculated as “Throughput measured as inferences per second / TDP of
|
||||
inference engine”. This means for a 2 socket system 2x the power dissipation (TDP) of a CPU is used.
|
||||
TDP-values are as per date of benchmarking and sources can be found as links in the Hardware Platforms (PDF) description below.
|
||||
deep learning solutions, power efficiency (throughput/watt) is a critical factor to
|
||||
consider. Intel designs provide excellent power efficiency for running deep learning
|
||||
workloads. The efficiency KPI is calculated as “Throughput measured as inferences per
|
||||
second / TDP of inference engine”. This means for a 2 socket system 2x the power
|
||||
dissipation (TDP) of a CPU is used. TDP-values are as per date of benchmarking and sources
|
||||
can be found as links in the Hardware Platforms (PDF) description below.
|
||||
|
||||
.. tab-item:: Latency
|
||||
:sync: latency
|
||||
|
||||
This measures the synchronous execution of inference requests and is reported in milliseconds.
|
||||
Each inference request (for example: preprocess, infer, postprocess) is allowed to complete before
|
||||
the next is started. This performance metric is relevant in usage scenarios where a single image
|
||||
input needs to be acted upon as soon as possible. An example would be the healthcare sector where
|
||||
medical personnel only request analysis of a single ultra sound scanning image or in real-time or
|
||||
near real-time applications for example an industrial robot's response to actions in its environment
|
||||
or obstacle avoidance for autonomous vehicles.
|
||||
This measures the synchronous execution of inference requests and is reported in
|
||||
milliseconds. Each inference request (for example: preprocess, infer, postprocess) is
|
||||
allowed to complete before the next is started. This performance metric is relevant in
|
||||
usage scenarios where a single image input needs to be acted upon as soon as possible. An
|
||||
example would be the healthcare sector where medical personnel only request analysis of a
|
||||
single ultra sound scanning image or in real-time or near real-time applications for
|
||||
example an industrial robot's response to actions in its environment or obstacle avoidance
|
||||
for autonomous vehicles.
|
||||
|
||||
.. tab-item:: Workload Parameters
|
||||
:sync: workloadparameters
|
||||
|
||||
The workload parameters affect the performance results of the different models we use for benchmarking.
|
||||
Image processing models have different image size definitions and the Natural Language Processing models
|
||||
have different max token list lengths. All these can be found in detail in the :doc:`FAQ section <performance-benchmarks/performance-benchmarks-faq>`.
|
||||
All models are executed using a batch size of 1. Below are the parameters for the GenAI models we display.
|
||||
The workload parameters affect the performance results of the different models we use for
|
||||
benchmarking. Image processing models have different image size definitions and the
|
||||
Natural Language Processing models have different max token list lengths. All these can
|
||||
be found in detail in the :doc:`FAQ section <performance-benchmarks/performance-benchmarks-faq>`.
|
||||
All models are executed using a batch size of 1. Below are the parameters for the GenAI
|
||||
models we display.
|
||||
|
||||
* Input tokens: 1024,
|
||||
* Output tokens: 128,
|
||||
|
|
@ -119,21 +126,21 @@ For a listing of all platforms and configurations used for testing, refer to the
|
|||
|
||||
.. grid-item::
|
||||
|
||||
.. button-link:: ../_static/benchmarks_files/OV-2024.0-platform_list.pdf
|
||||
.. button-link:: ../_static/benchmarks_files/OV-2024.1-platform_list.pdf
|
||||
:color: primary
|
||||
:outline:
|
||||
:expand:
|
||||
|
||||
:material-regular:`download;1.5em` Click for Hardware Platforms [PDF]
|
||||
|
||||
.. button-link:: ../_static/benchmarks_files/OV-2024.0-system-info-detailed.xlsx
|
||||
.. button-link:: ../_static/benchmarks_files/OV-2024.1-system-info-detailed.xlsx
|
||||
:color: primary
|
||||
:outline:
|
||||
:expand:
|
||||
|
||||
:material-regular:`download;1.5em` Click for Configuration Details [XLSX]
|
||||
|
||||
.. button-link:: ../_static/benchmarks_files/OV-2024.0-Performance-Data.xlsx
|
||||
.. button-link:: ../_static/benchmarks_files/OV-2024.1-Performance-Data.xlsx
|
||||
:color: primary
|
||||
:outline:
|
||||
:expand:
|
||||
|
|
@ -141,15 +148,16 @@ For a listing of all platforms and configurations used for testing, refer to the
|
|||
:material-regular:`download;1.5em` Click for Performance Data [XLSX]
|
||||
|
||||
|
||||
The OpenVINO benchmark setup includes a single system with OpenVINO™, as well as the benchmark application installed.
|
||||
It measures the time spent on actual inference (excluding any pre or post processing) and then reports on the inferences
|
||||
per second (or Frames Per Second).
|
||||
The OpenVINO benchmark setup includes a single system with OpenVINO™, as well as the benchmark
|
||||
application installed. It measures the time spent on actual inference (excluding any pre or post
|
||||
processing) and then reports on the inferences per second (or Frames Per Second).
|
||||
|
||||
OpenVINO™ Model Server (OVMS) employs the Intel® Distribution of OpenVINO™ toolkit runtime libraries and exposes a set of
|
||||
models via a convenient inference API over gRPC or HTTP/REST. Its benchmark results are measured with the configuration of
|
||||
multiple-clients-single-server, using two hardware platforms connected by ethernet. Network bandwidth depends on both, platforms
|
||||
and models under investigation. It is set not to be a bottleneck for workload intensity. The connection is dedicated
|
||||
only to measuring performance.
|
||||
OpenVINO™ Model Server (OVMS) employs the Intel® Distribution of OpenVINO™ toolkit runtime
|
||||
libraries and exposes a set of models via a convenient inference API over gRPC or HTTP/REST.
|
||||
Its benchmark results are measured with the configuration of multiple-clients-single-server,
|
||||
using two hardware platforms connected by ethernet. Network bandwidth depends on both, platforms
|
||||
and models under investigation. It is set not to be a bottleneck for workload intensity. The
|
||||
connection is dedicated only to measuring performance.
|
||||
|
||||
.. dropdown:: See more details about OVMS benchmark setup
|
||||
|
||||
|
|
@ -158,22 +166,28 @@ only to measuring performance.
|
|||
.. image:: ../_static/images/performance_benchmarks_ovms_02.png
|
||||
:alt: OVMS Benchmark Setup Diagram
|
||||
|
||||
* **OpenVINO™ Model Server** is launched as a docker container on the server platform and it listens (and answers on)
|
||||
requests from clients. OpenVINO™ Model Server is run on the same machine as the OpenVINO™ toolkit benchmark application
|
||||
in corresponding benchmarking. Models served by OpenVINO™ Model Server are located in a local file system mounted into
|
||||
the docker container. The OpenVINO™ Model Server instance communicates with other components via ports over a dedicated docker network.
|
||||
* **OpenVINO™ Model Server** is launched as a docker container on the server platform and it
|
||||
listens to (and answers) requests from clients. OpenVINO™ Model Server is run on the same
|
||||
system as the OpenVINO™ toolkit benchmark application in corresponding benchmarking. Models
|
||||
served by OpenVINO™ Model Server are located in a local file system mounted into the docker
|
||||
container. The OpenVINO™ Model Server instance communicates with other components via ports
|
||||
over a dedicated docker network.
|
||||
|
||||
* **Clients** are run in separated physical machine referred to as client platform. Clients are implemented in Python3
|
||||
programming language based on TensorFlow* API and they work as parallel processes. Each client waits for a response from OpenVINO™
|
||||
Model Server before it will send a new next request. The role played by the clients is also verification of responses.
|
||||
* **Clients** are run in separated physical machine referred to as client platform. Clients
|
||||
are implemented in Python3 programming language based on TensorFlow* API and they work as
|
||||
parallel processes. Each client waits for a response from OpenVINO™ Model Server before it
|
||||
will send a new next request. The role played by the clients is also verification of
|
||||
responses.
|
||||
|
||||
* **Load balancer** works on the client platform in a docker container. HAProxy is used for this purpose. Its main role is
|
||||
counting of requests forwarded from clients to OpenVINO™ Model Server, estimating its latency, and sharing this information by
|
||||
Prometheus service. The reason of locating the load balancer on the client site is to simulate real life scenario that includes
|
||||
impact of physical network on reported metrics.
|
||||
* **Load balancer** works on the client platform in a docker container. HAProxy is used for
|
||||
this purpose. Its main role is counting of requests forwarded from clients to OpenVINO™
|
||||
Model Server, estimating its latency, and sharing this information by Prometheus service.
|
||||
The reason of locating the load balancer on the client site is to simulate real life
|
||||
scenario that includes impact of physical network on reported metrics.
|
||||
|
||||
* **Execution Controller** is launched on the client platform. It is responsible for synchronization of the whole measurement process,
|
||||
downloading metrics from the load balancer, and presenting the final report of the execution.
|
||||
* **Execution Controller** is launched on the client platform. It is responsible for
|
||||
synchronization of the whole measurement process, downloading metrics from the load
|
||||
balancer, and presenting the final report of the execution.
|
||||
|
||||
|
||||
|
||||
|
|
@ -181,12 +195,16 @@ only to measuring performance.
|
|||
|
||||
<h2>Test performance yourself</h2>
|
||||
|
||||
You can also test performance for your system yourself, following the guide on :doc:`getting performance numbers <performance-benchmarks/getting-performance-numbers>`.
|
||||
You can also test performance for your system yourself, following the guide on
|
||||
:doc:`getting performance numbers <performance-benchmarks/getting-performance-numbers>`.
|
||||
|
||||
Performance of a particular application can also be evaluated virtually using `Intel® DevCloud for the Edge <https://devcloud.intel.com/edge/>`__.
|
||||
It is a remote development environment with access to Intel® hardware and the latest versions of the Intel® Distribution of the OpenVINO™ Toolkit.
|
||||
To learn more about it, visit `the website <https://www.intel.com/content/www/us/en/developer/tools/devcloud/edge/overview.html>`__
|
||||
or `create an account <https://www.intel.com/content/www/us/en/secure/forms/devcloud-enrollment/account-provisioning.html>`__.
|
||||
Performance of a particular application can also be evaluated virtually using
|
||||
`Intel® DevCloud for the Edge <https://devcloud.intel.com/edge/>`__.
|
||||
It is a remote development environment with access to Intel® hardware and the latest versions
|
||||
of the Intel® Distribution of the OpenVINO™ Toolkit. To learn more about it, visit
|
||||
`the website <https://www.intel.com/content/www/us/en/developer/tools/devcloud/edge/overview.html>`__
|
||||
or
|
||||
`create an account <https://www.intel.com/content/www/us/en/secure/forms/devcloud-enrollment/account-provisioning.html>`__.
|
||||
|
||||
|
||||
.. raw:: html
|
||||
|
|
@ -194,17 +212,22 @@ or `create an account <https://www.intel.com/content/www/us/en/secure/forms/devc
|
|||
<h2>Disclaimers</h2>
|
||||
|
||||
|
||||
* Intel® Distribution of OpenVINO™ toolkit performance results are based on release 2024.0, as of March 06, 2024.
|
||||
* Intel® Distribution of OpenVINO™ toolkit performance results are based on release
|
||||
2024.1, as of April 17, 2024.
|
||||
|
||||
* OpenVINO Model Server performance results are based on release 2024.0, as of March 15, 2024.
|
||||
* OpenVINO Model Server performance results are based on release
|
||||
2024.0, as of March 15, 2024.
|
||||
|
||||
The results may not reflect all publicly available updates. Intel technologies' features and benefits depend on system configuration
|
||||
and may require enabled hardware, software, or service activation. Learn more at intel.com, or from the OEM or retailer.
|
||||
The results may not reflect all publicly available updates. Intel technologies' features and
|
||||
benefits depend on system configuration and may require enabled hardware, software, or service
|
||||
activation. Learn more at intel.com, or from the OEM or retailer.
|
||||
|
||||
See configuration disclosure for details. No product can be absolutely secure.
|
||||
Performance varies by use, configuration and other factors. Learn more at `www.intel.com/PerformanceIndex <https://www.intel.com/PerformanceIndex>`__.
|
||||
Performance varies by use, configuration and other factors. Learn more at
|
||||
`www.intel.com/PerformanceIndex <https://www.intel.com/PerformanceIndex>`__.
|
||||
Your costs and results may vary.
|
||||
Intel optimizations, for Intel compilers or other products, may not optimize to the same degree for non-Intel products.
|
||||
Intel optimizations, for Intel compilers or other products, may not optimize to the same degree
|
||||
for non-Intel products.
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -29,16 +29,16 @@ the table for more information.
|
|||
* - bert-base-cased
|
||||
- SST-2_bert_cased_padded
|
||||
- spearman@cosine
|
||||
- 3.28%
|
||||
- 2.93%
|
||||
- 2.68%
|
||||
- 2.91%
|
||||
- 2.76%
|
||||
- 2.72%
|
||||
* - bert-large-uncased-whole-word-masking-squad-0001
|
||||
- SQUAD_v1_1_bert_msl384_mql64_ds128_lowercase
|
||||
- F1
|
||||
- 0.07%
|
||||
- 0.19%
|
||||
- -0.03%
|
||||
- 0.13%
|
||||
- 0.03%
|
||||
- 0.11%
|
||||
* - efficientdet-d0
|
||||
- COCO2017_detection_91cl
|
||||
|
|
@ -57,7 +57,7 @@ the table for more information.
|
|||
* - mobilenet-v2
|
||||
- ImageNet2012
|
||||
- accuracy @ top1
|
||||
- %
|
||||
-
|
||||
- -0.97%
|
||||
- -0.97%
|
||||
- -0.95%
|
||||
|
|
@ -85,9 +85,9 @@ the table for more information.
|
|||
* - unet-camvid-onnx-0001
|
||||
- CamVid_12cl
|
||||
- mean_iou @ mean
|
||||
- -6.32%
|
||||
- 6.40%
|
||||
- -6.28%
|
||||
- 6.41%
|
||||
- 6.46%
|
||||
- 6.40%
|
||||
* - yolo_v3_tiny
|
||||
- COCO2017_detection_80cl
|
||||
|
|
@ -131,6 +131,13 @@ the table for more information.
|
|||
- 3.49
|
||||
- 3.19
|
||||
-
|
||||
* - Falcon-7b-instruct
|
||||
- Bai Ze (65%), GPT4All (25%), GPTeacher (5%), RefinedWeb-english (5%)
|
||||
- ppl
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
.. list-table:: Model Accuracy for BF16, FP32 and FP16 (FP16: Flex-170 only. BF16: Xeon(R) 8490H only)
|
||||
:header-rows: 1
|
||||
|
|
@ -157,7 +164,7 @@ the table for more information.
|
|||
- 0.04%
|
||||
- 0.04%
|
||||
- 0.04%
|
||||
- 0.05%
|
||||
- 0.06%
|
||||
- 0.05%
|
||||
* - efficientdet-d0
|
||||
- COCO2017_detection_91cl
|
||||
|
|
@ -172,9 +179,9 @@ the table for more information.
|
|||
- coco_orig_precision
|
||||
- -0.01%
|
||||
- -0.02%
|
||||
- %
|
||||
- -0.01%
|
||||
- 0.09%
|
||||
- 0.02%
|
||||
- 0.00%
|
||||
* - mobilenet-v2
|
||||
- ImageNet2012
|
||||
- accuracy @ top1
|
||||
|
|
@ -206,7 +213,7 @@ the table for more information.
|
|||
- 0.01%
|
||||
- 0.01%
|
||||
- 0.04%
|
||||
- -0.04%
|
||||
- -0.02%
|
||||
* - unet-camvid-onnx-0001
|
||||
- CamVid_12cl
|
||||
- mean_iou @ mean
|
||||
|
|
@ -251,8 +258,8 @@ the table for more information.
|
|||
- LIAON-5B
|
||||
- CLIP
|
||||
-
|
||||
-
|
||||
-
|
||||
- 31.3
|
||||
- 22.4
|
||||
-
|
||||
-
|
||||
* - Mistral-7b
|
||||
|
|
@ -263,7 +270,14 @@ the table for more information.
|
|||
- 3.19
|
||||
-
|
||||
-
|
||||
|
||||
* - Falcon-7b-instruct
|
||||
- Bai Ze (65%), GPT4All (25%), GPTeacher (5%), RefinedWeb-english (5%)
|
||||
- ppl
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
Notes: For all accuracy metrics except perplexity a "-", (minus sign), indicates an accuracy drop.
|
||||
For perplexity (ppl) the values do not indicate a deviation from a reference but are the actual measured
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ Performance Information F.A.Q.
|
|||
All of the performance benchmarks are generated using the
|
||||
open-source tool within the Intel® Distribution of OpenVINO™ toolkit
|
||||
called :doc:`benchmark_app <../../learn-openvino/openvino-samples/benchmark-tool>`.
|
||||
This tool is available for Python and C++ apps.
|
||||
|
||||
For a simple instruction on testing performance, see the :doc:`Getting Performance Numbers Guide <getting-performance-numbers>`.
|
||||
|
||||
|
|
@ -53,6 +52,10 @@ Performance Information F.A.Q.
|
|||
- THUDM
|
||||
- Transformer
|
||||
- 32K
|
||||
* - `Falcon-7b-instruct <https://huggingface.co/tiiuae/falcon-7b-instruct>`__
|
||||
- Hugginface
|
||||
- Causal Decoder-only
|
||||
- 2048
|
||||
* - `Llama-2-7b-chat <https://ai.meta.com/llama/>`__
|
||||
- Meta AI
|
||||
- Auto regressive language
|
||||
|
|
@ -115,8 +118,9 @@ Performance Information F.A.Q.
|
|||
|
||||
Intel partners with vendors all over the world. For a list of Hardware Manufacturers, see the
|
||||
`Intel® AI: In Production Partners & Solutions Catalog <https://www.intel.com/content/www/us/en/internet-of-things/ai-in-production/partners-solutions-catalog.html>`__.
|
||||
Before purchasing any hardware, you can test and run models remotely, using
|
||||
`Intel® DevCloud for the Edge <http://devcloud.intel.com/edge/>`__.
|
||||
For more details, see the :doc:`Supported Devices <../compatibility-and-support/supported-devices>`.
|
||||
documentation. Before purchasing any hardware, you can test and run
|
||||
models remotely, using `Intel® DevCloud for the Edge <http://devcloud.intel.com/edge/>`__.
|
||||
|
||||
.. dropdown:: How can I optimize my models for better performance or accuracy?
|
||||
|
||||
|
|
|
|||
|
|
@ -1,51 +1,57 @@
|
|||
.. {#openvino_release_notes}
|
||||
.. meta::
|
||||
:description: See what has changed in OpenVINO with the latest release, as well as all
|
||||
previous releases in this year's cycle.
|
||||
|
||||
OpenVINO Release Notes
|
||||
=============================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:hidden:
|
||||
|
||||
2024.0 - 06 March 2024
|
||||
release-notes-openvino/system-requirements
|
||||
release-notes-openvino/release-policy
|
||||
|
||||
|
||||
|
||||
2024.1 - 24 April 2024
|
||||
#############################
|
||||
|
||||
:doc:`System Requirements <./system-requirements>` | :doc:`Installation Guides <./../get-started/install-openvino>`
|
||||
:doc:`System Requirements <./release-notes-openvino/system-requirements>` | :doc:`Release policy <./release-notes-openvino/release-policy>` | :doc:`Installation Guides <./../get-started/install-openvino>`
|
||||
|
||||
|
||||
What's new
|
||||
+++++++++++++++++++++++++++++
|
||||
|
||||
* More Generative AI coverage and framework integrations to minimize code changes.
|
||||
* More Gen AI coverage and framework integrations to minimize code changes.
|
||||
|
||||
* Improved out-of-the-box experience for TensorFlow sentence encoding models through the
|
||||
installation of OpenVINO™ toolkit Tokenizers.
|
||||
* New and noteworthy models validated:
|
||||
Mistral, StableLM-tuned-alpha-3b, and StableLM-Epoch-3B.
|
||||
* OpenVINO™ toolkit now supports Mixture of Experts (MoE), a new architecture that helps
|
||||
process more efficient generative models through the pipeline.
|
||||
* JavaScript developers now have seamless access to OpenVINO API. This new binding enables a
|
||||
smooth integration with JavaScript API.
|
||||
* Mixtral and URLNet models optimized for performance improvements on Intel® Xeon® processors.
|
||||
* Stable Diffusion 1.5, ChatGLM3-6B, and Qwen-7B models optimized for improved inference speed
|
||||
on Intel® Core™ Ultra processors with integrated GPU.
|
||||
* Support for Falcon-7B-Instruct, a GenAI Large Language Model (LLM) ready-to-use chat/instruct
|
||||
model with superior performance metrics.
|
||||
* New Jupyter Notebooks added: YOLO V9, YOLO V8 Oriented Bounding Boxes Detection (OOB), Stable
|
||||
Diffusion in Keras, MobileCLIP, RMBG-v1.4 Background Removal, Magika, TripoSR, AnimateAnyone,
|
||||
LLaVA-Next, and RAG system with OpenVINO and LangChain.
|
||||
|
||||
* Broader Large Language Model (LLM) support and more model compression techniques.
|
||||
* Broader LLM model support and more model compression techniques.
|
||||
|
||||
* Broader Large Language Model (LLM) support and more model compression techniques.
|
||||
* Improved quality on INT4 weight compression for LLMs by adding the popular technique,
|
||||
Activation-aware Weight Quantization, to the Neural Network Compression Framework (NNCF).
|
||||
This addition reduces memory requirements and helps speed up token generation.
|
||||
* Experience enhanced LLM performance on Intel® CPUs, with internal memory state enhancement,
|
||||
and INT8 precision for KV-cache. Specifically tailored for multi-query LLMs like ChatGLM.
|
||||
* The OpenVINO™ 2024.0 release makes it easier for developers, by integrating more OpenVINO™
|
||||
features with the Hugging Face ecosystem. Store quantization configurations for popular
|
||||
models directly in Hugging Face to compress models into INT4 format while preserving
|
||||
accuracy and performance.
|
||||
* LLM compilation time reduced through additional optimizations with compressed embedding.
|
||||
Improved 1st token performance of LLMs on 4th and 5th generations of Intel® Xeon® processors
|
||||
with Intel® Advanced Matrix Extensions (Intel® AMX).
|
||||
* Better LLM compression and improved performance with oneDNN, INT4, and INT8 support for
|
||||
Intel® Arc™ GPUs.
|
||||
* Significant memory reduction for select smaller GenAI models on Intel® Core™ Ultra processors
|
||||
with integrated GPU.
|
||||
|
||||
* More portability and performance to run AI at the edge, in the cloud, or locally.
|
||||
|
||||
* A preview plugin architecture of the integrated Neural Processor Unit (NPU) as part of
|
||||
Intel® Core™ Ultra processor (codename Meteor Lake) is now included in the main OpenVINO™
|
||||
package on PyPI.
|
||||
* Improved performance on ARM by enabling the ARM threading library. In addition, we now
|
||||
support multi-core ARM platforms and enabled FP16 precision by default on MacOS.
|
||||
* New and improved LLM serving samples from OpenVINO Model Server for multi-batch inputs and
|
||||
Retrieval Augmented Generation (RAG).
|
||||
* The preview NPU plugin for Intel® Core™ Ultra processors is now available in the OpenVINO
|
||||
open-source GitHub repository, in addition to the main OpenVINO package on PyPI.
|
||||
* The JavaScript API is now more easily accessible through the npm repository, enabling
|
||||
JavaScript developers' seamless access to the OpenVINO API.
|
||||
* FP16 inference on ARM processors now enabled for the Convolutional Neural Network (CNN) by
|
||||
default.
|
||||
|
||||
|
||||
OpenVINO™ Runtime
|
||||
|
|
@ -54,218 +60,467 @@ OpenVINO™ Runtime
|
|||
Common
|
||||
-----------------------------
|
||||
|
||||
* The legacy API for CPP and Python bindings has been removed.
|
||||
* StringTensor support has been extended by operators such as ``Gather``, ``Reshape``, and
|
||||
``Concat``, as a foundation to improve support for tokenizer operators and compliance with
|
||||
the TensorFlow Hub.
|
||||
* oneDNN has been updated to v3.3.
|
||||
(`see oneDNN release notes <https://github.com/oneapi-src/oneDNN/releases>`__).
|
||||
* Unicode file paths for cached models are now supported on Windows.
|
||||
* Pad pre-processing API to extend input tensor on edges with constants.
|
||||
* A fix for inference failures of certain image generation models has been implemented
|
||||
(fused I/O port names after transformation).
|
||||
* Compiler's warnings-as-errors option is now on, improving the coding criteria and quality.
|
||||
Build warnings will not be allowed for new OpenVINO code and the existing warnings have been
|
||||
fixed.
|
||||
|
||||
AUTO Inference Mode
|
||||
-----------------------------
|
||||
|
||||
* Returning the ov::enable_profiling value from ov::CompiledModel is now supported.
|
||||
|
||||
CPU Device Plugin
|
||||
-----------------------------
|
||||
|
||||
* LLM performance on Intel® CPU platforms has been improved for systems based on AVX2 and
|
||||
AVX512, using dynamic quantization and internal memory state optimization, such as INT8
|
||||
precision for KV-cache. 13th and 14th generations of Intel® Core™ processors and Intel® Core™
|
||||
Ultra processors use AVX2 for CPU execution, and these platforms will benefit from speedup.
|
||||
Enable these features by setting ``"DYNAMIC_QUANTIZATION_GROUP_SIZE":"32"`` and
|
||||
``"KV_CACHE_PRECISION":"u8"`` in the configuration file.
|
||||
* The ``ov::affinity`` API configuration is now deprecated and will be removed in release
|
||||
2025.0.
|
||||
* The following have been improved and optimized:
|
||||
|
||||
* Multi-query structure LLMs (such as ChatGLM 2/3) for BF16 on the 4th and 5th generation
|
||||
Intel® Xeon® Scalable processors.
|
||||
* `Mixtral <https://huggingface.co/docs/transformers/model_doc/mixtral>`__ model performance.
|
||||
* 8-bit compressed LLM compilation time and memory usage, valuable for models with large
|
||||
embeddings like `Qwen <https://github.com/QwenLM/Qwen>`__.
|
||||
* Convolutional networks in FP16 precision on ARM platforms.
|
||||
* 1st token performance of LLMs has been improved on the 4th and 5th generations of Intel® Xeon®
|
||||
processors with Intel® Advanced Matrix Extensions (Intel® AMX).
|
||||
* LLM compilation time and memory footprint have been improved through additional optimizations
|
||||
with compressed embeddings.
|
||||
* Performance of MoE (e.g. Mixtral), Gemma, and GPT-J has been improved further.
|
||||
* Performance has been improved significantly for a wide set of models on ARM devices.
|
||||
* FP16 inference precision is now the default for all types of models on ARM devices.
|
||||
* CPU architecture-agnostic build has been implemented, to enable unified binary distribution
|
||||
on different ARM devices.
|
||||
|
||||
GPU Device Plugin
|
||||
-----------------------------
|
||||
|
||||
* The following have been improved and optimized:
|
||||
* LLM first token latency has been improved on both integrated and discrete GPU platforms.
|
||||
* For the ChatGLM3-6B model, average token latency has been improved on integrated GPU platforms.
|
||||
* For Stable Diffusion 1.5 FP16 precision, performance has been improved on Intel® Core™ Ultra
|
||||
processors.
|
||||
|
||||
* Average token latency for LLMs on integrated GPU (iGPU) platforms, using INT4-compressed
|
||||
models with large context size on Intel® Core™ Ultra processors.
|
||||
* LLM beam search performance on iGPU. Both average and first-token latency decrease may be
|
||||
expected for larger context sizes.
|
||||
* Multi-batch performance of YOLOv5 on iGPU platforms.
|
||||
NPU Device Plugin
|
||||
-----------------------------
|
||||
|
||||
* Memory usage for LLMs has been optimized, enabling '7B' models with larger context on
|
||||
16Gb platforms.
|
||||
|
||||
NPU Device Plugin (preview feature)
|
||||
-----------------------------------
|
||||
|
||||
* The NPU plugin for OpenVINO™ is now available through PyPI (run “pip install openvino”).
|
||||
* NPU Plugin is now part of the OpenVINO GitHub repository. All the most recent plugin changes
|
||||
will be immediately available in the repo. Note that NPU is part of Intel® Core™ Ultra
|
||||
processors.
|
||||
* New OpenVINO™ notebook “Hello, NPU!” introducing NPU usage with OpenVINO has been added.
|
||||
* Version 22H2 or later is required for Microsoft Windows® 11 64-bit to run inference on NPU.
|
||||
|
||||
OpenVINO Python API
|
||||
-----------------------------
|
||||
|
||||
* ``.add_extension`` method signatures have been aligned, improving API behavior for better
|
||||
user experience.
|
||||
* GIL-free creation of RemoteTensors is now used - holding GIL means that the process is not suited
|
||||
for multithreading and removing the GIL lock will increase performance which is critical for
|
||||
the concept of Remote Tensors.
|
||||
* Packed data type BF16 on the Python API level has been added, opening a new way of supporting
|
||||
data types not handled by numpy.
|
||||
* 'pad' operator support for ov::preprocess::PrePostProcessorItem has been added.
|
||||
* ov.PartialShape.dynamic(int) definition has been provided.
|
||||
|
||||
|
||||
OpenVINO C API
|
||||
-----------------------------
|
||||
|
||||
* ov_property_key_cache_mode (C++ ov::cache_mode) now enables the ``optimize_size`` and
|
||||
``optimize_speed`` modes to set/get model cache.
|
||||
* The VA surface on Windows exception has been fixed.
|
||||
* Two new pre-processing APIs for scale and mean have been added.
|
||||
|
||||
OpenVINO Node.js API
|
||||
-----------------------------
|
||||
|
||||
* OpenVINO - `JS bindings <https://docs.openvino.ai/2024/api/nodejs_api/nodejs_api.html>`__
|
||||
are consistent with the OpenVINO C++ API.
|
||||
* A new distribution channel is now available: Node Package Manager (npm) software registry
|
||||
(:doc:`check the installation guide <../get-started/install-openvino/install-openvino-npm>`).
|
||||
* JavaScript API is now available for Windows users, as some limitations for platforms other
|
||||
than Linux have been removed.
|
||||
* New methods to align JavaScript API with CPP API have been added, such as
|
||||
CompiledModel.exportModel(), core.import_model(), Core set/get property and Tensor.get_size(),
|
||||
and Model.is_dynamic().
|
||||
* Documentation has been extended to help developers start integrating JavaScript applications
|
||||
with OpenVINO™.
|
||||
|
||||
TensorFlow Framework Support
|
||||
-----------------------------
|
||||
|
||||
* String tensors are now natively supported, handled on input, output, and intermediate layers
|
||||
(`PR #22024 <https://github.com/openvinotoolkit/openvino/pull/22024>`__).
|
||||
* `tf.keras.layers.TextVectorization tokenizer <https://www.tensorflow.org/api_docs/python/tf/keras/layers/TextVectorization>`__
|
||||
is now supported.
|
||||
* Conversion of models with Variable and HashTable (dictionary) resources has been improved.
|
||||
* 8 NEW operations have been added
|
||||
(`see the list here, marked as NEW <https://github.com/openvinotoolkit/openvino/blob/releases/2024/1/src/frontends/tensorflow/docs/supported_ops.md>`__).
|
||||
* 10 operations have received complex tensor support.
|
||||
* Input tensor names for TF1 models have been adjusted to have a single name per input.
|
||||
* Hugging Face model support coverage has increased significantly, due to:
|
||||
|
||||
* TensorFlow Hub universal-sentence-encoder-multilingual inferred out of the box
|
||||
* string tensors supported for ``Gather``, ``Concat``, and ``Reshape`` operations
|
||||
* integration with openvino-tokenizers module - importing openvino-tokenizers automatically
|
||||
patches TensorFlow FE with the required translators for models with tokenization
|
||||
* extraction of input signature of a model in memory has been fixed,
|
||||
* reading of variable values for a model in memory has been fixed.
|
||||
|
||||
* Fallback for Model Optimizer by operation to the legacy Frontend is no longer available.
|
||||
Fallback by .json config will remain until Model Optimizer is discontinued
|
||||
(`PR #21523 <https://github.com/openvinotoolkit/openvino/pull/21523>`__).
|
||||
* Support for the following has been added:
|
||||
|
||||
* Mutable variables and resources such as HashTable*, Variable, VariableV2
|
||||
(`PR #22270 <https://github.com/openvinotoolkit/openvino/pull/22270>`__).
|
||||
* New tensor types: tf.u16, tf.u32, and tf.u64
|
||||
(`PR #21864 <https://github.com/openvinotoolkit/openvino/pull/21864>`__).
|
||||
* 14 NEW Ops*.
|
||||
`Check the list here (marked as NEW) <https://github.com/openvinotoolkit/openvino/blob/releases/2024/0/src/frontends/tensorflow/docs/supported_ops.md>`__.
|
||||
* TensorFlow 2.15
|
||||
(`PR #22180 <https://github.com/openvinotoolkit/openvino/pull/22180>`__).
|
||||
|
||||
* The following issues have been fixed:
|
||||
|
||||
* UpSampling2D conversion crashed when input type as int16
|
||||
(`PR #20838 <https://github.com/openvinotoolkit/openvino/pull/20838>`__).
|
||||
* IndexError list index for Squeeze
|
||||
(`PR #22326 <https://github.com/openvinotoolkit/openvino/pull/22326>`__).
|
||||
* Correct FloorDiv computation for signed integers
|
||||
(`PR #22684 <https://github.com/openvinotoolkit/openvino/pull/22684>`__).
|
||||
* Fixed bad cast error for tf.TensorShape to ov.PartialShape
|
||||
(`PR #22813 <https://github.com/openvinotoolkit/openvino/pull/22813>`__).
|
||||
* Fixed reading tf.string attributes for models in memory
|
||||
(`PR #22752 <https://github.com/openvinotoolkit/openvino/pull/22752>`__).
|
||||
|
||||
|
||||
ONNX Framework Support
|
||||
-----------------------------
|
||||
|
||||
* ONNX Frontend now uses the OpenVINO API 2.0.
|
||||
|
||||
PyTorch Framework Support
|
||||
-----------------------------
|
||||
|
||||
* Names for outputs unpacked from dict or tuple are now clearer
|
||||
(`PR #22821 <https://github.com/openvinotoolkit/openvino/pull/22821>`__).
|
||||
* FX Graph (torch.compile) now supports kwarg inputs, improving data type coverage.
|
||||
(`PR #22397 <https://github.com/openvinotoolkit/openvino/pull/22397>`__).
|
||||
* ModuleExtension, a new type of extension for PyTorch models is now supported
|
||||
(`PR #23536 <https://github.com/openvinotoolkit/openvino/pull/23536>`__).
|
||||
* 22 NEW operations have been added.
|
||||
* Experimental support for models produced by torch.export (FX graph) has been added
|
||||
(`PR #23815 <https://github.com/openvinotoolkit/openvino/pull/23815>`__).
|
||||
|
||||
ONNX Framework Support
|
||||
-----------------------------
|
||||
* 8 new operations have been added.
|
||||
|
||||
|
||||
OpenVINO Model Server
|
||||
+++++++++++++++++++++++++++++
|
||||
|
||||
* OpenVINO™ Runtime backend used is now 2024.0.
|
||||
* Text generation demo now supports multi batch size, with streaming and unary clients.
|
||||
* The REST client now supports servables based on mediapipe graphs, including python pipeline
|
||||
nodes.
|
||||
* Included dependencies have received security-related updates.
|
||||
* Reshaping a model in runtime based on the incoming requests (auto shape and auto batch size)
|
||||
is deprecated and will be removed in the future. Using OpenVINO's dynamic shape models is
|
||||
recommended instead.
|
||||
* OpenVINO™ Runtime backend used is now 2024.1
|
||||
* OpenVINO™ models with String data type on output are supported. Now, OpenVINO™ Model Server
|
||||
can support models with input and output of the String type, so developers can take advantage
|
||||
of the tokenization built into the model as the first layer. Developers can also rely on any
|
||||
postprocessing embedded into the model which returns text only. Check the
|
||||
`demo on string input data with the universal-sentence-encoder model <https://docs.openvino.ai/2024/ovms_demo_universal-sentence-encoder.html>`__
|
||||
and the
|
||||
`String output model demo <https://github.com/openvinotoolkit/model_server/tree/main/demos/image_classification_with_string_output>`__.
|
||||
* MediaPipe Python calculators have been updated to support relative paths for all related
|
||||
configuration and Python code files. Now, the complete graph configuration folder can be
|
||||
deployed in an arbitrary path without any code changes.
|
||||
* KServe REST API support has been extended to properly handle the string format in JSON body,
|
||||
just like the binary format compatible with NVIDIA Triton™.
|
||||
* `A demo showcasing a full RAG algorithm <https://github.com/openvinotoolkit/model_server/tree/main/demos/python_demos/rag_chatbot>`__
|
||||
fully delegated to the model server has been added.
|
||||
|
||||
|
||||
Neural Network Compression Framework (NNCF)
|
||||
+++++++++++++++++++++++++++++++++++++++++++
|
||||
Neural Network Compression Framework
|
||||
++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
* The `Activation-aware Weight Quantization (AWQ) <https://arxiv.org/abs/2306.00978>`__
|
||||
algorithm for data-aware 4-bit weights compression is now available. It facilitates better
|
||||
accuracy for compressed LLMs with high ratio of 4-bit weights. To enable it, use the
|
||||
dedicated ``awq`` optional parameter of ``the nncf.compress_weights()`` API.
|
||||
* ONNX models are now supported in Post-training Quantization with Accuracy Control, through
|
||||
the ``nncf.quantize_with_accuracy_control()``, method. It may be used for models in the
|
||||
OpenVINO IR and ONNX formats.
|
||||
* A `weight compression example tutorial <https://github.com/openvinotoolkit/nncf/tree/develop/examples/llm_compression/openvino/tiny_llama_find_hyperparams>`__
|
||||
is now available, demonstrating how to find the appropriate hyperparameters for the TinyLLama
|
||||
model from the Hugging Face Transformers, as well as other LLMs, with some modifications.
|
||||
* Model subgraphs can now be defined in the ignored scope for INT8 Post-training Quantization,
|
||||
nncf.quantize(), which simplifies excluding accuracy-sensitive layers from quantization.
|
||||
* A batch size of more than 1 is now partially supported for INT8 Post-training Quantization,
|
||||
speeding up the process. Note that it is not recommended for transformer-based models as it
|
||||
may impact accuracy. Here is an
|
||||
`example demo <https://github.com/openvinotoolkit/nncf/blob/develop/examples/quantization_aware_training/torch/resnet18/README.md>`__.
|
||||
* Now it is possible to apply fine-tuning on INT8 models after Post-training Quantization to
|
||||
improve model accuracy and make it easier to move from post-training to training-aware
|
||||
quantization. Here is an
|
||||
`example demo <https://github.com/openvinotoolkit/nncf/blob/develop/examples/quantization_aware_training/torch/resnet18/README.md>`__.
|
||||
|
||||
OpenVINO Tokenizers
|
||||
++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
OpenVINO Tokenizer
|
||||
+++++++++++++++++++++++++++++
|
||||
* TensorFlow support has been extended - TextVectorization layer translation:
|
||||
|
||||
* Regex support has been improved.
|
||||
* Model coverage has been improved.
|
||||
* Tokenizer metadata has been added to rt_info.
|
||||
* Limited support for Tensorflow Text models has been added: convert MUSE for TF Hub with
|
||||
string inputs.
|
||||
* OpenVINO Tokenizers have their own repository now:
|
||||
`/openvino_tokenizers <https://github.com/openvinotoolkit/openvino_tokenizers>`__
|
||||
* Aligned existing ops with TF ops and added a translator for them.
|
||||
* Added new ragged tensor ops and string ops.
|
||||
|
||||
* A new tokenizer type, RWKV is now supported:
|
||||
|
||||
* Added Trie tokenizer and Fuse op for ragged tensors.
|
||||
* A new way to get OV Tokenizers: build a vocab from file.
|
||||
|
||||
* Tokenizer caching has been redesigned to work with the OpenVINO™ model caching mechanism.
|
||||
|
||||
|
||||
Other Changes and Known Issues
|
||||
+++++++++++++++++++++++++++++++
|
||||
++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Jupyter Notebooks
|
||||
-----------------------------
|
||||
|
||||
The default branch for the OpenVINO™ Notebooks repository has been changed from 'main' to
|
||||
'latest'. The 'main' branch of the notebooks repository is now deprecated and will be maintained
|
||||
until September 30, 2024.
|
||||
|
||||
The new branch, 'latest', offers a better user experience and simplifies maintenance due to
|
||||
significant refactoring and an improved directory naming structure.
|
||||
|
||||
Use the local
|
||||
`README.md <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/README.md>`__
|
||||
file and OpenVINO™ Notebooks at
|
||||
`GitHub Pages <https://openvinotoolkit.github.io/openvino_notebooks/>`__
|
||||
to navigate through the content.
|
||||
|
||||
|
||||
The following notebooks have been updated or newly added:
|
||||
|
||||
* `Mobile language assistant with MobileVLM <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/279-mobilevlm-language-assistant>`__
|
||||
* `Depth estimation with DepthAnything <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/280-depth-anything>`__
|
||||
* `Kosmos-2 <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/281-kosmos2-multimodal-large-language-model>`__
|
||||
* `Zero-shot Image Classification with SigLIP <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/282-siglip-zero-shot-image-classification>`__
|
||||
* `Personalized image generation with PhotoMaker <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/283-photo-maker>`__
|
||||
* `Voice tone cloning with OpenVoice <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/284-openvoice>`__
|
||||
* `Line-level text detection with Surya <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/285-surya-line-level-text-detection>`__
|
||||
* `InstantID: Zero-shot Identity-Preserving Generation using OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/286-instant-id>`__
|
||||
* `Tutorial for Big Image Transfer (BIT) model quantization using NNCF <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/127-big-transfer-quantization>`__
|
||||
* `Tutorial for OpenVINO Tokenizers integration into inference pipelines <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/128-openvino-tokenizers>`__
|
||||
* `LLM chatbot <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/254-llm-chatbot/254-llm-chatbot.ipynb>`__ and
|
||||
`LLM RAG pipeline <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/254-llm-chatbot/254-rag-chatbot.ipynb>`__
|
||||
have received integration with new models: minicpm-2b-dpo, gemma-7b-it, qwen1.5-7b-chat, baichuan2-7b-chat
|
||||
* `Grounded Segment Anything <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/grounded-segment-anything/grounded-segment-anything.ipynb>`__
|
||||
* `Visual Content Search with MobileCLIP <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/mobileclip-video-search/mobileclip-video-search.ipynb>`__
|
||||
* `YOLO V8 Oriented Bounding Box Detection Optimization <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/yolov8-optimization/yolov8-obb.ipynb>`__
|
||||
* `Magika: AI-powered fast and efficient file type identification <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/magika-content-type-recognition/magika-content-type-recognition.ipynb>`__
|
||||
* `Keras Stable Diffusion <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/stable-diffusion-keras-cv/stable-diffusion-keras-cv.ipynb>`__
|
||||
* `RMBG background removal <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/rmbg-background-removal/rmbg-background-removal.ipynb>`__
|
||||
* `AnimateAnyone: pose guided image to video generation <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/animate-anyone/animate-anyone.ipynb>`__
|
||||
* `LLaVA-Next visual-language assistant <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/llava-next-multimodal-chatbot/llava-next-multimodal-chatbot.ipynb>`__
|
||||
* `TripoSR: single image 3d reconstruction <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/triposr-3d-reconstruction/triposr-3d-reconstruction.ipynb>`__
|
||||
* `RAG system with OpenVINO and LangChain <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/llm-rag-langchain/llm-rag-langchain.ipynb>`__
|
||||
|
||||
|
||||
Known issues
|
||||
Known Issues
|
||||
-----------------------------
|
||||
|
||||
| **Component - CPU Plugin**
|
||||
| *ID* - N/A
|
||||
| *Description:*
|
||||
| Starting with 24.0, model inputs and outputs will no longer have tensor names, unless
|
||||
explicitly set to align with the PyTorch framework behavior.
|
||||
| Default CPU pinning policy on Windows has been changed to follow Windows' policy
|
||||
instead of controlling the CPU pinning in the OpenVINO plugin. This brings certain dynamic or
|
||||
performance variance on Windows. Developers can use ov::hint::enable_cpu_pinning to enable
|
||||
or disable CPU pinning explicitly.
|
||||
|
||||
| **Component - GPU runtime**
|
||||
| *ID* - 132376
|
||||
| *Description:*
|
||||
| First-inference latency slow down for LLMs on Intel® Core™ Ultra processors. Up to 10-20%
|
||||
drop may occur due to radical memory optimization for processing long sequences
|
||||
(about 1.5-2 GB reduced memory usage).
|
||||
|
||||
| **Component - CPU runtime**
|
||||
| **Component - Hardware Configuration**
|
||||
| *ID* - N/A
|
||||
| *Description:*
|
||||
| Performance results (first token latency) may vary from those offered by the previous OpenVINO version, for
|
||||
“latency” hint inference of LLMs with long prompts on Xeon platforms with 2 or more
|
||||
sockets. The reason is that all CPU cores of just the single socket running the application
|
||||
are employed, lowering the memory overhead for LLMs when numa control is not used.
|
||||
| *Workaround:*
|
||||
| The behavior is expected but stream and thread configuration may be used to include cores
|
||||
from all sockets.
|
||||
| Reduced performance for LLMs may be observed on newer CPUs. To mitigate, modify the default settings in BIOS to
|
||||
| change the system into 2 NUMA node system:
|
||||
| 1. Enter the BIOS configuration menu.
|
||||
| 2. Select EDKII Menu -> Socket Configuration -> Uncore Configuration -> Uncore General Configuration -> SNC.
|
||||
| 3. The SNC setting is set to *AUTO* by default. Change the SNC setting to *disabled* to configure one NUMA node per processor socket upon boot.
|
||||
| 4. After system reboot, confirm the NUMA node setting using: `numatcl -H`. Expect to see only nodes 0 and 1 on a
|
||||
| 2-socket system with the following mapping:
|
||||
| Node - 0 - 1
|
||||
| 0 - 10 - 21
|
||||
| 1 - 21 - 10
|
||||
|
||||
|
||||
Previous 2024 releases
|
||||
+++++++++++++++++++++++++++++
|
||||
|
||||
.. dropdown:: 2024.0 - 06 March 2024
|
||||
:animate: fade-in-slide-down
|
||||
:color: secondary
|
||||
|
||||
**What's new**
|
||||
|
||||
* More Generative AI coverage and framework integrations to minimize code changes.
|
||||
|
||||
* Improved out-of-the-box experience for TensorFlow sentence encoding models through the
|
||||
installation of OpenVINO™ toolkit Tokenizers.
|
||||
* New and noteworthy models validated:
|
||||
Mistral, StableLM-tuned-alpha-3b, and StableLM-Epoch-3B.
|
||||
* OpenVINO™ toolkit now supports Mixture of Experts (MoE), a new architecture that helps
|
||||
process more efficient generative models through the pipeline.
|
||||
* JavaScript developers now have seamless access to OpenVINO API. This new binding enables a
|
||||
smooth integration with JavaScript API.
|
||||
|
||||
* Broader Large Language Model (LLM) support and more model compression techniques.
|
||||
|
||||
* Broader Large Language Model (LLM) support and more model compression techniques.
|
||||
* Improved quality on INT4 weight compression for LLMs by adding the popular technique,
|
||||
Activation-aware Weight Quantization, to the Neural Network Compression Framework (NNCF).
|
||||
This addition reduces memory requirements and helps speed up token generation.
|
||||
* Experience enhanced LLM performance on Intel® CPUs, with internal memory state enhancement,
|
||||
and INT8 precision for KV-cache. Specifically tailored for multi-query LLMs like ChatGLM.
|
||||
* The OpenVINO™ 2024.0 release makes it easier for developers, by integrating more OpenVINO™
|
||||
features with the Hugging Face ecosystem. Store quantization configurations for popular
|
||||
models directly in Hugging Face to compress models into INT4 format while preserving
|
||||
accuracy and performance.
|
||||
|
||||
* More portability and performance to run AI at the edge, in the cloud, or locally.
|
||||
|
||||
* A preview plugin architecture of the integrated Neural Processor Unit (NPU) as part of
|
||||
Intel® Core™ Ultra processor (codename Meteor Lake) is now included in the main OpenVINO™
|
||||
package on PyPI.
|
||||
* Improved performance on ARM by enabling the ARM threading library. In addition, we now
|
||||
support multi-core ARM processors and enabled FP16 precision by default on MacOS.
|
||||
* New and improved LLM serving samples from OpenVINO Model Server for multi-batch inputs and
|
||||
Retrieval Augmented Generation (RAG).
|
||||
|
||||
|
||||
**OpenVINO™ Runtime**
|
||||
|
||||
*Common*
|
||||
|
||||
* The legacy API for CPP and Python bindings has been removed.
|
||||
* StringTensor support has been extended by operators such as ``Gather``, ``Reshape``, and
|
||||
``Concat``, as a foundation to improve support for tokenizer operators and compliance with
|
||||
the TensorFlow Hub.
|
||||
* oneDNN has been updated to v3.3.
|
||||
(`see oneDNN release notes <https://github.com/oneapi-src/oneDNN/releases>`__).
|
||||
|
||||
|
||||
*CPU Device Plugin*
|
||||
|
||||
* LLM performance on Intel® CPU platforms has been improved for systems based on AVX2 and
|
||||
AVX512, using dynamic quantization and internal memory state optimization, such as INT8
|
||||
precision for KV-cache. 13th and 14th generations of Intel® Core™ processors and Intel® Core™
|
||||
Ultra processors use AVX2 for CPU execution, and these platforms will benefit from speedup.
|
||||
Enable these features by setting ``"DYNAMIC_QUANTIZATION_GROUP_SIZE":"32"`` and
|
||||
``"KV_CACHE_PRECISION":"u8"`` in the configuration file.
|
||||
* The ``ov::affinity`` API configuration is now deprecated and will be removed in release
|
||||
2025.0.
|
||||
* The following have been improved and optimized:
|
||||
|
||||
* Multi-query structure LLMs (such as ChatGLM 2/3) for BF16 on the 4th and 5th generation
|
||||
Intel® Xeon® Scalable processors.
|
||||
* `Mixtral <https://huggingface.co/docs/transformers/model_doc/mixtral>`__ model performance.
|
||||
* 8-bit compressed LLM compilation time and memory usage, valuable for models with large
|
||||
embeddings like `Qwen <https://github.com/QwenLM/Qwen>`__.
|
||||
* Convolutional networks in FP16 precision on ARM processors.
|
||||
|
||||
*GPU Device Plugin*
|
||||
|
||||
* The following have been improved and optimized:
|
||||
|
||||
* Average token latency for LLMs on integrated GPU (iGPU) platforms, using INT4-compressed
|
||||
models with large context size on Intel® Core™ Ultra processors.
|
||||
* LLM beam search performance on iGPU. Both average and first-token latency decrease may be
|
||||
expected for larger context sizes.
|
||||
* Multi-batch performance of YOLOv5 on iGPU platforms.
|
||||
|
||||
* Memory usage for LLMs has been optimized, enabling '7B' models with larger context on
|
||||
16Gb platforms.
|
||||
|
||||
*NPU Device Plugin (preview feature)*
|
||||
|
||||
* The NPU plugin for OpenVINO™ is now available through PyPI (run “pip install openvino”).
|
||||
|
||||
*OpenVINO Python API*
|
||||
|
||||
* ``.add_extension`` method signatures have been aligned, improving API behavior for better
|
||||
user experience.
|
||||
|
||||
*OpenVINO C API*
|
||||
|
||||
* ov_property_key_cache_mode (C++ ov::cache_mode) now enables the ``optimize_size`` and
|
||||
``optimize_speed`` modes to set/get model cache.
|
||||
* The VA surface on Windows exception has been fixed.
|
||||
|
||||
*OpenVINO Node.js API*
|
||||
|
||||
* OpenVINO - `JS bindings <https://docs.openvino.ai/2024/api/nodejs_api/nodejs_api.html>`__
|
||||
are consistent with the OpenVINO C++ API.
|
||||
* A new distribution channel is now available: Node Package Manager (npm) software registry
|
||||
(:doc:`check the installation guide <../get-started/install-openvino/install-openvino-npm>`).
|
||||
* JavaScript API is now available for Windows users, as some limitations for platforms other
|
||||
than Linux have been removed.
|
||||
|
||||
*TensorFlow Framework Support*
|
||||
|
||||
* String tensors are now natively supported, handled on input, output, and intermediate layers
|
||||
(`PR #22024 <https://github.com/openvinotoolkit/openvino/pull/22024>`__).
|
||||
|
||||
* TensorFlow Hub universal-sentence-encoder-multilingual inferred out of the box
|
||||
* string tensors supported for ``Gather``, ``Concat``, and ``Reshape`` operations
|
||||
* integration with openvino-tokenizers module - importing openvino-tokenizers automatically
|
||||
patches TensorFlow FE with the required translators for models with tokenization
|
||||
|
||||
* Fallback for Model Optimizer by operation to the legacy Frontend is no longer available.
|
||||
Fallback by .json config will remain until Model Optimizer is discontinued
|
||||
(`PR #21523 <https://github.com/openvinotoolkit/openvino/pull/21523>`__).
|
||||
* Support for the following has been added:
|
||||
|
||||
* Mutable variables and resources such as HashTable*, Variable, VariableV2
|
||||
(`PR #22270 <https://github.com/openvinotoolkit/openvino/pull/22270>`__).
|
||||
* New tensor types: tf.u16, tf.u32, and tf.u64
|
||||
(`PR #21864 <https://github.com/openvinotoolkit/openvino/pull/21864>`__).
|
||||
* 14 NEW Ops*.
|
||||
`Check the list here (marked as NEW) <https://github.com/openvinotoolkit/openvino/blob/releases/2024/0/src/frontends/tensorflow/docs/supported_ops.md>`__.
|
||||
* TensorFlow 2.15
|
||||
(`PR #22180 <https://github.com/openvinotoolkit/openvino/pull/22180>`__).
|
||||
|
||||
* The following issues have been fixed:
|
||||
|
||||
* UpSampling2D conversion crashed when input type as int16
|
||||
(`PR #20838 <https://github.com/openvinotoolkit/openvino/pull/20838>`__).
|
||||
* IndexError list index for Squeeze
|
||||
(`PR #22326 <https://github.com/openvinotoolkit/openvino/pull/22326>`__).
|
||||
* Correct FloorDiv computation for signed integers
|
||||
(`PR #22684 <https://github.com/openvinotoolkit/openvino/pull/22684>`__).
|
||||
* Fixed bad cast error for tf.TensorShape to ov.PartialShape
|
||||
(`PR #22813 <https://github.com/openvinotoolkit/openvino/pull/22813>`__).
|
||||
* Fixed reading tf.string attributes for models in memory
|
||||
(`PR #22752 <https://github.com/openvinotoolkit/openvino/pull/22752>`__).
|
||||
|
||||
|
||||
*ONNX Framework Support*
|
||||
|
||||
* ONNX Frontend now uses the OpenVINO API 2.0.
|
||||
|
||||
*PyTorch Framework Support*
|
||||
|
||||
* Names for outputs unpacked from dict or tuple are now clearer
|
||||
(`PR #22821 <https://github.com/openvinotoolkit/openvino/pull/22821>`__).
|
||||
* FX Graph (torch.compile) now supports kwarg inputs, improving data type coverage.
|
||||
(`PR #22397 <https://github.com/openvinotoolkit/openvino/pull/22397>`__).
|
||||
|
||||
|
||||
**OpenVINO Model Server**
|
||||
|
||||
* OpenVINO™ Runtime backend used is now 2024.0.
|
||||
* Text generation demo now supports multi batch size, with streaming and unary clients.
|
||||
* The REST client now supports servables based on mediapipe graphs, including python pipeline
|
||||
nodes.
|
||||
* Included dependencies have received security-related updates.
|
||||
* Reshaping a model in runtime based on the incoming requests (auto shape and auto batch size)
|
||||
is deprecated and will be removed in the future. Using OpenVINO's dynamic shape models is
|
||||
recommended instead.
|
||||
|
||||
|
||||
**Neural Network Compression Framework (NNCF)**
|
||||
|
||||
* The `Activation-aware Weight Quantization (AWQ) <https://arxiv.org/abs/2306.00978>`__
|
||||
algorithm for data-aware 4-bit weights compression is now available. It facilitates better
|
||||
accuracy for compressed LLMs with high ratio of 4-bit weights. To enable it, use the
|
||||
dedicated ``awq`` optional parameter of ``the nncf.compress_weights()`` API.
|
||||
* ONNX models are now supported in Post-training Quantization with Accuracy Control, through
|
||||
the ``nncf.quantize_with_accuracy_control()``, method. It may be used for models in the
|
||||
OpenVINO IR and ONNX formats.
|
||||
* A `weight compression example tutorial <https://github.com/openvinotoolkit/nncf/tree/develop/examples/llm_compression/openvino/tiny_llama_find_hyperparams>`__
|
||||
is now available, demonstrating how to find the appropriate hyperparameters for the TinyLLama
|
||||
model from the Hugging Face Transformers, as well as other LLMs, with some modifications.
|
||||
|
||||
|
||||
**OpenVINO Tokenizer**
|
||||
|
||||
* Regex support has been improved.
|
||||
* Model coverage has been improved.
|
||||
* Tokenizer metadata has been added to rt_info.
|
||||
* Limited support for Tensorflow Text models has been added: convert MUSE for TF Hub with
|
||||
string inputs.
|
||||
* OpenVINO Tokenizers have their own repository now:
|
||||
`/openvino_tokenizers <https://github.com/openvinotoolkit/openvino_tokenizers>`__
|
||||
|
||||
|
||||
**Other Changes and Known Issues**
|
||||
|
||||
*Jupyter Notebooks*
|
||||
|
||||
The following notebooks have been updated or newly added:
|
||||
|
||||
* `Mobile language assistant with MobileVLM <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/279-mobilevlm-language-assistant>`__
|
||||
* `Depth estimation with DepthAnything <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/280-depth-anything>`__
|
||||
* `Kosmos-2 <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/281-kosmos2-multimodal-large-language-model>`__
|
||||
* `Zero-shot Image Classification with SigLIP <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/282-siglip-zero-shot-image-classification>`__
|
||||
* `Personalized image generation with PhotoMaker <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/283-photo-maker>`__
|
||||
* `Voice tone cloning with OpenVoice <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/284-openvoice>`__
|
||||
* `Line-level text detection with Surya <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/285-surya-line-level-text-detection>`__
|
||||
* `InstantID: Zero-shot Identity-Preserving Generation using OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/286-instant-id>`__
|
||||
* `Tutorial for Big Image Transfer (BIT) model quantization using NNCF <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/127-big-transfer-quantization>`__
|
||||
* `Tutorial for OpenVINO Tokenizers integration into inference pipelines <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/128-openvino-tokenizers>`__
|
||||
* `LLM chatbot <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/254-llm-chatbot/254-llm-chatbot.ipynb>`__ and
|
||||
`LLM RAG pipeline <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/254-llm-chatbot/254-rag-chatbot.ipynb>`__
|
||||
have received integration with new models: minicpm-2b-dpo, gemma-7b-it, qwen1.5-7b-chat, baichuan2-7b-chat
|
||||
|
||||
|
||||
*Known issues*
|
||||
|
||||
| **Component - CPU Plugin**
|
||||
| *ID* - N/A
|
||||
| *Description:*
|
||||
| Starting with 24.0, model inputs and outputs will no longer have tensor names, unless
|
||||
explicitly set to align with the PyTorch framework behavior.
|
||||
|
||||
| **Component - GPU runtime**
|
||||
| *ID* - 132376
|
||||
| *Description:*
|
||||
| First-inference latency slow down for LLMs on Intel® Core™ Ultra processors. Up to 10-20%
|
||||
drop may occur due to radical memory optimization for processing long sequences
|
||||
(about 1.5-2 GB reduced memory usage).
|
||||
|
||||
| **Component - CPU runtime**
|
||||
| *ID* - N/A
|
||||
| *Description:*
|
||||
| Performance results (first token latency) may vary from those offered by the previous OpenVINO version, for
|
||||
“latency” hint inference of LLMs with long prompts on Xeon platforms with 2 or more
|
||||
sockets. The reason is that all CPU cores of just the single socket running the application
|
||||
are employed, lowering the memory overhead for LLMs when numa control is not used.
|
||||
| *Workaround:*
|
||||
| The behavior is expected but stream and thread configuration may be used to include cores
|
||||
from all sockets.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Deprecation And Support
|
||||
|
|
@ -286,8 +541,8 @@ Discontinued in 2024
|
|||
* OpenVINO C++/C/Python 1.0 APIs (see
|
||||
`2023.3 API transition guide <https://docs.openvino.ai/2023.3/openvino_2_0_transition_guide.html>`__
|
||||
for reference).
|
||||
* All ONNX Frontend legacy API (known as ONNX_IMPORTER_API)
|
||||
* ``PerfomanceMode.UNDEFINED`` property as part of the OpenVINO Python API
|
||||
* All ONNX Frontend legacy API (known as ONNX_IMPORTER_API).
|
||||
* ``PerfomanceMode.UNDEFINED`` property as part of the OpenVINO Python API.
|
||||
|
||||
* Tools:
|
||||
|
||||
|
|
@ -315,6 +570,95 @@ Deprecated and to be removed in the future
|
|||
:doc:`model conversion transition guide <../documentation/legacy-features/transition-legacy-conversion-api>`.
|
||||
* OpenVINO property Affinity API will be discontinued with OpenVINO 2025.0.
|
||||
It will be replaced with CPU binding configurations (``ov::hint::enable_cpu_pinning``).
|
||||
* OpenVINO Model Server components:
|
||||
|
||||
* “auto shape” and “auto batch size” (reshaping a model in runtime) will be removed in the
|
||||
future. OpenVINO's dynamic shape models are recommended instead.
|
||||
|
||||
* The following notebooks have been deprecated and will be removed. For an up-to-date listing
|
||||
of available notebooks, refer to
|
||||
`OpenVINO™ Notebook index (openvinotoolkit.github.io) <https://openvinotoolkit.github.io/openvino_notebooks/>`__.
|
||||
|
||||
* `Handwritten OCR with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/handwritten-ocr>`__
|
||||
|
||||
* See alternative: `Optical Character Recognition (OCR) with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/optical-character-recognition>`__,
|
||||
* See alternative: `PaddleOCR with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/paddle-ocr-webcam>`__,
|
||||
* See alternative: `Handwritten Text Recognition Demo <https://docs.openvino.ai/2024/omz_demos_handwritten_text_recognition_demo_python.html>`__
|
||||
|
||||
* `Image In-painting with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/image-inpainting>`__
|
||||
|
||||
* See alternative: `Image Inpainting Python Demo <https://docs.openvino.ai/2024/omz_demos_image_inpainting_demo_python.html>`__
|
||||
|
||||
* `Interactive Machine Translation with OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/machine-translation>`__
|
||||
|
||||
* See alternative: `Machine Translation Python* Demo <https://docs.openvino.ai/2024/omz_demos_machine_translation_demo_python.html>`__
|
||||
|
||||
* `Open Model Zoo Tools Tutorial <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/model-tools>`__
|
||||
|
||||
* No alternatives, demonstrates deprecated tools.
|
||||
|
||||
* `Super Resolution with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/vision-superresolution>`__
|
||||
|
||||
* See alternative: `Super Resolution with PaddleGAN and OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/vision-paddlegan-superresolution>`__
|
||||
* See alternative: `Image Processing C++ Demo <https://github.com/openvinotoolkit/open_model_zoo/blob/master/demos/image_processing_demo/cpp/README.md>`__
|
||||
|
||||
* `Image Colorization with OpenVINO Tutorial <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/vision-image-colorization>`__
|
||||
* `Interactive Question Answering with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/question-answering>`__
|
||||
|
||||
* See alternative: `BERT Question Answering Embedding Python* Demo <https://github.com/openvinotoolkit/open_model_zoo/blob/master/demos/bert_question_answering_embedding_demo/python/README.md>`__
|
||||
* See alternative: `BERT Question Answering Python* Demo <https://github.com/openvinotoolkit/open_model_zoo/blob/master/demos/bert_question_answering_demo/python/README.md>`__
|
||||
|
||||
* `Vehicle Detection And Recognition with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/vehicle-detection-and-recognition>`__
|
||||
|
||||
* See alternative: `Security Barrier Camera C++ Demo <https://github.com/openvinotoolkit/open_model_zoo/blob/master/demos/security_barrier_camera_demo/cpp/README.md>`__
|
||||
|
||||
* `The attention center model with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/attention-center>`_
|
||||
* `Image Generation with DeciDiffusion <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/decidiffusion-image-generation>`_
|
||||
* `Image generation with DeepFloyd IF and OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/deepfloyd-if>`_
|
||||
* `Depth estimation using VI-depth with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/depth-estimation-videpth>`_
|
||||
* `Instruction following using Databricks Dolly 2.0 and OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/dolly-2-instruction-following>`_
|
||||
|
||||
* See alternative: `LLM Instruction-following pipeline with OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/llm-question-answering>`__
|
||||
|
||||
* `Image generation with FastComposer and OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/fastcomposer-image-generation>`__
|
||||
* `Video Subtitle Generation with OpenAI Whisper <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/whisper-subtitles-generation>`__
|
||||
|
||||
* See alternative: `Automatic speech recognition using Distil-Whisper and OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/distil-whisper-asr/distil-whisper-asr.ipynb>`__
|
||||
|
||||
* `Introduction to Performance Tricks in OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/performance-tricks>`__
|
||||
* `Speaker Diarization with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/pyannote-speaker-diarization>`__
|
||||
* `Subject-driven image generation and editing using BLIP Diffusion and OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/blip-diffusion-subject-generation>`__
|
||||
* `Text Prediction with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/text-prediction>`__
|
||||
* `Training to Deployment with TensorFlow and OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/tensorflow-training-openvino>`__
|
||||
* `Speech to Text with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/speech-to-text>`__
|
||||
* `Convert and Optimize YOLOv7 with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/yolov7-optimization>`__
|
||||
* `Quantize Data2Vec Speech Recognition Model using NNCF PTQ API <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/speech-recognition-quantization/speech-recognition-quantization-data2vec.ipynb>`__
|
||||
|
||||
* See alternative: `Quantize Speech Recognition Models with accuracy control using NNCF PTQ API <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/quantizing-model-with-accuracy-control/speech-recognition-quantization-wav2vec2.ipynb>`__
|
||||
|
||||
* `Semantic segmentation with LRASPP MobileNet v3 and OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/torchvision-zoo-to-openvino/lraspp-segmentation.ipynb>`__
|
||||
* `Video Recognition using SlowFast and OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/slowfast-video-recognition>`__
|
||||
|
||||
* See alternative: `Live Action Recognition with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/action-recognition-webcam>`__
|
||||
|
||||
* `Semantic Segmentation with OpenVINO™ using Segmenter <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/segmenter-semantic-segmentation>`__
|
||||
* `Programming Language Classification with OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/code-language-id>`__
|
||||
* `Stable Diffusion Text-to-Image Demo <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/stable-diffusion-v2/stable-diffusion-v2-text-to-image-demo.ipynb>`__
|
||||
|
||||
* See alternative: `Stable Diffusion v2.1 using Optimum-Intel OpenVINO and multiple Intel Hardware <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/stable-diffusion-v2/stable-diffusion-v2-optimum-demo.ipynb>`__
|
||||
|
||||
* `Text-to-Image Generation with Stable Diffusion v2 and OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/stable-diffusion-v2/stable-diffusion-v2-text-to-image.ipynb>`__
|
||||
|
||||
* See alternative: `Stable Diffusion v2.1 using Optimum-Intel OpenVINO and multiple Intel Hardware <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/stable-diffusion-v2/stable-diffusion-v2-optimum-demo.ipynb>`__
|
||||
|
||||
* `Image generation with Segmind Stable Diffusion 1B (SSD-1B) model and OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/stable-diffusion-xl/ssd-b1.ipynb>`__
|
||||
* `Data Preparation for 2D Medical Imaging <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/ct-segmentation-quantize/data-preparation-ct-scan.ipynb>`__
|
||||
* `Train a Kidney Segmentation Model with MONAI and PyTorch Lightning <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/ct-segmentation-quantize/pytorch-monai-training.ipynb>`__
|
||||
* `Live Inference and Benchmark CT-scan Data with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/ct-segmentation-quantize/ct-scan-live-inference.ipynb>`__
|
||||
|
||||
* See alternative: `Quantize a Segmentation Model and Show Live Inference <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/ct-segmentation-quantize/ct-segmentation-quantize-nncf.ipynb>`__
|
||||
|
||||
* `Live Style Transfer with OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/style-transfer-webcam>`__
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,174 @@
|
|||
Release Policy
|
||||
=============================================================================
|
||||
|
||||
OpenVINO offers releases of three different types, each targeting a different use case:
|
||||
|
||||
* `Regular releases <#regular-releases>`__
|
||||
* `Long-Term Support <#long-term-support-releases>`__
|
||||
* `Nightly <#nightly-releases>`__
|
||||
|
||||
|
||||
Regular releases
|
||||
####################
|
||||
|
||||
OpenVINO™ is published multiple times a year, when significant new features and bug fixes have
|
||||
been completed and validated. For each regular release, a dedicated development branch in GitHub
|
||||
is created, targeting changes such as:
|
||||
|
||||
* New features of gold quality, as well as Beta features, labeled as “preview.”
|
||||
* Key bug fixes.
|
||||
* Newest hardware support.
|
||||
|
||||
Each regular release is supported until the next version arrives, making it suitable for:
|
||||
|
||||
* Most typical use cases (the recommended release type).
|
||||
* Products requiring frequent changes in supported hardware, libraries, operating systems, and models.
|
||||
|
||||
|
||||
Long-Term Support releases
|
||||
###########################
|
||||
|
||||
Each year's final release becomes a Long-Term Support (LTS) version, which continues to receive
|
||||
bug fixes and security updates, even after newer versions are published. Therefore, LTS may be
|
||||
used for production environments where:
|
||||
|
||||
* There is no need for frequent changes in hardware or model support.
|
||||
* New optimizations are not prioritized.
|
||||
* Upgrading is challenging, e.g., due to high software complexity.
|
||||
* A legacy feature, discontinued in newer OpenVINO versions, is still required.
|
||||
|
||||
**LTS Lifecycle**
|
||||
|
||||
* LTS is typically published at the end of every year cycle.
|
||||
* LTS uses the branch of the last yearly regular release.
|
||||
* LTS aim to receive an update once a year.
|
||||
* Security updates are offered for the duration of the entire LTS period, which is two years
|
||||
(or until superseded by two consecutive LTS versions).
|
||||
* Updates targeting newly discovered bugs are offered for the period of one year.
|
||||
|
||||
.. note::
|
||||
LTS releases may offer limited distribution options.
|
||||
|
||||
**Components covered by LTS**
|
||||
|
||||
Not all components associated with the OpenVINO™ toolkit are covered by the LTS policy.
|
||||
The following elements are not guaranteed to receive updates:
|
||||
|
||||
* Components in the deprecation period.
|
||||
* Preview features (highlighted in the release notes).
|
||||
* Components not directly connected to the OpenVINO™ workflow, such as: Samples, demos, and Jupyter notebooks.
|
||||
* OpenVINO tools, such as NNCF and OVMS.
|
||||
* Code samples used in component testing.
|
||||
|
||||
|
||||
Nightly releases
|
||||
###########################
|
||||
|
||||
OpenVINO nightly releases are the first source of newly added features and priority bug fixes
|
||||
reported for the previous versions, as a preview of the most recent changes. They are:
|
||||
|
||||
* Released every workday.
|
||||
* Based on the master branch of the OpenVINO GitHub repository.
|
||||
* Not fit for production environments.
|
||||
* Offered with limited distribution options:
|
||||
|
||||
Since their validation scope is limited, **they should never be used for production purposes**.
|
||||
Instead, they may serve:
|
||||
|
||||
* Early integration testing.
|
||||
* Community contribution development and integration.
|
||||
* Tracking development progress.
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Downloadable Archives
|
||||
:sync: archives-s3
|
||||
|
||||
1. Go to `OpenVINO Nightly Packages <https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/>`__.
|
||||
2. Select a package you want to install.
|
||||
3. Download the archive for your platform.
|
||||
4. Unpack the archive in a convenient location.
|
||||
5. Once unpacked, proceed as with a regular OpenVINO archive (see :doc:`installation guides <../../../get-started/install-openvino>`).
|
||||
|
||||
.. tab-item:: OV Wheels on S3
|
||||
:sync: wheels-s3
|
||||
|
||||
A PyPI repository deployed on AWS S3 (`see more details <https://peps.python.org/pep-0503/>`__)
|
||||
enables the use of regular PyPI without the need to rename wheels. Installation commands vary depending
|
||||
on the branch:
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Master
|
||||
:sync: master
|
||||
|
||||
.. code-block:: py
|
||||
|
||||
pip install --pre openvino --extra-index-url
|
||||
https://storage.openvinotoolkit.org/simple/wheels/nightly
|
||||
|
||||
.. tab-item:: Release
|
||||
:sync: release
|
||||
|
||||
* This command includes **Release Candidates**.
|
||||
* To use ``extra-index-url``, you need to pass a link containing ``simple``.
|
||||
* The ``--pre`` allows the installation of dev-builds.
|
||||
|
||||
.. code-block:: py
|
||||
|
||||
pip install --pre openvino --extra-index-url
|
||||
https://storage.openvinotoolkit.org/simple/wheels/pre-release
|
||||
|
||||
.. tab-item:: OV Wheels on PyPi (not recommended)
|
||||
:sync: wheels-pypi
|
||||
|
||||
|
||||
Install OV Wheels from PyPI:
|
||||
|
||||
.. code-block:: py
|
||||
|
||||
pip install openvino-nightly
|
||||
|
||||
|
||||
Additional Information
|
||||
#########################
|
||||
|
||||
| **Determining the OpenVINO Version**
|
||||
| If you need to operate on a specific OpenVINO release, and you are not sure which version
|
||||
is included in the installed package, you can verify it in one of two ways:
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Python
|
||||
:sync: python
|
||||
|
||||
Execute the following command within the installed package:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
python3 -c "import openvino; print(openvino.__version__)"
|
||||
|
||||
.. tab-item:: Archives
|
||||
:sync: archives
|
||||
|
||||
You can find the file version in:
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
<UNZIPPED_ARCHIVE_ROOT>/runtime/version.txt
|
||||
|
||||
| **Issue Reporting**
|
||||
| To report issues, use the `Intel® Premier Support <https://www.intel.com/content/www/us/en/design/support/ips/training/welcome.html>`__
|
||||
clearly stating the issue, impact, and the expected timeline.
|
||||
|
||||
| **Distribution:**
|
||||
|
||||
* `Selector tool <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/download.html>`__ of all distribution options.
|
||||
* Source code distribution: `GitHub <https://github.com/openvinotoolkit/openvino>`__ and
|
||||
`Gitee <https://gitee.com/openvinotoolkit-prc/openvino>`__ .
|
||||
* Binary distribution:
|
||||
|
||||
* Download from `OpenVINO storage <https://storage.openvinotoolkit.org/repositories/openvino/packages/>`__
|
||||
* `pypi.org <https://pypi.org/project/openvino-dev/>`__
|
||||
* `DockerHub* <https://hub.docker.com/u/openvino>`__
|
||||
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
.. {#system_requirements}
|
||||
.. meta::
|
||||
:description: See OpenVINO system requirements, to ensure proper operation on various
|
||||
hardware and software setups.
|
||||
|
||||
System Requirements
|
||||
===================
|
||||
|
|
@ -26,7 +28,7 @@ CPU
|
|||
* 6th - 14th generation Intel® Core™ processors
|
||||
* Intel® Core™ Ultra (codename Meteor Lake)
|
||||
* 1st - 5th generation Intel® Xeon® Scalable Processors
|
||||
* ARM and ARM64 CPUs; Apple M1, M2, and Raspberry Pi
|
||||
* ARM CPUs with armv7a and higher, ARM64 CPUs with arm64-v8a and higher, Apple® Mac with Apple silicon
|
||||
|
||||
.. tab-item:: Supported Operating Systems
|
||||
|
||||
|
|
@ -54,7 +56,7 @@ GPU
|
|||
* Intel® Iris® Xe Max Graphics
|
||||
* Intel® Arc™ GPU Series
|
||||
* Intel® Data Center GPU Flex Series
|
||||
* Intel® Data Center GPU Max Series
|
||||
* Intel® Data Center GPU Max Series (limited support)
|
||||
|
||||
.. tab-item:: Supported Operating Systems
|
||||
|
||||
|
|
@ -88,14 +90,14 @@ Intel® Neural Processing Unit
|
|||
.. tab-item:: Operating Systems for NPU
|
||||
|
||||
* Ubuntu 22.04 long-term support (LTS), 64-bit
|
||||
* Windows 11, 64-bit (22H2, 23H2)
|
||||
* Windows 11, 64-bit (22H2 or later)
|
||||
|
||||
.. tab-item:: Additional considerations
|
||||
|
||||
* These Accelerators require :doc:`drivers <../get-started/configurations/configurations-intel-npu>`
|
||||
* These Accelerators require :doc:`drivers <../../get-started/configurations/configurations-intel-npu>`
|
||||
that are not included in the Intel® Distribution of OpenVINO™ toolkit package.
|
||||
* Users can access the NPU plugin through the OpenVINO archives on
|
||||
the :doc:`download page <../get-started/install-openvino>`.
|
||||
the :doc:`download page <../../get-started/install-openvino>`.
|
||||
|
||||
|
||||
Operating systems and developer environment
|
||||
|
|
@ -207,9 +209,3 @@ For more complete information about compiler optimizations, see our Optimization
|
|||
Performance varies by use, configuration and other factors. Learn more at
|
||||
`www.Intel.com/PerformanceIndex <www.Intel.com/PerformanceIndex>`__.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -176,13 +176,13 @@ Get started with Python
|
|||
.. image:: ../../_static/images/get_started_with_python.gif
|
||||
:width: 400
|
||||
|
||||
Try the `Python Quick Start Example <../../notebooks/201-vision-monodepth-with-output.html>`__ to estimate depth in a scene using an OpenVINO monodepth model in a Jupyter Notebook inside your web browser.
|
||||
Try the `Python Quick Start Example <../../notebooks/vision-monodepth-with-output.html>`__ to estimate depth in a scene using an OpenVINO monodepth model in a Jupyter Notebook inside your web browser.
|
||||
|
||||
Visit the :doc:`Tutorials <../../learn-openvino/interactive-tutorials-python>` page for more Jupyter Notebooks to get you started with OpenVINO, such as:
|
||||
|
||||
* `OpenVINO Python API Tutorial <../../notebooks/002-openvino-api-with-output.html>`__
|
||||
* `Basic image classification program with Hello Image Classification <../../notebooks/001-hello-world-with-output.html>`__
|
||||
* `Convert a PyTorch model and use it for image background removal <../../notebooks/205-vision-background-removal-with-output.html>`__
|
||||
* `OpenVINO Python API Tutorial <../../notebooks/openvino-api-with-output.html>`__
|
||||
* `Basic image classification program with Hello Image Classification <../../notebooks/hello-world-with-output.html>`__
|
||||
* `Convert a PyTorch model and use it for image background removal <../../notebooks/vision-background-removal-with-output.html>`__
|
||||
|
||||
Get started with C++
|
||||
++++++++++++++++++++
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ Here are code examples of how to use these methods with different model formats:
|
|||
|
||||
For more details on conversion, refer to the
|
||||
:doc:`guide <[legacy]-supported-model-formats/[legacy]-convert-pytorch>`
|
||||
and an example `tutorial <https://docs.openvino.ai/nightly/notebooks/102-pytorch-onnx-to-openvino-with-output.html>`__
|
||||
and an example `tutorial <https://docs.openvino.ai/nightly/notebooks/pytorch-onnx-to-openvino-with-output.html>`__
|
||||
on this topic.
|
||||
|
||||
.. tab-item:: TensorFlow
|
||||
|
|
@ -115,14 +115,14 @@ Here are code examples of how to use these methods with different model formats:
|
|||
|
||||
import openvino
|
||||
from openvino.tools.mo import convert_model
|
||||
|
||||
|
||||
core = openvino.Core()
|
||||
ov_model = convert_model("saved_model.pb")
|
||||
compiled_model = core.compile_model(ov_model, "AUTO")
|
||||
|
||||
For more details on conversion, refer to the
|
||||
:doc:`guide <[legacy]-supported-model-formats/[legacy]-convert-tensorflow>`
|
||||
and an example `tutorial <https://docs.openvino.ai/nightly/notebooks/101-tensorflow-to-openvino-with-output.html>`__
|
||||
and an example `tutorial <https://docs.openvino.ai/nightly/notebooks/tensorflow-to-openvino-with-output.html>`__
|
||||
on this topic.
|
||||
|
||||
* The ``read_model()`` and ``compile_model()`` methods:
|
||||
|
|
@ -227,7 +227,7 @@ Here are code examples of how to use these methods with different model formats:
|
|||
|
||||
For more details on conversion, refer to the
|
||||
:doc:`guide <[legacy]-supported-model-formats/[legacy]-convert-tensorflow>`
|
||||
and an example `tutorial <https://docs.openvino.ai/nightly/notebooks/119-tflite-to-openvino-with-output.html>`__
|
||||
and an example `tutorial <https://docs.openvino.ai/nightly/notebooks/tflite-to-openvino-with-output.html>`__
|
||||
on this topic.
|
||||
|
||||
|
||||
|
|
@ -260,7 +260,7 @@ Here are code examples of how to use these methods with different model formats:
|
|||
:force:
|
||||
|
||||
import openvino
|
||||
|
||||
|
||||
core = openvino.Core()
|
||||
compiled_model = core.compile_model("<INPUT_MODEL>.tflite", "AUTO")
|
||||
|
||||
|
|
@ -355,7 +355,7 @@ Here are code examples of how to use these methods with different model formats:
|
|||
|
||||
For more details on conversion, refer to the
|
||||
:doc:`guide <[legacy]-supported-model-formats/[legacy]-convert-onnx>`
|
||||
and an example `tutorial <https://docs.openvino.ai/nightly/notebooks/102-pytorch-onnx-to-openvino-with-output.html>`__
|
||||
and an example `tutorial <https://docs.openvino.ai/nightly/notebooks/pytorch-onnx-to-openvino-with-output.html>`__
|
||||
on this topic.
|
||||
|
||||
|
||||
|
|
@ -486,7 +486,7 @@ Here are code examples of how to use these methods with different model formats:
|
|||
|
||||
For more details on conversion, refer to the
|
||||
:doc:`guide <[legacy]-supported-model-formats/[legacy]-convert-paddle>`
|
||||
and an example `tutorial <https://docs.openvino.ai/nightly/notebooks/103-paddle-to-openvino-classification-with-output.html>`__
|
||||
and an example `tutorial <https://docs.openvino.ai/nightly/notebooks/paddle-to-openvino-classification-with-output.html>`__
|
||||
on this topic.
|
||||
|
||||
* The ``read_model()`` method:
|
||||
|
|
|
|||
|
|
@ -58,12 +58,19 @@ This section explains how to convert the YOLOv4 Keras model from the `repository
|
|||
python keras-YOLOv3-model-set/tools/model_converter/convert.py <path_to_cfg_file>/yolov4-tiny.cfg <path_to_weights>/yolov4-tiny.weights <saved_model_dir>
|
||||
|
||||
|
||||
4. Run model conversion for from the TensorFlow 2 format to an IR:
|
||||
4. Run model conversion from the TensorFlow 2 to an IR format:
|
||||
|
||||
.. note::
|
||||
|
||||
Before you run the conversion, make sure you have installed all the model conversion API dependencies for TensorFlow 2.
|
||||
|
||||
If you get errors, you may need to add the additional step to divide the input by 255:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
--scale_values=image_input[255]
|
||||
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
mo --saved_model_dir yolov4 --output_dir models/IRs --input_shape [1,608,608,3] --model_name yolov4
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ GET STARTED
|
|||
Install OpenVINO <get-started/install-openvino>
|
||||
Additional Hardware Setup <get-started/configurations>
|
||||
Troubleshooting <get-started/troubleshooting-install-config>
|
||||
System Requirements <about-openvino/system-requirements>
|
||||
System Requirements <./about-openvino/release-notes-openvino/system-requirements>
|
||||
|
||||
|
||||
.. raw:: html
|
||||
|
|
@ -24,7 +24,7 @@ GET STARTED
|
|||
<link rel="stylesheet" type="text/css" href="_static/css/getstarted_style.css">
|
||||
|
||||
<p id="GSG_introtext">Welcome to OpenVINO! This guide introduces installation and learning materials for Intel® Distribution of OpenVINO™ toolkit. The guide walks through the following steps:<br />
|
||||
<a href="notebooks/201-vision-monodepth-with-output.html" >Quick Start Example</a>
|
||||
<a href="notebooks/vision-monodepth-with-output.html" >Quick Start Example</a>
|
||||
<a href="get-started/install-openvino.html" >Install OpenVINO</a>
|
||||
<a href="#learn-openvino" >Learn OpenVINO</a>
|
||||
</p>
|
||||
|
|
@ -43,7 +43,7 @@ For a quick reference, check out
|
|||
.. image:: https://user-images.githubusercontent.com/15709723/127752390-f6aa371f-31b5-4846-84b9-18dd4f662406.gif
|
||||
:width: 400
|
||||
|
||||
Try out OpenVINO's capabilities with this `quick start example <notebooks/201-vision-monodepth-with-output.html>`__ that estimates depth in a scene using an OpenVINO monodepth model to quickly see how to load a model, prepare an image, inference the image, and display the result.
|
||||
Try out OpenVINO's capabilities with this `quick start example <notebooks/vision-monodepth-with-output.html>`__ that estimates depth in a scene using an OpenVINO monodepth model to quickly see how to load a model, prepare an image, inference the image, and display the result.
|
||||
|
||||
.. _install-openvino-gsg:
|
||||
|
||||
|
|
@ -75,10 +75,10 @@ Interactive Tutorials - Jupyter Notebooks
|
|||
|
||||
Start with :doc:`interactive Python <learn-openvino/interactive-tutorials-python>` that show the basics of model inferencing, the OpenVINO API, how to convert models to OpenVINO format, and more.
|
||||
|
||||
* `Hello Image Classification <notebooks/001-hello-world-with-output.html>`__ - Load an image classification model in OpenVINO and use it to apply a label to an image
|
||||
* `OpenVINO Runtime API Tutorial <notebooks/002-openvino-api-with-output.html>`__ - Learn the basic Python API for working with models in OpenVINO
|
||||
* `Convert TensorFlow Models to OpenVINO <notebooks/101-tensorflow-classification-to-openvino-with-output.html>`__
|
||||
* `Convert PyTorch Models to OpenVINO <notebooks/102-pytorch-onnx-to-openvino-with-output.html>`__
|
||||
* `Hello Image Classification <notebooks/hello-world-with-output.html>`__ - Load an image classification model in OpenVINO and use it to apply a label to an image
|
||||
* `OpenVINO Runtime API Tutorial <notebooks/openvino-api-with-output.html>`__ - Learn the basic Python API for working with models in OpenVINO
|
||||
* `Convert TensorFlow Models to OpenVINO <notebooks/tensorflow-classification-to-openvino-with-output.html>`__
|
||||
* `Convert PyTorch Models to OpenVINO <notebooks/pytorch-onnx-to-openvino-with-output.html>`__
|
||||
|
||||
.. _code-samples:
|
||||
|
||||
|
|
@ -106,8 +106,8 @@ Model Compression and Quantization
|
|||
|
||||
Use OpenVINO’s model compression tools to reduce your model’s latency and memory footprint while maintaining good accuracy.
|
||||
|
||||
* Tutorial - `Quantization-Aware Training in TensorFlow with OpenVINO NNCF <notebooks/305-tensorflow-quantization-aware-training-with-output>`__
|
||||
* Tutorial - `Quantization-Aware Training in PyTorch with NNCF <notebooks/302-pytorch-quantization-aware-training-with-output>`__
|
||||
* Tutorial - `Quantization-Aware Training in TensorFlow with OpenVINO NNCF <notebooks/tensorflow-quantization-aware-training-with-output>`__
|
||||
* Tutorial - `Quantization-Aware Training in PyTorch with NNCF <notebooks/pytorch-quantization-aware-training-with-output>`__
|
||||
* :doc:`Model Optimization Guide <openvino-workflow/model-optimization>`
|
||||
|
||||
Automated Device Configuration
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ Additional Resources
|
|||
|
||||
.. The following Intel® Graphics Driver versions were used during OpenVINO's internal validation:
|
||||
|
||||
.. <The table below is out of date and we do not have an updated list of drivers used for validation as of 2024.0 release date.>
|
||||
.. <The table below is out of date and we do not have an updated list of drivers used for validation as of 2024.1 release date.>
|
||||
.. <The table will be updated when an updated list of drivers is available>
|
||||
|
||||
.. +------------------+-------------------------------------------------------------------------------------------+
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
.. {#openvino_docs_install_guides_overview}
|
||||
|
||||
Install OpenVINO™ 2024.0
|
||||
Install OpenVINO™ 2024.1
|
||||
==========================
|
||||
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ Install OpenVINO™ 2024.0
|
|||
|
||||
<script type="module" crossorigin src="../_static/selector-tool/assets/index-f34d1fad.js"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<iframe id="selector" src="../_static/selector-tool/selector-c398038.html" style="width: 100%; border: none" title="Download Intel® Distribution of OpenVINO™ Toolkit"></iframe>
|
||||
<iframe id="selector" src="../_static/selector-tool/selector-1c16038.html" style="width: 100%; border: none" title="Download Intel® Distribution of OpenVINO™ Toolkit"></iframe>
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
@ -36,25 +36,25 @@ Install OpenVINO™ 2024.0
|
|||
|
||||
.. tip::
|
||||
|
||||
OpenVINO 2024.0, described here, is not a Long-Term-Support version!
|
||||
OpenVINO 2024.1, described here, is not a Long-Term-Support version!
|
||||
All currently supported versions are:
|
||||
|
||||
* 2024.0 (development)
|
||||
* 2024.1 (development)
|
||||
* 2023.3 (LTS)
|
||||
* 2022.3 (LTS)
|
||||
|
||||
Moreover, different OpenVINO distributions may support slightly different sets of features.
|
||||
Read installation guides for particular distributions for more details.
|
||||
|
||||
.. dropdown:: Distribution Comparison for OpenVINO 2024.0
|
||||
.. dropdown:: Distribution Comparison for OpenVINO 2024.1
|
||||
|
||||
=============== ========== ====== ========= ======== ============ ========== ========== ==========
|
||||
Device Archives PyPI APT/YUM Conda Homebrew vcpkg Conan npm
|
||||
=============== ========== ====== ========= ======== ============ ========== ========== ==========
|
||||
CPU V V V V V V V V
|
||||
GPU V V V V V V V V
|
||||
NPU V\* V\* V\* n/a n/a n/a n/a V\*
|
||||
=============== ========== ====== ========= ======== ============ ========== ========== ==========
|
||||
=============== ========== ====== =============== ======== ============ ========== ========== ==========
|
||||
Device Archives PyPI APT/YUM/ZYPPER Conda Homebrew vcpkg Conan npm
|
||||
=============== ========== ====== =============== ======== ============ ========== ========== ==========
|
||||
CPU V V V V V V V V
|
||||
GPU V V V V V V V V
|
||||
NPU V\* V\* V\ * n/a n/a n/a n/a V\*
|
||||
=============== ========== ====== =============== ======== ============ ========== ========== ==========
|
||||
|
||||
| \* **Of the Linux systems, only Ubuntu 22.04 includes drivers for NPU device.**
|
||||
| **For Windows, CPU inference on ARM64 is not supported.**
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Install Intel® Distribution of OpenVINO™ Toolkit for Linux Using APT Reposito
|
|||
:sync: system-requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| :doc:`System Requirements Page <../../../about-openvino/system-requirements>`
|
||||
| :doc:`System Requirements Page <../../../about-openvino/release-notes-openvino/system-requirements>`
|
||||
|
||||
.. tab-item:: Processor Notes
|
||||
:sync: processor-notes
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ Install OpenVINO™ Runtime on Linux from an Archive File
|
|||
Operating System CPU GPU NPU
|
||||
=================== ===== ===== =====
|
||||
Debian9 armhf V n/a n/a
|
||||
Ubuntu18 arm64 V n/a n/a
|
||||
Ubuntu20 arm64 V n/a n/a
|
||||
CentOS7 x86_64 V V n/a
|
||||
Ubuntu18 x86_64 V V n/a
|
||||
Ubuntu20 x86_64 V V V
|
||||
|
|
@ -40,7 +40,7 @@ Install OpenVINO™ Runtime on Linux from an Archive File
|
|||
:sync: system-requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| :doc:`System Requirements Page <../../../about-openvino/system-requirements>`
|
||||
| :doc:`System Requirements Page <../../../about-openvino/release-notes-openvino/system-requirements>`
|
||||
|
||||
.. tab-item:: Processor Notes
|
||||
:sync: processor-notes
|
||||
|
|
@ -121,7 +121,7 @@ Step 1: Download and Install the OpenVINO Core Components
|
|||
|
||||
cd <user_home>/Downloads
|
||||
|
||||
4. Download the `OpenVINO Runtime archive file for your system <https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/linux/>`_, extract the files, rename the extracted folder and move it to the desired path:
|
||||
4. Download the `OpenVINO Runtime archive file for your system <https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/linux/>`_, extract the files, rename the extracted folder and move it to the desired path:
|
||||
|
||||
.. tab-set::
|
||||
|
||||
|
|
@ -136,9 +136,9 @@ Step 1: Download and Install the OpenVINO Core Components
|
|||
.. code-block:: sh
|
||||
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/linux/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64.tgz --output openvino_2024.0.0.tgz
|
||||
tar -xf openvino_2024.0.0.tgz
|
||||
sudo mv l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64 /opt/intel/openvino_2024.0.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/linux/l_openvino_toolkit_ubuntu22_2024.1.0.15008.f4afc983258_x86_64.tgz --output openvino_2024.1.0.tgz
|
||||
tar -xf openvino_2024.1.0.tgz
|
||||
sudo mv l_openvino_toolkit_ubuntu22_2024.1.0.15008.f4afc983258_x86_64 /opt/intel/openvino_2024.1.0
|
||||
|
||||
.. tab-item:: Ubuntu 20.04
|
||||
:sync: ubuntu-20
|
||||
|
|
@ -146,9 +146,9 @@ Step 1: Download and Install the OpenVINO Core Components
|
|||
.. code-block:: sh
|
||||
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/linux/l_openvino_toolkit_ubuntu20_2024.0.0.14509.34caeefd078_x86_64.tgz --output openvino_2024.0.0.tgz
|
||||
tar -xf openvino_2024.0.0.tgz
|
||||
sudo mv l_openvino_toolkit_ubuntu20_2024.0.0.14509.34caeefd078_x86_64 /opt/intel/openvino_2024.0.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/linux/l_openvino_toolkit_ubuntu20_2024.1.0.15008.f4afc983258_x86_64.tgz --output openvino_2024.1.0.tgz
|
||||
tar -xf openvino_2024.1.0.tgz
|
||||
sudo mv l_openvino_toolkit_ubuntu20_2024.1.0.15008.f4afc983258_x86_64 /opt/intel/openvino_2024.1.0
|
||||
|
||||
|
||||
.. tab-item:: Ubuntu 18.04
|
||||
|
|
@ -157,9 +157,9 @@ Step 1: Download and Install the OpenVINO Core Components
|
|||
.. code-block:: sh
|
||||
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/linux/l_openvino_toolkit_ubuntu18_2024.0.0.14509.34caeefd078_x86_64.tgz --output openvino_2024.0.0.tgz
|
||||
tar -xf openvino_2024.0.0.tgz
|
||||
sudo mv l_openvino_toolkit_ubuntu18_2024.0.0.14509.34caeefd078_x86_64 /opt/intel/openvino_2024.0.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/linux/l_openvino_toolkit_ubuntu18_2024.1.0.15008.f4afc983258_x86_64.tgz --output openvino_2024.1.0.tgz
|
||||
tar -xf openvino_2024.1.0.tgz
|
||||
sudo mv l_openvino_toolkit_ubuntu18_2024.1.0.15008.f4afc983258_x86_64 /opt/intel/openvino_2024.1.0
|
||||
|
||||
.. tab-item:: RHEL 8
|
||||
:sync: rhel-8
|
||||
|
|
@ -167,18 +167,18 @@ Step 1: Download and Install the OpenVINO Core Components
|
|||
.. code-block:: sh
|
||||
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/linux/l_openvino_toolkit_rhel8_2024.0.0.14509.34caeefd078_x86_64.tgz --output openvino_2024.0.0.tgz
|
||||
tar -xf openvino_2024.0.0.tgz
|
||||
sudo mv l_openvino_toolkit_rhel8_2024.0.0.14509.34caeefd078_x86_64 /opt/intel/openvino_2024.0.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/linux/l_openvino_toolkit_rhel8_2024.1.0.15008.f4afc983258_x86_64.tgz --output openvino_2024.1.0.tgz
|
||||
tar -xf openvino_2024.1.0.tgz
|
||||
sudo mv l_openvino_toolkit_rhel8_2024.1.0.15008.f4afc983258_x86_64 /opt/intel/openvino_2024.1.0
|
||||
|
||||
.. tab-item:: CentOS 7
|
||||
:sync: centos-7
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/linux/l_openvino_toolkit_centos7_2024.0.0.14509.34caeefd078_x86_64.tgz --output openvino_2024.0.0.tgz
|
||||
tar -xf openvino_2024.0.0.tgz
|
||||
sudo mv l_openvino_toolkit_centos7_2024.0.0.14509.34caeefd078_x86_64 /opt/intel/openvino_2024.0.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/linux/l_openvino_toolkit_centos7_2024.1.0.15008.f4afc983258_x86_64.tgz --output openvino_2024.1.0.tgz
|
||||
tar -xf openvino_2024.1.0.tgz
|
||||
sudo mv l_openvino_toolkit_centos7_2024.1.0.15008.f4afc983258_x86_64 /opt/intel/openvino_2024.1.0
|
||||
|
||||
|
||||
.. tab-item:: ARM 64-bit
|
||||
|
|
@ -187,25 +187,25 @@ Step 1: Download and Install the OpenVINO Core Components
|
|||
.. code-block:: sh
|
||||
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/linux/l_openvino_toolkit_ubuntu18_2024.0.0.14509.34caeefd078_arm64.tgz -O openvino_2024.0.0.tgz
|
||||
tar -xf openvino_2024.0.0.tgz
|
||||
sudo mv l_openvino_toolkit_ubuntu18_2024.0.0.14509.34caeefd078_arm64 /opt/intel/openvino_2024.0.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/linux/l_openvino_toolkit_ubuntu20_2024.1.0.15008.f4afc983258_arm64.tgz -O openvino_2024.1.0.tgz
|
||||
tar -xf openvino_2024.1.0.tgz
|
||||
sudo mv l_openvino_toolkit_ubuntu20_2024.1.0.15008.f4afc983258_arm64 /opt/intel/openvino_2024.1.0
|
||||
|
||||
.. tab-item:: ARM 32-bit
|
||||
:sync: arm-32
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/linux/l_openvino_toolkit_debian9_2024.0.0.14509.34caeefd078_armhf.tgz -O openvino_2024.0.0.tgz
|
||||
tar -xf openvino_2024.0.0.tgz
|
||||
sudo mv l_openvino_toolkit_debian9_2024.0.0.14509.34caeefd078_armhf /opt/intel/openvino_2024.0.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/linux/l_openvino_toolkit_debian9_2024.1.0.15008.f4afc983258_armhf.tgz -O openvino_2024.1.0.tgz
|
||||
tar -xf openvino_2024.1.0.tgz
|
||||
sudo mv l_openvino_toolkit_debian9_2024.1.0.15008.f4afc983258_armhf /opt/intel/openvino_2024.1.0
|
||||
|
||||
|
||||
5. Install required system dependencies on Linux. To do this, OpenVINO provides a script in the extracted installation directory. Run the following command:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd /opt/intel/openvino_2024.0.0
|
||||
cd /opt/intel/openvino_2024.1.0
|
||||
sudo -E ./install_dependencies/install_openvino_dependencies.sh
|
||||
|
||||
6. (Optional) Install *numpy* Python Library:
|
||||
|
|
@ -214,11 +214,11 @@ Step 1: Download and Install the OpenVINO Core Components
|
|||
|
||||
This step is required only when you decide to use Python API.
|
||||
|
||||
You can use the ``requirements.txt`` file from the ``/opt/intel/openvino_2024.0.0/python`` folder:
|
||||
You can use the ``requirements.txt`` file from the ``/opt/intel/openvino_2024.1.0/python`` folder:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd /opt/intel/openvino_2024.0.0
|
||||
cd /opt/intel/openvino_2024.1.0
|
||||
python3 -m pip install -r ./python/requirements.txt
|
||||
|
||||
7. For simplicity, it is useful to create a symbolic link as below:
|
||||
|
|
@ -227,7 +227,7 @@ Step 1: Download and Install the OpenVINO Core Components
|
|||
|
||||
cd /opt/intel
|
||||
|
||||
sudo ln -s openvino_2024.0.0 openvino_2024
|
||||
sudo ln -s openvino_2024.1.0 openvino_2024
|
||||
|
||||
.. note::
|
||||
If you have already installed a previous release of OpenVINO 2024, a symbolic link to the ``openvino_2024`` folder may already exist.
|
||||
|
|
@ -283,7 +283,7 @@ Learn more about how to integrate a model in OpenVINO applications by trying out
|
|||
.. tab-item:: Get started with Python
|
||||
:sync: get-started-py
|
||||
|
||||
Try the `Python Quick Start Example <../../notebooks/201-vision-monodepth-with-output.html>`__
|
||||
Try the `Python Quick Start Example <../../notebooks/vision-monodepth-with-output.html>`__
|
||||
to estimate depth in a scene using an OpenVINO monodepth model in a Jupyter Notebook inside your web browser.
|
||||
|
||||
.. image:: https://user-images.githubusercontent.com/15709723/127752390-f6aa371f-31b5-4846-84b9-18dd4f662406.gif
|
||||
|
|
@ -291,9 +291,9 @@ Learn more about how to integrate a model in OpenVINO applications by trying out
|
|||
|
||||
Visit the :doc:`Tutorials <../../../learn-openvino/interactive-tutorials-python>` page for more Jupyter Notebooks to get you started with OpenVINO, such as:
|
||||
|
||||
* `OpenVINO Python API Tutorial <../../notebooks/002-openvino-api-with-output.html>`__
|
||||
* `Basic image classification program with Hello Image Classification <../../notebooks/001-hello-world-with-output.html>`__
|
||||
* `Convert a PyTorch model and use it for image background removal <../../notebooks/205-vision-background-removal-with-output.html>`__
|
||||
* `OpenVINO Python API Tutorial <../../notebooks/openvino-api-with-output.html>`__
|
||||
* `Basic image classification program with Hello Image Classification <../../notebooks/hello-world-with-output.html>`__
|
||||
* `Convert a PyTorch model and use it for image background removal <../../notebooks/vision-background-removal-with-output.html>`__
|
||||
|
||||
|
||||
.. tab-item:: Get started with C++
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ Install OpenVINO™ Runtime on macOS from an Archive File
|
|||
:sync: system-requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| :doc:`System Requirements Page <../../../about-openvino/system-requirements>`
|
||||
| :doc:`System Requirements Page <../../../about-openvino/release-notes-openvino/system-requirements>`
|
||||
|
||||
.. tab-item:: Software Requirements
|
||||
:sync: software-requirements
|
||||
|
|
@ -63,7 +63,7 @@ Step 1: Install OpenVINO Core Components
|
|||
cd <user_home>/Downloads
|
||||
|
||||
|
||||
4. Download the `OpenVINO Runtime archive file for macOS <https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/macos/>`__, extract the files, rename the extracted folder and move it to the desired path:
|
||||
4. Download the `OpenVINO Runtime archive file for macOS <https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/macos/>`__, extract the files, rename the extracted folder and move it to the desired path:
|
||||
|
||||
.. tab-set::
|
||||
|
||||
|
|
@ -73,9 +73,9 @@ Step 1: Install OpenVINO Core Components
|
|||
.. code-block:: sh
|
||||
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/macos/m_openvino_toolkit_macos_10_15_2024.0.0.14509.34caeefd078_x86_64.tgz --output openvino_2024.0.0.tgz
|
||||
tar -xf openvino_2024.0.0.tgz
|
||||
sudo mv m_openvino_toolkit_macos_10_15_2024.0.0.14509.34caeefd078_x86_64 /opt/intel/openvino_2024.0.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/macos/m_openvino_toolkit_macos_12_6_2024.1.0.15008.f4afc983258_x86_64.tgz --output openvino_2024.1.0.tgz
|
||||
tar -xf openvino_2024.1.0.tgz
|
||||
sudo mv m_openvino_toolkit_macos_12_6_2024.1.0.15008.f4afc983258_x86_64 /opt/intel/openvino_2024.1.0
|
||||
|
||||
.. tab-item:: ARM, 64-bit
|
||||
:sync: arm-64
|
||||
|
|
@ -83,9 +83,9 @@ Step 1: Install OpenVINO Core Components
|
|||
.. code-block:: sh
|
||||
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/macos/m_openvino_toolkit_macos_11_0_2024.0.0.14509.34caeefd078_arm64.tgz --output openvino_2024.0.0.tgz
|
||||
tar -xf openvino_2024.0.0.tgz
|
||||
sudo mv m_openvino_toolkit_macos_11_0_2024.0.0.14509.34caeefd078_arm64 /opt/intel/openvino_2024.0.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/macos/m_openvino_toolkit_macos_12_6_2024.1.0.15008.f4afc983258_arm64.tgz --output openvino_2024.1.0.tgz
|
||||
tar -xf openvino_2024.1.0.tgz
|
||||
sudo mv m_openvino_toolkit_macos_12_6_2024.1.0.15008.f4afc983258_arm64 /opt/intel/openvino_2024.1.0
|
||||
|
||||
|
||||
5. (Optional) Install *numpy* Python Library:
|
||||
|
|
@ -94,11 +94,11 @@ Step 1: Install OpenVINO Core Components
|
|||
|
||||
This step is required only when you decide to use Python API.
|
||||
|
||||
You can use the ``requirements.txt`` file from the ``/opt/intel/openvino_2024.0.0/python`` folder:
|
||||
You can use the ``requirements.txt`` file from the ``/opt/intel/openvino_2024.1.0/python`` folder:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd /opt/intel/openvino_2024.0.0
|
||||
cd /opt/intel/openvino_2024.1.0
|
||||
python3 -m pip install -r ./python/requirements.txt
|
||||
|
||||
6. For simplicity, it is useful to create a symbolic link as below:
|
||||
|
|
@ -106,12 +106,12 @@ Step 1: Install OpenVINO Core Components
|
|||
.. code-block:: sh
|
||||
|
||||
|
||||
sudo ln -s /opt/intel/openvino_2024.0.0 /opt/intel/openvino_2023
|
||||
sudo ln -s /opt/intel/openvino_2024.1.0 /opt/intel/openvino_2024
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
If you have already installed a previous release of OpenVINO 2023, a symbolic link to the ``openvino_2023`` folder may already exist. Unlink the previous link with ``sudo unlink openvino_2023``, and then re-run the command above.
|
||||
If you have already installed a previous release of OpenVINO 2024, a symbolic link to the ``openvino_2024`` folder may already exist. Unlink the previous link with ``sudo unlink openvino_2024``, and then re-run the command above.
|
||||
|
||||
|
||||
Congratulations, you have finished the installation! For some use cases you may still
|
||||
|
|
@ -119,9 +119,9 @@ need to install additional components. Check the description below, as well as t
|
|||
:doc:`list of additional configurations <../configurations>`
|
||||
to see if your case needs any of them.
|
||||
|
||||
The ``/opt/intel/openvino_2023`` folder now contains the core components for OpenVINO.
|
||||
The ``/opt/intel/openvino_2024`` folder now contains the core components for OpenVINO.
|
||||
If you used a different path in Step 2, for example, ``/home/<USER>/intel/``,
|
||||
OpenVINO is now in ``/home/<USER>/intel/openvino_2023``. The path to the ``openvino_2023``
|
||||
OpenVINO is now in ``/home/<USER>/intel/openvino_2024``. The path to the ``openvino_2024``
|
||||
directory is also referred as ``<INSTALL_DIR>`` throughout the OpenVINO documentation.
|
||||
|
||||
|
||||
|
|
@ -130,19 +130,19 @@ Step 2: Configure the Environment
|
|||
|
||||
You must update several environment variables before you can compile and run OpenVINO applications. Open a terminal window and run the ``setupvars.sh``
|
||||
script as shown below to temporarily set your environment variables. If your ``<INSTALL_DIR>`` (the folder you used to install OpenVINO) is not
|
||||
the default ``/opt/intel/openvino_2023``, use the correct one instead.
|
||||
the default ``/opt/intel/openvino_2024``, use the correct one instead.
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd /opt/intel/openvino_2023
|
||||
source /opt/intel/openvino_2023/setupvars.sh
|
||||
cd /opt/intel/openvino_2024
|
||||
source /opt/intel/openvino_2024/setupvars.sh
|
||||
|
||||
|
||||
If you have more than one OpenVINO™ version on your machine, you can easily switch its version by sourcing the ``setupvars.sh`` of your choice.
|
||||
|
||||
.. note::
|
||||
|
||||
The above command must be re-run every time you start a new terminal session. To set up macOS to automatically run the command every time a new terminal is opened, open ``~/.zshrc`` in your favorite editor and add ``source /opt/intel/openvino_2023/setupvars.sh`` after the last line. Next time when you open a terminal, you will see ``[setupvars.sh] OpenVINO™ environment initialized``. Changing ``~/.zshrc`` is not recommended when you have multiple OpenVINO versions on your machine and want to switch among them.
|
||||
The above command must be re-run every time you start a new terminal session. To set up macOS to automatically run the command every time a new terminal is opened, open ``~/.zshrc`` in your favorite editor and add ``source /opt/intel/openvino_2024/setupvars.sh`` after the last line. Next time when you open a terminal, you will see ``[setupvars.sh] OpenVINO™ environment initialized``. Changing ``~/.zshrc`` is not recommended when you have multiple OpenVINO versions on your machine and want to switch among them.
|
||||
|
||||
|
||||
|
||||
|
|
@ -156,16 +156,16 @@ Now that you've installed OpenVINO Runtime, you're ready to run your own machine
|
|||
.. tab-item:: Get started with Python
|
||||
:sync: get-started-py
|
||||
|
||||
Try the `Python Quick Start Example <../../notebooks/201-vision-monodepth-with-output.html>`__ to estimate depth in a scene using an OpenVINO monodepth model in a Jupyter Notebook inside your web browser.
|
||||
Try the `Python Quick Start Example <../../notebooks/vision-monodepth-with-output.html>`__ to estimate depth in a scene using an OpenVINO monodepth model in a Jupyter Notebook inside your web browser.
|
||||
|
||||
.. image:: https://user-images.githubusercontent.com/15709723/127752390-f6aa371f-31b5-4846-84b9-18dd4f662406.gif
|
||||
:width: 400
|
||||
|
||||
Visit the :doc:`Tutorials <../../../learn-openvino/interactive-tutorials-python>` page for more Jupyter Notebooks to get you started with OpenVINO, such as:
|
||||
|
||||
* `OpenVINO Python API Tutorial <../../notebooks/002-openvino-api-with-output.html>`__
|
||||
* `Basic image classification program with Hello Image Classification <../../notebooks/001-hello-world-with-output.html>`__
|
||||
* `Convert a PyTorch model and use it for image background removal <../../notebooks/205-vision-background-removal-with-output.html>`__
|
||||
* `OpenVINO Python API Tutorial <../../notebooks/openvino-api-with-output.html>`__
|
||||
* `Basic image classification program with Hello Image Classification <../../notebooks/hello-world-with-output.html>`__
|
||||
* `Convert a PyTorch model and use it for image background removal <../../notebooks/vision-background-removal-with-output.html>`__
|
||||
|
||||
.. tab-item:: Get started with C++
|
||||
:sync: get-started-cpp
|
||||
|
|
@ -190,7 +190,7 @@ If you have created the symbolic link, remove the link first:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo rm /opt/intel/openvino_2023
|
||||
sudo rm /opt/intel/openvino_2024
|
||||
|
||||
To delete the files:
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ System Requirements
|
|||
:sync: system-requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| :doc:`System Requirements Page <../../../about-openvino/system-requirements>`
|
||||
| :doc:`System Requirements Page <../../../about-openvino/release-notes-openvino/system-requirements>`
|
||||
|
||||
.. tab-item:: Processor Notes
|
||||
:sync: processor-notes
|
||||
|
|
@ -78,19 +78,19 @@ Step 1: Download and Install OpenVINO Core Components
|
|||
``C:\Program Files (x86)\Intel`` is the recommended folder. You may also use a different path if desired or if you don't have administrator privileges on your computer.
|
||||
|
||||
|
||||
2. Download the `OpenVINO Runtime archive file for Windows <https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/windows/>`__ to your local ``Downloads`` folder.
|
||||
2. Download the `OpenVINO Runtime archive file for Windows <https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/windows/>`__ to your local ``Downloads`` folder.
|
||||
|
||||
If you prefer using command-lines, run the following commands in the command prompt window you opened:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd <user_home>/Downloads
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.0/windows/w_openvino_toolkit_windows_2024.0.0.14509.34caeefd078_x86_64.zip --output openvino_2024.0.0.zip
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.1/windows/w_openvino_toolkit_windows_2024.1.0.15008.f4afc983258_x86_64.zip --output openvino_2024.1.0.zip
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
A ``.sha256`` file is provided together with the archive file to validate your download process. To do that, download the ``.sha256`` file from the same repository and run ``CertUtil -hashfile openvino_2024.0.0.zip SHA256``. Compare the returned value in the output with what's in the ``.sha256`` file: if the values are the same, you have downloaded the correct file successfully; if not, create a Support ticket `here <https://www.intel.com/content/www/us/en/support/contact-intel.html>`__.
|
||||
A ``.sha256`` file is provided together with the archive file to validate your download process. To do that, download the ``.sha256`` file from the same repository and run ``CertUtil -hashfile openvino_2024.1.0.zip SHA256``. Compare the returned value in the output with what's in the ``.sha256`` file: if the values are the same, you have downloaded the correct file successfully; if not, create a Support ticket `here <https://www.intel.com/content/www/us/en/support/contact-intel.html>`__.
|
||||
|
||||
|
||||
3. Use your favorite tool to extract the archive file, rename the extracted folder, and move it to the ``C:\Program Files (x86)\Intel`` directory.
|
||||
|
|
@ -99,9 +99,9 @@ Step 1: Download and Install OpenVINO Core Components
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
tar -xf openvino_2024.0.0.zip
|
||||
ren w_openvino_toolkit_windows_2024.0.0.14509.34caeefd078_x86_64 openvino_2024.0.0
|
||||
move openvino_2024.0.0 "C:\Program Files (x86)\Intel"
|
||||
tar -xf openvino_2024.1.0.zip
|
||||
ren w_openvino_toolkit_windows_2024.1.0.15008.f4afc983258_x86_64 openvino_2024.1.0
|
||||
move openvino_2024.1.0 "C:\Program Files (x86)\Intel"
|
||||
|
||||
|
||||
4. (Optional) Install *numpy* Python Library:
|
||||
|
|
@ -110,11 +110,11 @@ Step 1: Download and Install OpenVINO Core Components
|
|||
|
||||
This step is required only when you decide to use Python API.
|
||||
|
||||
You can use the ``requirements.txt`` file from the ``C:\Program Files (x86)\Intel\openvino_2024.0.0\python`` folder:
|
||||
You can use the ``requirements.txt`` file from the ``C:\Program Files (x86)\Intel\openvino_2024.1.0\python`` folder:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd "C:\Program Files (x86)\Intel\openvino_2024.0.0"
|
||||
cd "C:\Program Files (x86)\Intel\openvino_2024.1.0"
|
||||
python -m pip install -r .\python\requirements.txt
|
||||
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ Step 1: Download and Install OpenVINO Core Components
|
|||
.. code-block:: sh
|
||||
|
||||
cd C:\Program Files (x86)\Intel
|
||||
mklink /D openvino_2024 openvino_2024.0.0
|
||||
mklink /D openvino_2024 openvino_2024.1.0
|
||||
|
||||
|
||||
.. note::
|
||||
|
|
@ -194,16 +194,16 @@ Now that you've installed OpenVINO Runtime, you're ready to run your own machine
|
|||
.. tab-item:: Get started with Python
|
||||
:sync: get-started-py
|
||||
|
||||
Try the `Python Quick Start Example <../../notebooks/201-vision-monodepth-with-output.html>`__ to estimate depth in a scene using an OpenVINO monodepth model in a Jupyter Notebook inside your web browser.
|
||||
Try the `Python Quick Start Example <../../notebooks/vision-monodepth-with-output.html>`__ to estimate depth in a scene using an OpenVINO monodepth model in a Jupyter Notebook inside your web browser.
|
||||
|
||||
.. image:: https://user-images.githubusercontent.com/15709723/127752390-f6aa371f-31b5-4846-84b9-18dd4f662406.gif
|
||||
:width: 400
|
||||
|
||||
Visit the :doc:`Tutorials <../../../learn-openvino/interactive-tutorials-python>` page for more Jupyter Notebooks to get you started with OpenVINO, such as:
|
||||
|
||||
* `OpenVINO Python API Tutorial <../../notebooks/002-openvino-api-with-output.html>`__
|
||||
* `Basic image classification program with Hello Image Classification <../../notebooks/001-hello-world-with-output.html>`__
|
||||
* `Convert a PyTorch model and use it for image background removal <../../notebooks/205-vision-background-removal-with-output.html>`__
|
||||
* `OpenVINO Python API Tutorial <../../notebooks/openvino-api-with-output.html>`__
|
||||
* `Basic image classification program with Hello Image Classification <../../notebooks/hello-world-with-output.html>`__
|
||||
* `Convert a PyTorch model and use it for image background removal <../../notebooks/vision-background-removal-with-output.html>`__
|
||||
|
||||
.. tab-item:: Get started with C++
|
||||
:sync: get-started-cpp
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Install OpenVINO™ Runtime via Homebrew
|
|||
:sync: system-requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| :doc:`System Requirements Page <../../../about-openvino/system-requirements>`
|
||||
| :doc:`System Requirements Page <../../../about-openvino/release-notes-openvino/system-requirements>`
|
||||
|
||||
.. tab-item:: Processor Notes
|
||||
:sync: processor-notes
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Install OpenVINO™ Runtime from Conan Package Manager
|
|||
:sync: system-requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| :doc:`System Requirements Page <../../../about-openvino/system-requirements>`
|
||||
| :doc:`System Requirements Page <../../../about-openvino/release-notes-openvino/system-requirements>`
|
||||
|
||||
.. tab-item:: Processor Notes
|
||||
:sync: processor-notes
|
||||
|
|
@ -52,7 +52,7 @@ Installing OpenVINO Runtime with Conan Package Manager
|
|||
.. code-block:: sh
|
||||
|
||||
[requires]
|
||||
openvino/2024.0.0
|
||||
openvino/2024.1.0
|
||||
[generators]
|
||||
CMakeDeps
|
||||
CMakeToolchain
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Install OpenVINO™ Runtime from Conda Forge
|
|||
:sync: system-requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| :doc:`System Requirements Page <../../../about-openvino/system-requirements>`
|
||||
| :doc:`System Requirements Page <../../../about-openvino/release-notes-openvino/system-requirements>`
|
||||
|
||||
|
||||
.. tab-item:: Processor Notes
|
||||
|
|
@ -64,7 +64,7 @@ Installing OpenVINO Runtime with Anaconda Package Manager
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
conda install -c conda-forge openvino=2024.0.0
|
||||
conda install -c conda-forge openvino=2024.1.0
|
||||
|
||||
Congratulations! You've just Installed OpenVINO! For some use cases you may still
|
||||
need to install additional components. Check the description below, as well as the
|
||||
|
|
@ -74,12 +74,14 @@ to see if your case needs any of them.
|
|||
Compiling with OpenVINO Runtime from Conda-Forge on Linux
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
When linking OpenVINO libraries from Conda on Linux, ensure that you have the necessary Conda compilers installed.
|
||||
When linking OpenVINO libraries from Conda on Linux, ensure that you have the necessary Conda
|
||||
compilers installed and Conda standard libraries are used.
|
||||
To do so, run the following command in your Conda environment:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
conda install cmake c-compiler cxx-compiler make
|
||||
conda env config vars set LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
|
||||
|
||||
It is crucial to reactivate your Conda environment after installing the compilers.
|
||||
This step ensures that all the environment variables are set correctly for successful linkage.
|
||||
|
|
@ -93,6 +95,18 @@ To reactivate your Conda environment, execute the following command:
|
|||
Once you have reactivated your Conda environment, make sure that all the necessary environment
|
||||
variables are properly set and proceed with linking the OpenVINO libraries.
|
||||
|
||||
Enabling GPU device for inference
|
||||
+++++++++++++++++++++++++++++++++
|
||||
|
||||
To use a GPU device for OpenVINO inference on Linux, you must install OpenCL ICD:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
conda install ocl-icd-system
|
||||
|
||||
This step is not required on Windows, as Intel® Graphics Compute Runtime for
|
||||
OpenCL™ Driver is included with the Intel® Graphics Driver package.
|
||||
|
||||
|
||||
Uninstalling OpenVINO™ Runtime
|
||||
###########################################################
|
||||
|
|
@ -102,9 +116,7 @@ with the proper OpenVINO version number:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
conda remove openvino=2024.0.0
|
||||
|
||||
|
||||
conda remove openvino=2024.1.0
|
||||
|
||||
What's Next?
|
||||
############################################################
|
||||
|
|
@ -123,6 +135,3 @@ Visit the :doc:`Samples <../../../learn-openvino/openvino-samples>` page for oth
|
|||
* :doc:`Basic object detection with the Hello Reshape SSD C++ sample <../../../learn-openvino/openvino-samples/hello-reshape-ssd>`
|
||||
* :doc:`Object classification sample <../../../learn-openvino/openvino-samples/hello-classification>`
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ Install OpenVINO™ Runtime on Linux
|
|||
Use PyPI <install-openvino-pip>
|
||||
Use APT <install-openvino-apt>
|
||||
Use YUM <install-openvino-yum>
|
||||
Use ZYPPER <install-openvino-zypper>
|
||||
Use Conda Forge <install-openvino-conda>
|
||||
Use vcpkg <install-openvino-vcpkg>
|
||||
Use Homebrew <install-openvino-brew>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Install Intel® Distribution of OpenVINO™ Toolkit from PyPI Repository
|
|||
:sync: system-requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| :doc:`System Requirements Page <../../../about-openvino/system-requirements>`
|
||||
| :doc:`System Requirements Page <../../../about-openvino/release-notes-openvino/system-requirements>`
|
||||
| `PyPI OpenVINO page <https://pypi.org/project/openvino/>`__
|
||||
|
||||
|
||||
|
|
@ -135,16 +135,16 @@ Now that you've installed OpenVINO Runtime, you're ready to run your own machine
|
|||
.. image:: https://user-images.githubusercontent.com/15709723/127752390-f6aa371f-31b5-4846-84b9-18dd4f662406.gif
|
||||
:width: 400
|
||||
|
||||
Try the `Python Quick Start Example <https://docs.openvino.ai/2024/notebooks/201-vision-monodepth-with-output.html>`__ to estimate depth in a scene using an OpenVINO monodepth model in a Jupyter Notebook inside your web browser.
|
||||
Try the `Python Quick Start Example <https://docs.openvino.ai/2024/notebooks/vision-monodepth-with-output.html>`__ to estimate depth in a scene using an OpenVINO monodepth model in a Jupyter Notebook inside your web browser.
|
||||
|
||||
Get started with Python
|
||||
+++++++++++++++++++++++
|
||||
|
||||
Visit the :doc:`Tutorials <../../../learn-openvino/interactive-tutorials-python>` page for more Jupyter Notebooks to get you started with OpenVINO, such as:
|
||||
|
||||
* `OpenVINO Python API Tutorial <https://docs.openvino.ai/2024/notebooks/002-openvino-api-with-output.html>`__
|
||||
* `Basic image classification program with Hello Image Classification <https://docs.openvino.ai/2024/notebooks/001-hello-world-with-output.html>`__
|
||||
* `Convert a PyTorch model and use it for image background removal <https://docs.openvino.ai/2024/notebooks/205-vision-background-removal-with-output.html>`__
|
||||
* `OpenVINO Python API Tutorial <https://docs.openvino.ai/2024/notebooks/openvino-api-with-output.html>`__
|
||||
* `Basic image classification program with Hello Image Classification <https://docs.openvino.ai/2024/notebooks/hello-world-with-output.html>`__
|
||||
* `Convert a PyTorch model and use it for image background removal <https://docs.openvino.ai/2024/notebooks/vision-background-removal-with-output.html>`__
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Install OpenVINO™ Runtime via vcpkg
|
|||
:sync: system-requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| :doc:`System Requirements Page <../../../about-openvino/system-requirements>`
|
||||
| :doc:`System Requirements Page <../../../about-openvino/release-notes-openvino/system-requirements>`
|
||||
|
||||
.. tab-item:: Processor Notes
|
||||
:sync: processor-notes
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Install OpenVINO™ Runtime on Linux From YUM Repository
|
|||
:sync: system-requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| :doc:`System Requirements Page <../../../about-openvino/system-requirements>`
|
||||
| :doc:`System Requirements Page <../../../about-openvino/release-notes-openvino/system-requirements>`
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,187 @@
|
|||
.. {#openvino_docs_install_guides_installing_openvino_zypper}
|
||||
|
||||
Install OpenVINO™ Runtime on Linux From ZYPPER Repository
|
||||
=========================================================
|
||||
|
||||
|
||||
.. meta::
|
||||
:description: Learn how to install OpenVINO™ Runtime on Linux operating
|
||||
system, using the ZYPPER repository.
|
||||
|
||||
.. note::
|
||||
|
||||
Note that the ZYPPER distribution:
|
||||
|
||||
* offers both C/C++ APIs
|
||||
* does not offer support for NPU inference
|
||||
* is dedicated to Linux users only
|
||||
* additionally includes code samples
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: System Requirements
|
||||
:sync: system-requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| :doc:`System Requirements Page <../../../about-openvino/release-notes-openvino/system-requirements>`
|
||||
|
||||
.. note::
|
||||
|
||||
OpenVINO RPM packages are compatible with and can be run on the following operating systems:
|
||||
|
||||
- openSUSE Tumbleweed
|
||||
|
||||
.. tab-item:: Processor Notes
|
||||
:sync: processor-notes
|
||||
|
||||
| To see if your processor includes the integrated graphics technology and supports iGPU inference, refer to:
|
||||
| `Product Specifications <https://ark.intel.com/>`__
|
||||
|
||||
.. tab-item:: Software
|
||||
:sync: software
|
||||
|
||||
* `CMake 3.13 or higher, 64-bit <https://cmake.org/download/>`_
|
||||
* GCC 8.2.0
|
||||
* `Python 3.8 - 3.11, 64-bit <https://www.python.org/downloads/>`_
|
||||
|
||||
|
||||
Install OpenVINO Runtime
|
||||
########################
|
||||
|
||||
Step 1: Set Up the Repository
|
||||
+++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
1. Create a ZYPPER repository file with the command below:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo zypper addrepo https://download.opensuse.org/repositories/science/openSUSE_Tumbleweed/science.repo
|
||||
sudo zypper refresh
|
||||
|
||||
2. Verify that the new repository is set up properly.
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
zypper lr |grep -i science
|
||||
|
||||
You will see the available list of packages.
|
||||
|
||||
To list available OpenVINO packages, use the following command:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
zypper se openvino
|
||||
|
||||
Step 2: Install OpenVINO Runtime Using the ZYPPER Package Manager
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
Install OpenVINO Runtime
|
||||
-------------------------
|
||||
|
||||
Run the following command:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo zypper install openvino-devel openvino-sample
|
||||
|
||||
Check for Installed Packages and Version
|
||||
-----------------------------------------
|
||||
|
||||
|
||||
Run the following command:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
zypper se -i openvino
|
||||
|
||||
.. note::
|
||||
You can additionally install Python API using one of the alternative methods (:doc:`conda <install-openvino-conda>` or :doc:`pip <install-openvino-pip>`).
|
||||
|
||||
Congratulations! You've just Installed OpenVINO! For some use cases you may still
|
||||
need to install additional components. Check the
|
||||
:doc:`list of additional configurations <../configurations>`
|
||||
to see if your case needs any of them.
|
||||
|
||||
With the ZYPPER distribution, you can build OpenVINO sample files, as explained in the
|
||||
:doc:`guide for OpenVINO sample applications <../../../learn-openvino/openvino-samples>`.
|
||||
For C++ and C, just run the ``build_samples.sh`` script:
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
/usr/share/openvino/samples/cpp/build_samples.sh
|
||||
|
||||
.. tab-item:: C
|
||||
:sync: c
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
/usr/share/openvino/samples/c/build_samples.sh
|
||||
|
||||
|
||||
|
||||
Uninstalling OpenVINO Runtime
|
||||
##############################
|
||||
|
||||
To uninstall OpenVINO Runtime via ZYPPER, run the following command based on your needs:
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: The Latest Version
|
||||
:sync: latest-version
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo zypper remove *openvino*
|
||||
|
||||
|
||||
.. tab-item:: A Specific Version
|
||||
:sync: specific-version
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo zypper remove *openvino-<VERSION>.<UPDATE>.<PATCH>*
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo zypper remove *openvino-2024.0.0*
|
||||
|
||||
|
||||
|
||||
|
||||
What's Next?
|
||||
#############
|
||||
|
||||
Now that you've installed OpenVINO Runtime, you're ready to run your own machine learning applications!
|
||||
Learn more about how to integrate a model in OpenVINO applications by trying out the following tutorials:
|
||||
|
||||
* Try the :doc:`C++ Quick Start Example <../../../learn-openvino/openvino-samples/get-started-demos>`
|
||||
for step-by-step instructions on building and running a basic image classification C++ application.
|
||||
|
||||
.. image:: https://user-images.githubusercontent.com/36741649/127170593-86976dc3-e5e4-40be-b0a6-206379cd7df5.jpg
|
||||
:width: 400
|
||||
|
||||
* Visit the :ref:`Samples <code samples>` page for other C++ example applications to get you started with OpenVINO, such as:
|
||||
|
||||
* :doc:`Basic object detection with the Hello Reshape SSD C++ sample <../../../learn-openvino/openvino-samples/hello-reshape-ssd>`
|
||||
* :doc:`Object classification sample <../../../learn-openvino/openvino-samples/hello-classification>`
|
||||
|
||||
You can also try the following things:
|
||||
|
||||
* Learn more about :doc:`OpenVINO Workflow <../../../openvino-workflow>`.
|
||||
* To prepare your models for working with OpenVINO, see :doc:`Model Preparation <../../../openvino-workflow/model-preparation>`.
|
||||
* See pre-trained deep learning models in our :doc:`Open Model Zoo <../../../documentation/legacy-features/model-zoo>`.
|
||||
* Learn more about :doc:`Inference with OpenVINO Runtime <../../../openvino-workflow/running-inference>`.
|
||||
* See sample applications in :doc:`OpenVINO toolkit Samples Overview <../../../learn-openvino/openvino-samples>`.
|
||||
* Take a glance at the OpenVINO `product home page <https://software.intel.com/en-us/openvino-toolkit>`__ .
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -10,14 +10,14 @@ Troubleshooting Guide for OpenVINO™ Installation & Configuration
|
|||
of OpenVINO™ on your system.
|
||||
|
||||
|
||||
| This guide provides general troubleshooting steps and solutions to possible issues that
|
||||
may be encountered while installing and configuring OpenVINO™. For a comprehensive
|
||||
database of support topics on OpenVINO, go to:
|
||||
| This article provides general troubleshooting steps and solutions to possible issues that you
|
||||
may face while installing and configuring OpenVINO™. For a comprehensive database of support
|
||||
topics on OpenVINO, go to:
|
||||
| `Support for OpenVINO™ toolkit <https://www.intel.com/content/www/us/en/support/products/96066/software/development-software/openvino-toolkit.html>`__
|
||||
|
||||
|
||||
|
||||
.. dropdown:: Errors with Installing via PIP for Users in China
|
||||
.. dropdown:: PIP for Users in China gives errors
|
||||
|
||||
Users in China might encounter errors while downloading sources via PIP during OpenVINO™
|
||||
installation. To resolve the issues, try adding the download source using the ``-i``
|
||||
|
|
@ -34,16 +34,18 @@ Troubleshooting Guide for OpenVINO™ Installation & Configuration
|
|||
|
||||
pip install openvino-dev[tensorflow2] -i https://mirrors.aliyun.com/pypi/simple/
|
||||
|
||||
.. dropdown:: ImportError: cannot import name 'Core' from 'openvino'
|
||||
|
||||
.. dropdown:: Issues with Installing OpenVINO on Linux from Docker
|
||||
This error may appear on systems lacking C++ components. Since it is almost exclusively a
|
||||
Windows case, installing `Microsoft Visual C++ Redistributable [vc_redist.x64] <https://aka.ms/vs/17/release/vc_redist.x64.exe>`__
|
||||
package may fix it. For more information on dependencies, check
|
||||
:doc:`System Requirements <../about-openvino/release-notes-openvino/system-requirements>` and
|
||||
:doc:`Additional Hardware Configurations <./configurations>`
|
||||
|
||||
.. _proxy-issues:
|
||||
.. dropdown:: Proxy issues installing OpenVINO on Linux from Docker
|
||||
|
||||
Proxy Issues
|
||||
++++++++++++
|
||||
|
||||
If you meet proxy issues during the installation with Docker, you need set up proxy settings
|
||||
for Docker. See the `Docker guide <https://docs.docker.com/network/proxy/#set-proxy-using-the-cli>`__
|
||||
If you face proxy issues during installation with Docker, you may need to set up proxy
|
||||
settings for it. See the `Docker guide <https://docs.docker.com/network/proxy/#set-proxy-using-the-cli>`__
|
||||
for more details.
|
||||
|
||||
.. dropdown:: Check the version of OpenVINO Runtime
|
||||
|
|
@ -81,11 +83,11 @@ Troubleshooting Guide for OpenVINO™ Installation & Configuration
|
|||
|
||||
.. dropdown:: Check if environment variables are set correctly
|
||||
|
||||
- For Python developers, if you previously installed OpenVINO using the archive file,
|
||||
* For Python developers, if you previously installed OpenVINO using the archive file,
|
||||
and are now installing OpenVINO using PIP, remove all the PATH settings and the lines with
|
||||
``setupvars`` from ``.bashrc``. Note that if you installed OpenVINO with PIP in a virtual
|
||||
environment, you don't need to set any environment variables.
|
||||
- If you have installed OpenVINO before, you probably have added ``setupvars`` to your
|
||||
* If you have installed OpenVINO before, you probably have added ``setupvars`` to your
|
||||
``PATH /.bashrc`` or Windows environment variables. After restarting your environment,
|
||||
you should see an information similar to the following:
|
||||
|
||||
|
|
@ -93,10 +95,10 @@ Troubleshooting Guide for OpenVINO™ Installation & Configuration
|
|||
|
||||
[setupvars.sh] OpenVINO™ environment initialized
|
||||
|
||||
- If you don't see the information above, your PATH variables may be configured incorrectly.
|
||||
* If you don't see the information above, your PATH variables may be configured incorrectly.
|
||||
Check if you have typed the correct <INSTALL_DIR> or you are trying to activate in the
|
||||
correct directory.
|
||||
- If you added it to a ``.bashrc`` file, make sure that the command is correctly written and
|
||||
* If you added it to a ``.bashrc`` file, make sure that the command is correctly written and
|
||||
the file is found in the ``~/.bashrc`` folder.
|
||||
|
||||
.. dropdown:: Verify that OpenVINO is correctly installed
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ on how to run and manage the notebooks on your system.
|
|||
Additional Resources
|
||||
######################
|
||||
|
||||
* `OpenVINO™ Notebooks - Github Repository <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/README.md>`_
|
||||
* `OpenVINO™ Notebooks - Github Repository <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/README.md>`_
|
||||
* `Binder documentation <https://mybinder.readthedocs.io/en/latest/>`_
|
||||
* `Google Colab <https://colab.research.google.com/>`__
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ Installing prerequisites
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
:caption: Source: https://github.com/openvinotoolkit/openvino_notebooks/blob/main/Dockerfile
|
||||
:caption: Source: https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/Dockerfile
|
||||
|
||||
FROM quay.io/thoth-station/s2i-thoth-ubi8-py38:v0.29.0
|
||||
|
||||
|
|
@ -485,7 +485,7 @@ If you want to launch only one notebook, such as the *Monodepth* notebook, run t
|
|||
|
||||
.. code:: bash
|
||||
|
||||
jupyter lab notebooks/201-vision-monodepth/201-vision-monodepth.ipynb
|
||||
jupyter lab notebooks/vision-monodepth/vision-monodepth.ipynb
|
||||
|
||||
Launch All Notebooks
|
||||
++++++++++++++++++++
|
||||
|
|
@ -605,7 +605,7 @@ or create an
|
|||
Additional Resources
|
||||
####################
|
||||
|
||||
* `OpenVINO™ Notebooks - Github Repository <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/README.md>`_
|
||||
* `OpenVINO™ Notebooks - Github Repository <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/README.md>`_
|
||||
|
||||
|
||||
.. |launch-jupyter| image:: https://user-images.githubusercontent.com/15709723/120527271-006fd200-c38f-11eb-9935-2d36d50bab9f.gif
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Large Language Model Inference Guide
|
|||
|
||||
LLM Inference with Optimum Intel <llm_inference_guide/llm-inference-hf>
|
||||
LLM Inference with OpenVINO API <llm_inference_guide/llm-inference-native-ov>
|
||||
|
||||
OpenVINO Tokenizers <llm_inference_guide/ov-tokenizers>
|
||||
|
||||
Large Language Models (LLMs) like GPT are transformative deep learning networks capable of a
|
||||
broad range of natural language tasks, from text generation to language translation. OpenVINO
|
||||
|
|
|
|||
|
|
@ -171,15 +171,15 @@ parameters.
|
|||
|
||||
Below are some examples of using Optimum-Intel for model conversion and inference:
|
||||
|
||||
* `Instruction following using Databricks Dolly 2.0 and OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/240-dolly-2-instruction-following/240-dolly-2-instruction-following.ipynb>`__
|
||||
* `Create an LLM-powered Chatbot using OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/254-llm-chatbot/254-llm-chatbot.ipynb>`__
|
||||
* `Instruction following using Databricks Dolly 2.0 and OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/dolly-2-instruction-following/dolly-2-instruction-following.ipynb>`__
|
||||
* `Create an LLM-powered Chatbot using OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/llm-chatbot/llm-chatbot.ipynb>`__
|
||||
|
||||
.. note::
|
||||
|
||||
Optimum-Intel can be used for other generative AI models. See
|
||||
`Stable Diffusion v2.1 using Optimum-Intel OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/236-stable-diffusion-v2/236-stable-diffusion-v2-optimum-demo.ipynb>`__
|
||||
`Stable Diffusion v2.1 using Optimum-Intel OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/stable-diffusion-v2/stable-diffusion-v2-optimum-demo.ipynb>`__
|
||||
and
|
||||
`Image generation with Stable Diffusion XL and OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/248-stable-diffusion-xl/248-stable-diffusion-xl.ipynb>`__
|
||||
`Image generation with Stable Diffusion XL and OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/stable-diffusion-xl/stable-diffusion-xl.ipynb>`__
|
||||
for more examples.
|
||||
|
||||
Inference Example
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ Linux operating system (as of the current version).
|
|||
|
||||
python -m venv openvino_llm
|
||||
|
||||
``openvino_llm`` is an example name; you can choose any name for your environment.
|
||||
``openvino_llm`` is an example name; you can choose any name for your environment.
|
||||
|
||||
2. Activate the virtual environment
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,343 @@
|
|||
.. {#tokenizers}
|
||||
|
||||
OpenVINO Tokenizers
|
||||
===============================
|
||||
|
||||
Tokenization is a necessary step in text processing using various models, including text generation with LLMs.
|
||||
Tokenizers convert the input text into a sequence of tokens with corresponding IDs, so that
|
||||
the model can understand and process it during inference. The transformation of a sequence of numbers into a
|
||||
string is called detokenization.
|
||||
|
||||
.. image:: ../../_static/images/tokenization.svg
|
||||
:align: center
|
||||
|
||||
There are two important points in the tokenizer-model relation:
|
||||
|
||||
* Every model with text input is paired with a tokenizer and cannot be used without it.
|
||||
* To reproduce the model accuracy on a specific task, it is essential to use the same tokenizer employed during the model training.
|
||||
|
||||
**OpenVINO Tokenizers** is an OpenVINO extension and a Python library designed to streamline
|
||||
tokenizer conversion for seamless integration into your project. With OpenVINO Tokenizers you can:
|
||||
|
||||
* Add text processing operations to OpenVINO. Both tokenizer and detokenizer are OpenVINO models, meaning that you can work with them as with any model: read, compile, save, etc.
|
||||
|
||||
* Perform tokenization and detokenization without third-party dependencies.
|
||||
|
||||
* Convert Hugging Face tokenizers into OpenVINO tokenizer and detokenizer for efficient deployment across different environments. See the `conversion example <https://github.com/openvinotoolkit/openvino_tokenizers?tab=readme-ov-file#convert-huggingface-tokenizer>`__ for more details.
|
||||
|
||||
* Combine OpenVINO models into a single model. Recommended for specific models, like classifiers or RAG Embedders, where both tokenizer and a model are used once in each pipeline inference. For more information, see the `OpenVINO Tokenizers Notebook <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/openvino-tokenizers>`__.
|
||||
|
||||
* Add greedy decoding pipeline to text generation models.
|
||||
|
||||
* Use TensorFlow models, such as TensorFlow Text MUSE model. See the `MUSE model inference example <https://github.com/openvinotoolkit/openvino_tokenizers?tab=readme-ov-file#tensorflow-text-integration>`__ for detailed instructions. Note that TensorFlow integration requires additional conversion extensions to work with string tensor operations like StringSplit, StaticRexexpReplace, StringLower, and others.
|
||||
|
||||
.. note::
|
||||
|
||||
OpenVINO Tokenizers can be inferred **only** on a CPU device.
|
||||
|
||||
Supported Tokenizers
|
||||
#####################
|
||||
|
||||
.. list-table::
|
||||
:widths: 30 25 20 20
|
||||
:header-rows: 1
|
||||
|
||||
* - Hugging Face Tokenizer Type
|
||||
- Tokenizer Model Type
|
||||
- Tokenizer
|
||||
- Detokenizer
|
||||
* - Fast
|
||||
- WordPiece
|
||||
- Yes
|
||||
- No
|
||||
* -
|
||||
- BPE
|
||||
- Yes
|
||||
- Yes
|
||||
* -
|
||||
- Unigram
|
||||
- No
|
||||
- No
|
||||
* - Legacy
|
||||
- SentencePiece .model
|
||||
- Yes
|
||||
- Yes
|
||||
* - Custom
|
||||
- tiktoken
|
||||
- Yes
|
||||
- Yes
|
||||
* - RWKV
|
||||
- Trie
|
||||
- Yes
|
||||
- Yes
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
The outputs of the converted and the original tokenizer may differ, either decreasing or increasing
|
||||
model accuracy on a specific task. You can modify the prompt to mitigate these changes.
|
||||
In the `OpenVINO Tokenizers repository <https://github.com/openvinotoolkit/openvino_tokenizers>`__
|
||||
you can find the percentage of tests where the outputs of the original and converted tokenizer/detokenizer match.
|
||||
|
||||
Python Installation
|
||||
###################
|
||||
|
||||
|
||||
1. Create and activate a virtual environment.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
python3 -m venv venv
|
||||
|
||||
source venv/bin/activate
|
||||
|
||||
2. Install OpenVINO Tokenizers.
|
||||
|
||||
Installation options include using a converted OpenVINO tokenizer, converting a Hugging Face tokenizer
|
||||
into an OpenVINO tokenizer, installing a pre-release version to experiment with latest changes,
|
||||
or building and installing from source. You can also install OpenVINO Tokenizers with Conda distribution.
|
||||
Check `the OpenVINO Tokenizers repository <https://github.com/openvinotoolkit/openvino_tokenizers.git>`__ for more information.
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Converted OpenVINO tokenizer
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
pip install openvino-tokenizers
|
||||
|
||||
.. tab-item:: Hugging Face tokenizer
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
pip install openvino-tokenizers[transformers]
|
||||
|
||||
.. tab-item:: Pre-release version
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
pip install --pre -U openvino openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
|
||||
|
||||
.. tab-item:: Build from source
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
source path/to/installed/openvino/setupvars.sh
|
||||
|
||||
git clone https://github.com/openvinotoolkit/openvino_tokenizers.git
|
||||
|
||||
cd openvino_tokenizers
|
||||
|
||||
pip install --no-deps .
|
||||
|
||||
|
||||
C++ Installation
|
||||
################
|
||||
|
||||
You can use converted tokenizers in C++ pipelines with prebuild binaries.
|
||||
|
||||
1. Download :doc:`OpenVINO archive distribution <../../get-started/install-openvino>` for your OS and extract the archive.
|
||||
|
||||
2. Download `OpenVINO Tokenizers prebuild libraries <https://storage.openvinotoolkit.org/repositories/openvino_tokenizers/packages/>`__. To ensure compatibility, the first three numbers of the OpenVINO Tokenizers version should match the OpenVINO version and OS.
|
||||
|
||||
3. Extract OpenVINO Tokenizers archive into the OpenVINO installation directory:
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Linux_x86
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
<openvino_dir>/runtime/lib/intel64/
|
||||
|
||||
.. tab-item:: Linux_arm64
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
<openvino_dir>/runtime/lib/aarch64/
|
||||
|
||||
.. tab-item:: Windows
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
<openvino_dir>\runtime\bin\intel64\Release\
|
||||
|
||||
.. tab-item:: MacOS_x86
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
<openvino_dir>/runtime/lib/intel64/Release
|
||||
|
||||
.. tab-item:: MacOS_arm64
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
<openvino_dir>/runtime/lib/arm64/Release/
|
||||
|
||||
After that, you can add the binary extension to the code:
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Linux
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
core.add_extension("libopenvino_tokenizers.so")
|
||||
|
||||
.. tab-item:: Windows
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
core.add_extension("openvino_tokenizers.dll")
|
||||
|
||||
.. tab-item:: MacOS
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
core.add_extension("libopenvino_tokenizers.dylib")
|
||||
|
||||
|
||||
If you use the ``2023.3.0.0`` version, the binary extension file is called ``(lib)user_ov_extension.(dll/dylib/so)``.
|
||||
|
||||
You can learn how to read and compile converted models in the
|
||||
:doc:`Model Preparation <../../openvino-workflow/model-preparation>` guide.
|
||||
|
||||
Tokenizers Usage
|
||||
################
|
||||
|
||||
1. Convert a Tokenizer to OpenVINO Intermediate Representation (IR)
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
You can convert Hugging Face tokenizers to IR using either a CLI tool bundled with Tokenizers or
|
||||
Python API. Skip this step if you have a converted OpenVINO tokenizer.
|
||||
|
||||
Install dependencies:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
pip install openvino-tokenizers[transformers]
|
||||
|
||||
Convert Tokenizers:
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: CLI
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
!convert_tokenizer $model_id --with-detokenizer -o tokenizer
|
||||
|
||||
Compile the converted model to use the tokenizer:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
from pathlib import Path
|
||||
import openvino_tokenizers
|
||||
from openvino import Core
|
||||
|
||||
|
||||
tokenizer_dir = Path("tokenizer/")
|
||||
core = Core()
|
||||
ov_tokenizer = core.read_model(tokenizer_dir / "openvino_tokenizer")
|
||||
ov_detokenizer = core.read_model(tokenizer_dir / "openvino_detokenizer")
|
||||
|
||||
tokenizer, detokenizer = core.compile_model(ov_tokenizer), core.compile_model(ov_detokenizer)
|
||||
|
||||
.. tab-item:: Python API
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from transformers import AutoTokenizer
|
||||
from openvino_tokenizers import convert_tokenizer
|
||||
|
||||
hf_tokenizer = AutoTokenizer.from_pretrained(model_id)
|
||||
ov_tokenizer, ov_detokenizer = convert_tokenizer(hf_tokenizer, with_detokenizer=True)
|
||||
|
||||
Use ``save_model`` to reuse converted tokenizers later:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from pathlib import Path
|
||||
from openvino import save_model
|
||||
|
||||
tokenizer_dir = Path("tokenizer/")
|
||||
save_model(ov_tokenizer, tokenizer_dir / "openvino_tokenizer.xml")
|
||||
save_model(ov_detokenizer, tokenizer_dir / "openvino_detokenizer.xml")
|
||||
|
||||
Compile the converted model to use the tokenizer:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from openvino import compile_model
|
||||
|
||||
tokenizer, detokenizer = compile_model(ov_tokenizer), compile_model(ov_detokenizer)
|
||||
|
||||
The result is two OpenVINO models: ``ov_tokenizer`` and ``ov_detokenizer``.
|
||||
You can find more information and code snippets in the `OpenVINO Tokenizers Notebook <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/openvino-tokenizers>`__.
|
||||
|
||||
2. Tokenize and Prepare Inputs
|
||||
+++++++++++++++++++++++++++++++
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
input numpy as np
|
||||
|
||||
text_input = ["Quick brown fox jumped"]
|
||||
|
||||
model_input = {name.any_name: output for name, output in tokenizer(text_input).items()}
|
||||
|
||||
if "position_ids" in (input.any_name for input in infer_request.model_inputs):
|
||||
model_input["position_ids"] = np.arange(model_input["input_ids"].shape[1], dtype=np.int64)[np.newaxis, :]
|
||||
|
||||
# no beam search, set idx to 0
|
||||
model_input["beam_idx"] = np.array([0], dtype=np.int32)
|
||||
# end of sentence token is where the model signifies the end of text generation
|
||||
# read EOS token ID from rt_info of tokenizer/detokenizer ov.Model object
|
||||
eos_token = ov_tokenizer.get_rt_info(EOS_TOKEN_ID_NAME).value
|
||||
|
||||
3. Generate Text
|
||||
+++++++++++++++++++++++++++
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
tokens_result = np.array([[]], dtype=np.int64)
|
||||
|
||||
# reset KV cache inside the model before inference
|
||||
infer_request.reset_state()
|
||||
max_infer = 10
|
||||
|
||||
for _ in range(max_infer):
|
||||
infer_request.start_async(model_input)
|
||||
infer_request.wait()
|
||||
|
||||
# get a prediction for the last token on the first inference
|
||||
output_token = infer_request.get_output_tensor().data[:, -1:]
|
||||
tokens_result = np.hstack((tokens_result, output_token))
|
||||
if output_token[0, 0] == eos_token:
|
||||
break
|
||||
|
||||
# prepare input for new inference
|
||||
model_input["input_ids"] = output_token
|
||||
model_input["attention_mask"] = np.hstack((model_input["attention_mask"].data, [[1]]))
|
||||
model_input["position_ids"] = np.hstack(
|
||||
(model_input["position_ids"].data, [[model_input["position_ids"].data.shape[-1]]])
|
||||
)
|
||||
|
||||
4. Detokenize Output
|
||||
+++++++++++++++++++++++++++++
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
text_result = detokenizer(tokens_result)["string_output"]
|
||||
print(f"Prompt:\n{text_input[0]}")
|
||||
print(f"Generated:\n{text_result[0]}")
|
||||
|
||||
|
||||
Additional Resources
|
||||
####################
|
||||
|
||||
* `OpenVINO Tokenizers repo <https://github.com/openvinotoolkit/openvino_tokenizers>`__
|
||||
* `OpenVINO Tokenizers Notebook <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/openvino-tokenizers>`__
|
||||
* `Text generation C++ samples that support most popular models like LLaMA 2 <https://github.com/openvinotoolkit/openvino.genai/tree/master/text_generation/causal_lm/cpp>`__
|
||||
* `OpenVINO GenAI Repo <https://github.com/openvinotoolkit/openvino.genai>`__
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ If you install OpenVINO Runtime via archive files, sample applications are creat
|
|||
.. note::
|
||||
If you install OpenVINO without samples, you can still get them directly from `the OpenVINO repository <https://github.com/openvinotoolkit/openvino/>`__.
|
||||
|
||||
Before you build samples, refer to the :doc:`system requirements <../../about-openvino/system-requirements>` page and make sure that all the prerequisites have been installed. Next, you can perform the following steps:
|
||||
Before you build samples, refer to the :doc:`system requirements <../../about-openvino/release-notes-openvino/system-requirements>` page and make sure that all the prerequisites have been installed. Next, you can perform the following steps:
|
||||
|
||||
1. :ref:`Build Samples <build-samples>`.
|
||||
2. :ref:`Select a Sample <select-sample>`.
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ NNCF Quick Start Examples
|
|||
|
||||
See the following Jupyter Notebooks for step-by-step examples showing how to add model compression to a PyTorch or Tensorflow training pipeline with NNCF:
|
||||
|
||||
- `Quantization Aware Training with NNCF and PyTorch <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/302-pytorch-quantization-aware-training>`__.
|
||||
- `Quantization Aware Training with NNCF and TensorFlow <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/305-tensorflow-quantization-aware-training>`__.
|
||||
- `Quantization Aware Training with NNCF and PyTorch <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/pytorch-quantization-aware-training>`__.
|
||||
- `Quantization Aware Training with NNCF and TensorFlow <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/tensorflow-quantization-aware-training>`__.
|
||||
|
||||
Installation
|
||||
####################
|
||||
|
|
@ -111,6 +111,6 @@ Additional Resources
|
|||
- :doc:`Quantizing Models Post-training <quantizing-models-post-training>`
|
||||
- `NNCF GitHub repository <https://github.com/openvinotoolkit/nncf>`__
|
||||
- `NNCF FAQ <https://github.com/openvinotoolkit/nncf/blob/develop/docs/FAQ.md>`__
|
||||
- `Quantization Aware Training with NNCF and PyTorch <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/302-pytorch-quantization-aware-training>`__.
|
||||
- `Quantization Aware Training with NNCF and TensorFlow <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/305-tensorflow-quantization-aware-training>`__.
|
||||
- `Quantization Aware Training with NNCF and PyTorch <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/pytorch-quantization-aware-training>`__.
|
||||
- `Quantization Aware Training with NNCF and TensorFlow <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/tensorflow-quantization-aware-training>`__.
|
||||
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ required in this case. For more details, see the corresponding :doc:`documentati
|
|||
Examples
|
||||
####################
|
||||
|
||||
* `Quantizing PyTorch model with NNCF <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/302-pytorch-quantization-aware-training>`__
|
||||
* `Quantizing PyTorch model with NNCF <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/pytorch-quantization-aware-training>`__
|
||||
|
||||
* `Quantizing TensorFlow model with NNCF <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/305-tensorflow-quantization-aware-training>`__
|
||||
* `Quantizing TensorFlow model with NNCF <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/tensorflow-quantization-aware-training>`__
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
.. {#ptq_introduction}
|
||||
|
||||
Quantizing Models Post-training
|
||||
===============================
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:hidden:
|
||||
|
|
@ -12,23 +9,40 @@ Quantizing Models Post-training
|
|||
quantizing-models-post-training/quantizing-with-accuracy-control
|
||||
|
||||
|
||||
Post-training model optimization is the process of applying special methods that transform the model into a more hardware-friendly representation without retraining or fine-tuning. The most popular and widely-spread method here is 8-bit post-training quantization because it is:
|
||||
Post-training model optimization is the process of applying special methods that transform a
|
||||
model into a more hardware-friendly representation, without retraining or fine-tuning it. The
|
||||
most widely-adopted method is **8-bit post-training quantization** because it is:
|
||||
|
||||
* It is easy-to-use.
|
||||
* It does not hurt accuracy a lot.
|
||||
* It provides significant performance improvement.
|
||||
* It suites many hardware available in stock since most of them support 8-bit computation natively.
|
||||
* easy-to-use
|
||||
* does not impact accuracy much
|
||||
* provides significant performance improvement
|
||||
* fits most hardware, since 8-bit computation is widely supported
|
||||
|
||||
8-bit integer quantization lowers the precision of weights and activations to 8 bits, which leads to almost 4x reduction in the model footprint and significant improvements in inference speed, mostly due to lower throughput required for the inference. This lowering step is done offline, before the actual inference, so that the model gets transformed into the quantized representation. The process does not require a training dataset or a training pipeline in the source DL framework.
|
||||
8-bit integer quantization lowers the precision of weights and activations to 8 bits. This
|
||||
leads to almost 4x reduction in the model footprint and significant improvements in inference
|
||||
speed, mostly due to reduced throughput. The reduction is performed before the actual inference,
|
||||
when the model gets transformed into the quantized representation. The process does not require
|
||||
any training datasets or pipelines in the source DL framework.
|
||||
|
||||
.. image:: ../../_static/images/quantization_picture.svg
|
||||
|
||||
`Neural Network Compression Framework (NNCF) <https://github.com/openvinotoolkit/nncf>`__ provides a post-training quantization API available in Python that is aimed at reusing the code for model training or validation that is usually available with the model in the source framework, for example, PyTorch or TensroFlow. The NNCF API is cross-framework and currently supports models in the following frameworks: OpenVINO, PyTorch, TensorFlow 2.x, and ONNX. Currently, post-training quantization for models in OpenVINO Intermediate Representation is the most mature in terms of supported methods and models coverage.
|
||||
`Neural Network Compression Framework (NNCF) <https://github.com/openvinotoolkit/nncf>`__
|
||||
provides a post-training quantization API, available in Python, that aims at reusing the code for
|
||||
model training or validation that is usually available with the model in the source framework,
|
||||
such as PyTorch or TensroFlow. The NNCF API is cross-framework and currently supports:
|
||||
OpenVINO, PyTorch, TensorFlow 2.x, and ONNX. Post-training quantization for models in the
|
||||
:doc:`OpenVINO IR format <../../documentation/openvino-ir-format>` is the most mature in terms
|
||||
of supported methods and model coverage.
|
||||
|
||||
NNCF API has two main capabilities to apply 8-bit post-training quantization:
|
||||
The NNCF API offers two main options to apply 8-bit post-training quantization:
|
||||
|
||||
* :doc:`Basic quantization <quantizing-models-post-training/basic-quantization-flow>` - the simplest quantization flow that allows applying 8-bit integer quantization to the model. A representative calibration dataset is only needed in this case.
|
||||
* :doc:`Quantization with accuracy control <quantizing-models-post-training/quantizing-with-accuracy-control>` - the most advanced quantization flow that allows applying 8-bit quantization to the model with accuracy control. Calibration and validation datasets, and a validation function to calculate the accuracy metric are needed in this case.
|
||||
* :doc:`Basic quantization <quantizing-models-post-training/basic-quantization-flow>` -
|
||||
the simplest quantization flow that allows applying 8-bit integer quantization to the model. A
|
||||
representative calibration dataset is only needed in this case.
|
||||
* :doc:`Quantization with accuracy control <quantizing-models-post-training/quantizing-with-accuracy-control>` -
|
||||
the most advanced quantization flow that allows applying 8-bit quantization to the model with
|
||||
accuracy control. Calibration and validation datasets, and a validation function to calculate
|
||||
the accuracy metric are needed in this case.
|
||||
|
||||
Additional Resources
|
||||
####################
|
||||
|
|
|
|||
|
|
@ -70,11 +70,21 @@ where INT4 is considered as the primary precision and INT8 is the backup one.
|
|||
It usually results in a smaller model size and lower inference latency, although the accuracy
|
||||
degradation could be higher, depending on the model.
|
||||
|
||||
The code snippet below shows how to do 4-bit quantization of the model weights represented in OpenVINO IR using NNCF:
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: OpenVINO
|
||||
:sync: openvino
|
||||
|
||||
.. doxygensnippet:: docs/optimization_guide/nncf/code/weight_compression_openvino.py
|
||||
:language: python
|
||||
:fragment: [compression_4bit]
|
||||
|
||||
|
||||
The table below summarizes the benefits and trade-offs for each compression type in terms of
|
||||
memory reduction, speed gain, and accuracy loss.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
.. list-table::
|
||||
:widths: 25 20 20 20
|
||||
:header-rows: 1
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ Providing just a path to the model or model object as ``openvino.convert_model``
|
|||
import openvino as ov
|
||||
|
||||
ov_model = ov.convert_model(original_model)
|
||||
ov.save_model(ov_model, 'model.xml' compress_to_fp16=False)
|
||||
ov.save_model(ov_model, 'model.xml', compress_to_fp16=False)
|
||||
|
||||
.. tab-item:: CLI
|
||||
:sync: cli
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
.. {#openvino_docs_OV_Converter_UG_prepare_model_convert_model_Convert_Model_From_PyTorch}
|
||||
|
||||
Converting a PyTorch Model
|
||||
==========================
|
||||
|
||||
|
|
@ -28,12 +26,21 @@ Here is the simplest example of PyTorch model conversion using a model from ``to
|
|||
* ``torch.nn.Module`` derived classes
|
||||
* ``torch.jit.ScriptModule``
|
||||
* ``torch.jit.ScriptFunction``
|
||||
* ``torch.export.ExportedProgram``
|
||||
|
||||
When using ``torch.nn.Module`` as an input model, ``openvino.convert_model`` often requires the ``example_input`` parameter to be specified. Internally, it triggers the model tracing during the model conversion process, using the capabilities of the ``torch.jit.trace`` function.
|
||||
When using ``torch.nn.Module`` as an input model, ``openvino.convert_model`` often requires the
|
||||
``example_input`` parameter to be specified. Internally, it triggers the model tracing during
|
||||
the model conversion process, using the capabilities of the ``torch.jit.trace`` function.
|
||||
|
||||
The use of ``example_input`` can lead to a better quality OpenVINO model in terms of correctness and performance compared to converting the same original model without specifying ``example_input``. While the necessity of ``example_input`` depends on the implementation details of a specific PyTorch model, it is recommended to always set the ``example_input`` parameter when it is available.
|
||||
The use of ``example_input`` can lead to a better quality OpenVINO model in terms of correctness
|
||||
and performance compared to converting the same original model without specifying
|
||||
``example_input``. While the necessity of ``example_input`` depends on the implementation
|
||||
details of a specific PyTorch model, it is recommended to always set the ``example_input``
|
||||
parameter when it is available.
|
||||
|
||||
The value for the ``example_input`` parameter can be easily derived from knowing the input tensor's element type and shape. While it may not be suitable for all cases, random numbers can frequently serve this purpose effectively:
|
||||
The value for the ``example_input`` parameter can be easily derived from knowing the input
|
||||
tensor's element type and shape. While it may not be suitable for all cases, random numbers can
|
||||
frequently serve this purpose effectively:
|
||||
|
||||
.. code-block:: py
|
||||
:force:
|
||||
|
|
@ -45,7 +52,11 @@ The value for the ``example_input`` parameter can be easily derived from knowing
|
|||
model = torchvision.models.resnet50(weights='DEFAULT')
|
||||
ov_model = ov.convert_model(model, example_input=torch.rand(1, 3, 224, 224))
|
||||
|
||||
In practice, the code to evaluate or test the PyTorch model is usually provided with the model itself and can be used to generate a proper ``example_input`` value. A modified example of using ``resnet50`` model from ``torchvision`` is presented below. It demonstrates how to switch inference in the existing PyTorch application to OpenVINO and how to get value for ``example_input``:
|
||||
In practice, the code to evaluate or test the PyTorch model is usually provided with the model
|
||||
itself and can be used to generate a proper ``example_input`` value. A modified example of using
|
||||
``resnet50`` model from ``torchvision`` is presented below. It demonstrates how to switch
|
||||
inference in the existing PyTorch application to OpenVINO and how to get value for
|
||||
``example_input``:
|
||||
|
||||
.. code-block:: py
|
||||
:force:
|
||||
|
|
@ -88,7 +99,9 @@ Check out more examples in :doc:`interactive Python tutorials <../../learn-openv
|
|||
|
||||
.. note::
|
||||
|
||||
In the examples above the ``openvino.save_model`` function is not used because there are no PyTorch-specific details regarding the usage of this function. In all examples, the converted OpenVINO model can be saved to IR by calling ``ov.save_model(ov_model, 'model.xml')`` as usual.
|
||||
In the examples above the ``openvino.save_model`` function is not used because there are no
|
||||
PyTorch-specific details regarding the usage of this function. In all examples, the converted
|
||||
OpenVINO model can be saved to IR by calling ``ov.save_model(ov_model, 'model.xml')`` as usual.
|
||||
|
||||
Supported Input Parameter Types
|
||||
###############################
|
||||
|
|
@ -99,40 +112,106 @@ If the model has a single input, the following input types are supported in ``ex
|
|||
* ``torch.Tensor``
|
||||
* ``tuple`` or any nested combination of tuples
|
||||
|
||||
If a model has multiple inputs, the input values are combined in a ``list``, a ``tuple``, or a ``dict``:
|
||||
If a model has multiple inputs, the input values are combined in a ``list``, a ``tuple``, or a
|
||||
``dict``:
|
||||
|
||||
* values in a ``list`` or ``tuple`` should be passed in the same order as the original model specifies,
|
||||
* values in a ``list`` or ``tuple`` should be passed in the same order as the original model
|
||||
specifies,
|
||||
* ``dict`` has keys from the names of the original model argument names.
|
||||
|
||||
Enclosing in ``list``, ``tuple`` or ``dict`` can be used for a single input as well as for multiple inputs.
|
||||
Enclosing in ``list``, ``tuple`` or ``dict`` can be used for a single input as well as for
|
||||
multiple inputs.
|
||||
|
||||
If a model has a single input parameter and the type of this input is a ``tuple``, it should be always passed enclosed into an extra ``list``, ``tuple`` or ``dict`` as in the case of multiple inputs. It is required to eliminate ambiguity between ``model((a, b))`` and ``model(a, b)`` in this case.
|
||||
If a model has a single input parameter and the type of this input is a ``tuple``, it should be
|
||||
always passed enclosed into an extra ``list``, ``tuple`` or ``dict`` as in the case of multiple
|
||||
inputs. It is required to eliminate ambiguity between ``model((a, b))`` and ``model(a, b)`` in
|
||||
this case.
|
||||
|
||||
Non-tensor Data Types
|
||||
#####################
|
||||
|
||||
When a non-tensor data type, such as a ``tuple`` or ``dict``, appears in a model input or output, it is flattened. The flattening means that each element within the ``tuple`` will be represented as a separate input or output. The same is true for ``dict`` values, where the keys of the ``dict`` are used to form a model input/output name. The original non-tensor input or output is replaced by one or multiple new inputs or outputs resulting from this flattening process. This flattening procedure is applied recursively in the case of nested ``tuples``, ``lists``, and ``dicts`` until it reaches the assumption that the most nested data type is a tensor.
|
||||
When a non-tensor data type, such as a ``tuple`` or ``dict``, appears in a model input or output,
|
||||
it is flattened. The flattening means that each element within the ``tuple`` will be represented
|
||||
as a separate input or output. The same is true for ``dict`` values, where the keys of the
|
||||
``dict`` are used to form a model input/output name. The original non-tensor input or output is
|
||||
replaced by one or multiple new inputs or outputs resulting from this flattening process. This
|
||||
flattening procedure is applied recursively in the case of nested ``tuples``, ``lists``, and
|
||||
``dicts`` until it reaches the assumption that the most nested data type is a tensor.
|
||||
|
||||
For example, if the original model is called with ``example_input=(a, (b, c, (d, e)))``, where ``a``, ``b``, ... ``e`` are tensors, it means that the original model has two inputs. The first is a tensor ``a``, and the second is a tuple ``(b, c, (d, e))``, containing two tensors ``b`` and ``c`` and a nested tuple ``(d, e)``. Then the resulting OpenVINO model will have signature ``(a, b, c, d, e)``, which means it will have five inputs, all of type tensor, instead of two in the original model.
|
||||
For example, if the original model is called with ``example_input=(a, (b, c, (d, e)))``, where
|
||||
``a``, ``b``, ... ``e`` are tensors, it means that the original model has two inputs. The first
|
||||
is a tensor ``a``, and the second is a tuple ``(b, c, (d, e))``, containing two tensors ``b``
|
||||
and ``c`` and a nested tuple ``(d, e)``. Then the resulting OpenVINO model will have signature
|
||||
``(a, b, c, d, e)``, which means it will have five inputs, all of type tensor, instead of two in
|
||||
the original model.
|
||||
|
||||
If your model has a ``dict`` input, such as, ``{"x": a, "y": b, "z": c}``, it will be decomposed into multiple inputs of the OpenVINO model signature: ``(a, b, c)``, where inputs assume the names of ``x``, ``y``, and ``z`` respectively.
|
||||
If your model has a ``dict`` input, such as, ``{"x": a, "y": b, "z": c}``, it will be decomposed
|
||||
into multiple inputs of the OpenVINO model signature: ``(a, b, c)``, where inputs assume the
|
||||
names of ``x``, ``y``, and ``z`` respectively.
|
||||
|
||||
.. note::
|
||||
|
||||
An important consequence of flattening is that only ``tuple`` and ``dict`` with a fixed number of elements and key values are supported. The structure of such inputs should be fully described in the ``example_input`` parameter of ``convert_model``. The flattening on outputs should be reproduced with the given ``example_input`` and cannot be changed once the conversion is done.
|
||||
An important consequence of flattening is that only ``tuple`` and ``dict`` with a fixed number
|
||||
of elements and key values are supported. The structure of such inputs should be fully
|
||||
described in the ``example_input`` parameter of ``convert_model``. The flattening on outputs
|
||||
should be reproduced with the given ``example_input`` and cannot be changed once the
|
||||
conversion is done.
|
||||
|
||||
Check out more examples of model conversion with non-tensor data types in the following tutorials:
|
||||
|
||||
* `Video Subtitle Generation using Whisper and OpenVINO™ <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/227-whisper-subtitles-generation>`__
|
||||
* `Visual Question Answering and Image Captioning using BLIP and OpenVINO <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/233-blip-visual-language-processing>`__
|
||||
* `Video Subtitle Generation using Whisper and OpenVINO™
|
||||
<https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/whisper-subtitles-generation>`__
|
||||
* `Visual Question Answering and Image Captioning using BLIP and OpenVINO
|
||||
<https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/blip-visual-language-processing>`__
|
||||
|
||||
Input and output names of the model
|
||||
###################################
|
||||
|
||||
PyTorch doesn't produce relevant names for model inputs and outputs in the TorchScript
|
||||
representation. OpenVINO will assign input names based on the signature of models's ``forward``
|
||||
method or ``dict`` keys provided in the ``example_input``. Output names will be assigned if
|
||||
there is a ``dict`` at the output or when there is some internal name available in the
|
||||
TorchScript model representation. In general, the output name is not assigned and stays empty.
|
||||
It is recommended to address model outputs by the index rather then the name.
|
||||
|
||||
Support for torch.export
|
||||
########################
|
||||
|
||||
`torch.export <https://pytorch.org/docs/2.2/export.html>`__ is the current way to get a graph
|
||||
representation of a model (since PyTorch 2.1). It produces ``ExportedProgram`` which includes
|
||||
the graph representation in the FX format. To see why it has an advantage over the TorchScript
|
||||
representation, refer to `PyTorch documentation <https://pytorch.org/docs/stable/fx.html>`__.
|
||||
|
||||
Here is an example of how to convert a model obtained with ``torch.export``:
|
||||
|
||||
.. code-block:: py
|
||||
:force:
|
||||
|
||||
from torchvision.models import resnet50, ResNet50_Weights
|
||||
from torch.export import export
|
||||
from openvino import convert_model
|
||||
|
||||
model = resnet50(weights=ResNet50_Weights.DEFAULT)
|
||||
model.eval()
|
||||
exported_model = export(model, (torch.randn(1, 3, 224, 224),))
|
||||
ov_model = convert_model(exported_model)
|
||||
|
||||
.. note::
|
||||
|
||||
This is an experimental feature. Use it only if you know that you need to. PyTorch version 2.2
|
||||
is recommended. Dynamic shapes are not supported yet.
|
||||
|
||||
Exporting a PyTorch Model to ONNX Format
|
||||
########################################
|
||||
|
||||
An alternative method of converting PyTorch models is exporting a PyTorch model to ONNX with ``torch.onnx.export`` first and then converting the resulting ``.onnx`` file to OpenVINO Model with ``openvino.convert_model``. It can be considered as a backup solution if a model cannot be converted directly from PyTorch to OpenVINO as described in the above chapters. Converting through ONNX can be more expensive in terms of code, conversion time, and allocated memory.
|
||||
An alternative method of converting PyTorch models is exporting a PyTorch model to ONNX with
|
||||
``torch.onnx.export`` first and then converting the resulting ``.onnx`` file to OpenVINO Model
|
||||
with ``openvino.convert_model``. It can be considered as a backup solution if a model cannot be
|
||||
converted directly from PyTorch to OpenVINO as described in the above chapters. Converting through
|
||||
ONNX can be more expensive in terms of code, conversion time, and allocated memory.
|
||||
|
||||
1. Refer to the `Exporting PyTorch models to ONNX format <https://pytorch.org/docs/stable/onnx.html>`__ guide to learn how to export models from PyTorch to ONNX.
|
||||
1. Refer to the `Exporting PyTorch models to ONNX format <https://pytorch.org/docs/stable/onnx.html>`__
|
||||
guide to learn how to export models from PyTorch to ONNX.
|
||||
2. Follow :doc:`Convert an ONNX model <convert-model-onnx>` chapter to produce OpenVINO model.
|
||||
|
||||
Here is an illustration of using these two steps together:
|
||||
|
|
@ -152,6 +231,9 @@ Here is an illustration of using these two steps together:
|
|||
|
||||
.. note::
|
||||
|
||||
As of version 1.8.1, not all PyTorch operations can be exported to ONNX opset 9 which is used by default.
|
||||
It is recommended to export models to opset 11 or higher when export to default opset 9 is not working. In that case, use ``opset_version`` option of the ``torch.onnx.export``. For more information about ONNX opset, refer to the `Operator Schemas <https://github.com/onnx/onnx/blob/master/docs/Operators.md>`__ page.
|
||||
As of version 1.8.1, not all PyTorch operations can be exported to ONNX opset 9 which is
|
||||
used by default. It is recommended to export models to opset 11 or higher when export to
|
||||
default opset 9 is not working. In that case, use ``opset_version`` option of the
|
||||
``torch.onnx.export``. For more information about ONNX opset, refer to the
|
||||
`Operator Schemas <https://github.com/onnx/onnx/blob/master/docs/Operators.md>`__ page.
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ Here are code examples of how to use these methods with different model formats:
|
|||
* ``torch.nn.Module``
|
||||
* ``torch.jit.ScriptModule``
|
||||
* ``torch.jit.ScriptFunction``
|
||||
* ``torch.export.ExportedProgram``
|
||||
|
||||
.. code-block:: py
|
||||
:force:
|
||||
|
|
@ -60,7 +61,7 @@ Here are code examples of how to use these methods with different model formats:
|
|||
|
||||
For more details on conversion, refer to the
|
||||
:doc:`guide <convert-model-pytorch>`
|
||||
and an example `tutorial <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/102-pytorch-to-openvino/102-pytorch-onnx-to-openvino.ipynb>`__
|
||||
and an example `tutorial <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/pytorch-to-openvino/pytorch-onnx-to-openvino.ipynb>`__
|
||||
on this topic.
|
||||
|
||||
.. tab-item:: TensorFlow
|
||||
|
|
@ -104,7 +105,7 @@ Here are code examples of how to use these methods with different model formats:
|
|||
|
||||
For more details on conversion, refer to the
|
||||
:doc:`guide <convert-model-tensorflow>`
|
||||
and an example `tutorial <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/101-tensorflow-classification-to-openvino>`__
|
||||
and an example `tutorial <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/tensorflow-classification-to-openvino>`__
|
||||
on this topic.
|
||||
|
||||
* The ``read_model()`` and ``compile_model()`` methods:
|
||||
|
|
@ -210,7 +211,7 @@ Here are code examples of how to use these methods with different model formats:
|
|||
|
||||
For more details on conversion, refer to the
|
||||
:doc:`guide <convert-model-tensorflow-lite>`
|
||||
and an example `tutorial <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/119-tflite-to-openvino/119-tflite-to-openvino.ipynb>`__
|
||||
and an example `tutorial <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/tflite-to-openvino/tflite-to-openvino.ipynb>`__
|
||||
on this topic.
|
||||
|
||||
|
||||
|
|
@ -335,7 +336,7 @@ Here are code examples of how to use these methods with different model formats:
|
|||
|
||||
For more details on conversion, refer to the
|
||||
:doc:`guide <convert-model-onnx>`
|
||||
and an example `tutorial <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/102-pytorch-to-openvino/102-pytorch-onnx-to-openvino.ipynb>`__
|
||||
and an example `tutorial <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/pytorch-to-openvino/pytorch-onnx-to-openvino.ipynb>`__
|
||||
on this topic.
|
||||
|
||||
|
||||
|
|
@ -351,7 +352,7 @@ Here are code examples of how to use these methods with different model formats:
|
|||
:force:
|
||||
|
||||
import openvino as ov
|
||||
|
||||
|
||||
core = ov.Core()
|
||||
ov_model = core.read_model("<INPUT_MODEL>.onnx")
|
||||
compiled_model = ov.compile_model(ov_model, "AUTO")
|
||||
|
|
@ -463,7 +464,7 @@ Here are code examples of how to use these methods with different model formats:
|
|||
|
||||
For more details on conversion, refer to the
|
||||
:doc:`guide <convert-model-paddle>`
|
||||
and an example `tutorial <https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/103-paddle-to-openvino/103-paddle-to-openvino-classification.ipynb>`__
|
||||
and an example `tutorial <https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/paddle-to-openvino/paddle-to-openvino-classification.ipynb>`__
|
||||
on this topic.
|
||||
|
||||
* The ``read_model()`` method:
|
||||
|
|
@ -478,7 +479,7 @@ Here are code examples of how to use these methods with different model formats:
|
|||
:force:
|
||||
|
||||
import openvino as ov
|
||||
|
||||
|
||||
core = ov.Core()
|
||||
ov_model = core.read_model("<INPUT_MODEL>.pdmodel")
|
||||
compiled_model = ov.compile_model(ov_model, "AUTO")
|
||||
|
|
|
|||
|
|
@ -314,8 +314,8 @@ asynchronous inference pipeline. For information on asynchronous inference, see
|
|||
The following notebooks provide examples of how to set up an asynchronous pipeline:
|
||||
|
||||
* :doc:`Image Classification Async Sample <../../../learn-openvino/openvino-samples/image-classification-async>`
|
||||
* `Notebook - Asynchronous Inference with OpenVINO™ <./../../../notebooks/115-async-api-with-output.html>`__
|
||||
* `Notebook - Automatic Device Selection with OpenVINO <./../../../notebooks/106-auto-device-with-output.html>`__
|
||||
* `Notebook - Asynchronous Inference with OpenVINO™ <./../../../notebooks/async-api-with-output.html>`__
|
||||
* `Notebook - Automatic Device Selection with OpenVINO <./../../../notebooks/auto-device-with-output.html>`__
|
||||
|
||||
LATENCY
|
||||
--------------------
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ CPU Device
|
|||
The CPU plugin is a part of the Intel® Distribution of OpenVINO™ toolkit. It is developed to achieve high performance inference of neural networks on Intel® x86-64 and Arm® CPUs. The newer 11th generation and later Intel® CPUs provide even further performance boost, especially with INT8 models.
|
||||
For an in-depth description of CPU plugin, see:
|
||||
|
||||
- `CPU plugin developer documentation <https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/cmake_options_for_custom_compilation.md>`__.
|
||||
- `CPU plugin developer documentation <https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/intel_cpu/docs>`__.
|
||||
- `OpenVINO Runtime CPU plugin source files <https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/intel_cpu/>`__.
|
||||
|
||||
.. note::
|
||||
|
|
@ -60,6 +60,7 @@ CPU plugin supports the following data types as inference precision of internal
|
|||
|
||||
- ``f32`` (Intel® x86-64, Arm®)
|
||||
- ``bf16`` (Intel® x86-64)
|
||||
- ``f16`` (Intel® x86-64, Arm®)
|
||||
- Integer data types:
|
||||
|
||||
- ``i32`` (Intel® x86-64, Arm®)
|
||||
|
|
@ -92,21 +93,24 @@ CPU plugin supports the following floating-point data types as inference precisi
|
|||
|
||||
- ``f32`` (Intel® x86-64, Arm®)
|
||||
- ``bf16`` (Intel® x86-64)
|
||||
- ``f16`` (Intel® x86-64, Arm®)
|
||||
|
||||
The default floating-point precision of a CPU primitive is ``f32``. To support the ``f16`` OpenVINO IR the plugin internally converts
|
||||
all the ``f16`` values to ``f32`` and all the calculations are performed using the native precision of ``f32``.
|
||||
On platforms that natively support ``bfloat16`` calculations (have the ``AVX512_BF16`` or ``AMX`` extension), the ``bf16`` type is automatically used instead
|
||||
The default floating-point precision of a CPU primitive is ``f32``. To support the ``f16`` OpenVINO IR on platforms that do not natively support ``float16``, the plugin internally converts
|
||||
all the ``f16`` values to ``f32``, and all calculations are performed using the native precision of ``f32``.
|
||||
On platforms that natively support half-precision calculations (``bfloat16`` or ``float16``), the half-precision type (``bf16`` or ``f16``) is automatically used instead
|
||||
of ``f32`` to achieve better performance (see the `Execution Mode Hint <#execution-mode-hint>`__).
|
||||
Thus, no special steps are required to run a ``bf16`` model. For more details about the ``bfloat16`` format, see
|
||||
Thus, no special steps are required to run a model with ``bf16`` or ``f16`` inference precision.
|
||||
|
||||
Using the half-precision provides the following performance benefits:
|
||||
|
||||
- ``bfloat16`` and ``float16`` data types enable Intel® Advanced Matrix Extension (AMX) on 4+ generation Intel® Xeon® Scalable Processors, resulting in significantly faster computations on the corresponding hardware compared to AVX512 or AVX2 instructions in many deep learning operation implementations.
|
||||
- ``float16`` data type enables the ``armv8.2-a+fp16`` extension on ARM64 CPUs, which significantly improves performance due to the doubled vector capacity.
|
||||
- Memory footprint is reduced since most weight and activation tensors are stored in half-precision.
|
||||
|
||||
For more details about the ``bfloat16`` format, see
|
||||
the `BFLOAT16 – Hardware Numerics Definition white paper <https://software.intel.com/content/dam/develop/external/us/en/documents/bf16-hardware-numerics-definition-white-paper.pdf>`__.
|
||||
|
||||
Using the ``bf16`` precision provides the following performance benefits:
|
||||
|
||||
- ``bfloat16`` data type allows using Intel® Advanced Matrix Extension (AMX), which provides dramatically faster computations on corresponding hardware in comparison with AVX512 or AVX2 instructions in many DL operation implementations.
|
||||
- Reduced memory consumption since ``bfloat16`` data half the size of 32-bit float.
|
||||
|
||||
To check if the CPU device can support the ``bfloat16`` data type, use the :doc:`query device properties interface <query-device-properties>`
|
||||
to query ``ov::device::capabilities`` property, which should contain ``BF16`` in the list of CPU capabilities:
|
||||
To check if the CPU device can support the half-precision data type, use the :doc:`query device properties interface <query-device-properties>`
|
||||
to query ``ov::device::capabilities`` property, which should contain ``FP16`` or ``BF16`` in the list of CPU capabilities:
|
||||
|
||||
|
||||
.. tab-set::
|
||||
|
|
@ -129,7 +133,7 @@ to query ``ov::device::capabilities`` property, which should contain ``BF16`` in
|
|||
Inference Precision Hint
|
||||
-----------------------------------------------------------
|
||||
|
||||
If the model has been converted to ``bf16``, the ``ov::hint::inference_precision`` is set to ``ov::element::bf16`` and can be checked via
|
||||
If the model has been converted to half-precision (``bf16`` or ``f16``), the ``ov::hint::inference_precision`` is set to ``ov::element::f16`` or ``ov::element::bf16`` and can be checked via
|
||||
the ``ov::CompiledModel::get_property`` call. The code below demonstrates how to get the element type:
|
||||
|
||||
.. tab-set::
|
||||
|
|
@ -148,7 +152,7 @@ the ``ov::CompiledModel::get_property`` call. The code below demonstrates how to
|
|||
:language: cpp
|
||||
:fragment: [part1]
|
||||
|
||||
To infer the model in ``f32`` precision instead of ``bf16`` on targets with native ``bf16`` support, set the ``ov::hint::inference_precision`` to ``ov::element::f32``.
|
||||
To infer the model in ``f32`` precision instead of half-precision (``bf16`` or ``f16``) on targets with native half-precision support, set the ``ov::hint::inference_precision`` to ``ov::element::f32``.
|
||||
|
||||
|
||||
.. tab-set::
|
||||
|
|
@ -178,16 +182,16 @@ To enable the simulation, the ``ov::hint::inference_precision`` has to be explic
|
|||
|
||||
.. note::
|
||||
|
||||
Due to the reduced mantissa size of the ``bfloat16`` data type, the resulting ``bf16`` inference accuracy may differ from the ``f32`` inference,
|
||||
especially for models that were not trained using the ``bfloat16`` data type. If the ``bf16`` inference accuracy is not acceptable,
|
||||
Due to the reduced mantissa size of half-precision data types (``bfloat16`` or ``float16``), the resulting half-precision inference accuracy may differ from the ``f32`` inference,
|
||||
especially for models that were not trained using half-precision data types. If half-precision inference accuracy is not acceptable,
|
||||
it is recommended to switch to the ``f32`` precision. Also, the performance/accuracy balance can be managed using the ``ov::hint::execution_mode`` hint,
|
||||
see the `Execution Mode Hint <#execution-mode-hint>`__.
|
||||
|
||||
Execution Mode Hint
|
||||
-----------------------------------------------------------
|
||||
In case ``ov::hint::inference_precision`` is not explicitly set, one can use ``ov::hint::execution_mode`` hint to direct the run-time optimizations toward either better accuracy or better performance.
|
||||
If ``ov::hint::execution_mode`` is set to ``ov::hint::ExecutionMode::PERFORMANCE`` (default behavior) and the platform natively supports ``bfloat16``
|
||||
calculations (has the ``AVX512_BF16`` or ``AMX`` extension) then ``bf16`` type is automatically used instead of ``f32`` to achieve better performance.
|
||||
If ``ov::hint::execution_mode`` is set to ``ov::hint::ExecutionMode::PERFORMANCE`` (default behavior) and the platform natively supports half-precision
|
||||
calculations (``bfloat16`` or ``float16``) then ``bf16`` or ``f16`` type is automatically used instead of ``f32`` to achieve better performance.
|
||||
If the accuracy in this mode is not good enough, then set ``ov::hint::execution_mode`` to ``ov::hint::ExecutionMode::ACCURACY`` to enforce the plugin to
|
||||
use the ``f32`` precision in floating point calculations.
|
||||
|
||||
|
|
@ -237,10 +241,6 @@ For more details, see the :doc:`optimization guide <../optimize-inference>`.
|
|||
on data transfer between NUMA nodes. In that case it is better to use the ``ov::hint::PerformanceMode::LATENCY`` performance hint.
|
||||
For more details see the :doc:`performance hints <../optimize-inference/high-level-performance-hints>` overview.
|
||||
|
||||
.. note::
|
||||
|
||||
Multi-stream execution is not supported on Arm® platforms. Latency and throughput hints have identical behavior and use only one stream for inference.
|
||||
|
||||
|
||||
Dynamic Shapes
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
|
@ -363,7 +363,8 @@ Read-only properties
|
|||
- ``ov::device::capabilities``
|
||||
|
||||
.. note::
|
||||
``ov::affinity`` is replaced by ``ov::hint::enable_cpu_pinning``. As such, it is deprecated in the 2024.0 release and will be removed in the 2025 release.
|
||||
``ov::affinity`` has been replaced with ``ov::hint::enable_cpu_pinning``. As such, it is
|
||||
deprecated in the current release and will be removed in 2025.
|
||||
|
||||
External Dependencies
|
||||
###########################################################
|
||||
|
|
@ -415,7 +416,7 @@ User can use the following properties to limit available CPU resource for model
|
|||
In some use cases, OpenVINO Runtime will enable CPU threads pinning by default for better performance. User can also turn it on or off using property ``ov::hint::enable_cpu_pinning``. Disable threads pinning might be beneficial in complex applications with several workloads executed in parallel. The following table describes the default setting for ``ov::hint::enable_cpu_pinning`` in different use cases.
|
||||
|
||||
==================================================== ================================
|
||||
Use Case Default Setting of CPU Pinning
|
||||
Use Case Default Setting of CPU Pinning
|
||||
==================================================== ================================
|
||||
All use cases with Windows OS False
|
||||
Stream contains both Pcore and Ecore with Linux OS False
|
||||
|
|
|
|||
|
|
@ -13,27 +13,23 @@ Intel® Core™ Ultra generation of CPUs (formerly known as Meteor Lake). It ena
|
|||
you to offload certain neural network computation tasks from other devices,
|
||||
for more streamlined resource management.
|
||||
|
||||
Note that the NPU plugin is currently available only with the Archive distribution of OpenVINO™
|
||||
and you need to :doc:`install a proper NPU driver <../../../get-started/configurations/configurations-intel-npu>`
|
||||
to use it successfully.
|
||||
NPU Plugin is now available through all relevant OpenVINO distribution channels.
|
||||
|
||||
| **Supported Platforms:**
|
||||
| Host: Intel® Core™ Ultra (former Meteor Lake)
|
||||
| NPU device: NPU 3720
|
||||
| OS: Ubuntu* 22.04 64-bit (with Linux kernel 6.6+), MS Windows* 11 64-bit (22H2, 23H2)
|
||||
|
||||
|
||||
| **Supported Inference Data Types**
|
||||
| The NPU plugin supports the following data types as inference precision of internal primitives:
|
||||
| Floating-point data types: F32, F16O
|
||||
| Quantized data types: U8 (quantized models may be int8 or mixed FP16-INT8)
|
||||
| Computation precision for the HW is FP16.
|
||||
|
|
||||
| For more details on how to get a quantized model, refer to the
|
||||
:doc:`Model Optimization guide <../../model-optimization>` and
|
||||
:doc:`NNCF tool quantization guide <../../model-optimization-guide/quantizing-models-post-training/basic-quantization-flow>`.
|
||||
NPU Plugin needs an NPU Driver to be installed on the system for both compiling and executing a model.
|
||||
Follow the instructions below to install the latest NPU drivers:
|
||||
* Windows driver: https://www.intel.com/content/www/us/en/download/794734/intel-npu-driver-windows.html
|
||||
* Linux driver: https://github.com/intel/linux-npu-driver/releases
|
||||
|
||||
|
||||
The plugin uses the graph extension API exposed by the driver to convert the OpenVINO specific representation
|
||||
of the model into a proprietary format. The compiler included in the user mode driver (UMD) performs
|
||||
platform specific optimizations in order to efficiently schedule the execution of network layers and
|
||||
memory transactions on various NPU hardware submodules.
|
||||
|
||||
Model Caching
|
||||
#############################
|
||||
|
|
@ -78,6 +74,15 @@ instead of recompiling it.
|
|||
For more details about OpenVINO model caching, see the
|
||||
:doc:`Model Caching Overview <../optimize-inference/optimizing-latency/model-caching-overview>`.
|
||||
|
||||
| **Supported Inference Data Types**
|
||||
| The NPU plugin supports the following data types as inference precision of internal primitives:
|
||||
| Floating-point data types: F32, F16
|
||||
| Quantized data types: U8 (quantized models may be INT8 or mixed FP16-INT8)
|
||||
| Computation precision for the HW is FP16.
|
||||
|
|
||||
| For more details on how to get a quantized model, refer to the
|
||||
:doc:`Model Optimization guide <../../model-optimization>` and
|
||||
:doc:`NNCF tool quantization guide <../../model-optimization-guide/quantizing-models-post-training/basic-quantization-flow>`.
|
||||
|
||||
Supported Features and properties
|
||||
#######################################
|
||||
|
|
@ -96,30 +101,35 @@ offer a limited set of supported OpenVINO features.
|
|||
|
||||
.. code-block::
|
||||
|
||||
ov::internal::caching_properties
|
||||
ov::enable_profiling
|
||||
ov::hint::performance_mode
|
||||
ov::hint::num_requests
|
||||
ov::hint::model_priority
|
||||
ov::hint::enable_cpu_pinning
|
||||
ov::log::level
|
||||
ov::device::id
|
||||
ov::log::level
|
||||
ov::hint::enable_cpu_pinning
|
||||
ov::hint::inference_precision
|
||||
ov::hint::model_priority
|
||||
ov::hint::num_requests
|
||||
ov::hint::performance_mode
|
||||
ov::cache_dir
|
||||
ov::internal::exclusive_async_requests
|
||||
ov::compilation_num_threads
|
||||
ov::enable_profiling
|
||||
|
||||
.. tab-item:: Read-only properties
|
||||
|
||||
.. code-block::
|
||||
|
||||
ov::supported_properties
|
||||
ov::streams::num
|
||||
ov::available_devices
|
||||
ov::optimal_number_of_infer_requests
|
||||
ov::range_for_async_infer_requests
|
||||
ov::range_for_streams
|
||||
ov::available_devices
|
||||
ov::device::uuid
|
||||
ov::num_streams
|
||||
ov::device::architecture
|
||||
ov::device::capabilities
|
||||
ov::device::full_name
|
||||
ov::device::uuid
|
||||
ov::intel_npu::device_alloc_mem_size
|
||||
ov::intel_npu::device_total_mem_size
|
||||
ov::intel_npu::driver_version
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
|
|
@ -131,23 +141,19 @@ offer a limited set of supported OpenVINO features.
|
|||
Limitations
|
||||
#############################
|
||||
|
||||
* Currently, only the models with static shapes are supported on NPU.
|
||||
* If the path to the model file includes non-Unicode symbols, such as in Chinese,
|
||||
the model cannot be used for inference on NPU. It will return an error.
|
||||
* Running the Alexnet model with NPU may result in a drop in accuracy.
|
||||
At this moment, the googlenet-v4 model is recommended for classification tasks.
|
||||
* Currently, only models with static shapes are supported on NPU.
|
||||
|
||||
**Import/Export:**
|
||||
|
||||
Offline compilation and blob import is supported but only for development purposes.
|
||||
Offline compilation and blob import is supported only for development purposes.
|
||||
Pre-compiled models (blobs) are not recommended to be used in production.
|
||||
Blob compatibility across different OpenVINO versions/ NPU driver versions is not
|
||||
Blob compatibility across different OpenVINO / NPU Driver versions is not
|
||||
guaranteed.
|
||||
|
||||
Additional Resources
|
||||
#############################
|
||||
|
||||
* `Vision colorization Notebook <notebooks/222-vision-image-colorization-with-output.html>`__
|
||||
* `Vision colorization Notebook <notebooks/vision-image-colorization-with-output.html>`__
|
||||
* `Classification Benchmark C++ Demo <https://github.com/openvinotoolkit/open_model_zoo/tree/master/demos/classification_benchmark_demo/cpp>`__
|
||||
* `3D Human Pose Estimation Python Demo <https://github.com/openvinotoolkit/open_model_zoo/tree/master/demos/3d_segmentation_demo/python>`__
|
||||
* `Object Detection C++ Demo <https://github.com/openvinotoolkit/open_model_zoo/tree/master/demos/object_detection_demo/cpp>`__
|
||||
|
|
|
|||
|
|
@ -25,38 +25,102 @@ OpenVINO™ Runtime enables you to use different approaches to work with model i
|
|||
|
||||
* The ``ov::Model::inputs()`` / ``ov::Model::outputs()`` methods are used to get vectors of all input/output ports.
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.py
|
||||
:language: cpp
|
||||
:fragment: [all_inputs_ouputs]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [all_inputs_ouputs]
|
||||
|
||||
* For a model that has only one input or output, you can use the ``ov::Model::input()`` or ``ov::Model::output()`` methods without
|
||||
any arguments to get input or output port respectively.
|
||||
|
||||
* The ``ov::Model::input()`` and ``ov::Model::output()`` methods can be used with the index of inputs or outputs from the framework
|
||||
model to get specific ports by index.
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
ov_model_input = model.input(index)
|
||||
ov_model_output = model.output(index)
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
auto ov_model_input = ov_model->input(index);
|
||||
auto ov_model_output = ov_model->output(ind
|
||||
|
||||
* You can use the tensor name of input or output from the original framework model together with the
|
||||
``ov::Model::input()`` or ``ov::Model::output()`` methods to get specific ports. It means that you do not need to have any
|
||||
additional mapping of names from framework to OpenVINO as it was before. OpenVINO Runtime allows the usage of native framework
|
||||
tensor names, for example:
|
||||
|
||||
.. warning::
|
||||
|
||||
All inputs/outputs of ``ov::Model`` are numbered, so the preferred way to retrieve them is to use indices.
|
||||
|
||||
Using tensor names can potentially be a less reliable approach, since the mandatory
|
||||
presence of tensor names for inputs and outputs is not guaranteed in the original frameworks.
|
||||
Therefore ``ov::Model`` may contain empty list of ``tensor_names`` for inputs/outputs.
|
||||
|
||||
To get all tensor names which are associated with the corresponding input/output, OpenVINO
|
||||
Runtime has ``get_names`` method. To get some name from all names associated with a given input/output,
|
||||
the ``get_any_name`` method was introduced. These methods may return empty names list/empty name
|
||||
if the names are not present.
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
ov_model_input = model.input(original_fw_in_tensor_name)
|
||||
ov_model_output = model.output(original_fw_out_tensor_name)
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. code-block:: cpp
|
||||
|
||||
auto ov_model_input = ov_model->input(original_fw_in_tensor_name);
|
||||
auto ov_model_output = ov_model->output(original_fw_out_tensor_name);
|
||||
|
||||
For details on how to build a model in OpenVINO™ Runtime, see the :ref:`Build a Model in OpenVINO Runtime <ov_ug_build_model>` section.
|
||||
|
||||
OpenVINO™ Runtime model representation uses special classes to work with model data types and shapes. The ``ov::element::Type``
|
||||
is used for data types.
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.py
|
||||
:language: cpp
|
||||
:fragment: [all_inputs_ouputs]
|
||||
.. code-block:: python
|
||||
|
||||
ov_input.get_element_type()
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [all_inputs_ouputs]
|
||||
.. code-block:: cpp
|
||||
|
||||
|
||||
For details on how to build a model in OpenVINO™ Runtime, see the :ref:`Build a Model in OpenVINO Runtime <ov_ug_build_model>` section.
|
||||
|
||||
OpenVINO™ Runtime model representation uses special classes to work with model data types and shapes. The ``ov::element::Type``
|
||||
is used for data types. See the section below for representation of shapes.
|
||||
ov_input->get_element_type();
|
||||
|
||||
Representation of Shapes
|
||||
###########################
|
||||
|
|
|
|||
|
|
@ -141,5 +141,5 @@ sequences.
|
|||
|
||||
You can find more examples demonstrating how to work with states in other articles:
|
||||
|
||||
* `LLM Chatbot notebook <../../notebooks/273-stable-zephyr-3b-chatbot-with-output.html>`__
|
||||
* `LLM Chatbot notebook <../../notebooks/stable-zephyr-3b-chatbot-with-output.html>`__
|
||||
* :doc:`Serving Stateful Models with OpenVINO Model Server <../../ovms_docs_stateful_models>`
|
||||
|
|
|
|||
|
|
@ -22,52 +22,24 @@ By default, Torch code runs in eager-mode, but with the use of ``torch.compile``
|
|||
How to Use
|
||||
####################
|
||||
|
||||
To use ``torch.compile``, you need to add an import statement and define one of the two available backends:
|
||||
|
||||
| ``openvino``
|
||||
| With this backend, Torch FX subgraphs are directly converted to OpenVINO representation without any additional PyTorch based tracing/scripting.
|
||||
|
||||
| ``openvino_ts``
|
||||
| With this backend, Torch FX subgraphs are first traced/scripted with PyTorch Torchscript, and then converted to OpenVINO representation.
|
||||
To use ``torch.compile``, you need to add an import statement and define the ``openvino`` backend.
|
||||
This way Torch FX subgraphs will be directly converted to OpenVINO representation without
|
||||
any additional PyTorch-based tracing/scripting.
|
||||
|
||||
|
||||
.. tab-set::
|
||||
.. code-block:: sh
|
||||
|
||||
.. tab-item:: openvino
|
||||
:sync: backend-openvino
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
import openvino.torch
|
||||
...
|
||||
model = torch.compile(model, backend='openvino')
|
||||
|
||||
Execution diagram:
|
||||
|
||||
.. image:: ../_static/images/torch_compile_backend_openvino.svg
|
||||
:width: 992px
|
||||
:height: 720px
|
||||
:scale: 60%
|
||||
:align: center
|
||||
|
||||
.. tab-item:: openvino_ts
|
||||
:sync: backend-openvino-ts
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
import openvino.torch
|
||||
...
|
||||
model = torch.compile(model, backend='openvino_ts')
|
||||
|
||||
Execution diagram:
|
||||
|
||||
.. image:: ../_static/images/torch_compile_backend_openvino_ts.svg
|
||||
:width: 1088px
|
||||
:height: 720px
|
||||
:scale: 60%
|
||||
:align: center
|
||||
import openvino.torch
|
||||
...
|
||||
model = torch.compile(model, backend='openvino')
|
||||
|
||||
Execution diagram:
|
||||
|
||||
.. image:: ../_static/images/torch_compile_backend_openvino.svg
|
||||
:width: 992px
|
||||
:height: 720px
|
||||
:scale: 60%
|
||||
:align: center
|
||||
|
||||
Options
|
||||
++++++++++++++++++++
|
||||
|
|
@ -104,22 +76,6 @@ You can also set OpenVINO specific configuration options by adding them as a dic
|
|||
model = torch.compile(model, backend="openvino", options=opts)
|
||||
|
||||
|
||||
.. important::
|
||||
|
||||
The environment variables used in the previous release are still available but are not
|
||||
recommended. They will be removed fully in future releases.
|
||||
|
||||
.. dropdown:: Click to view the deprecated options.
|
||||
|
||||
* ``OPENVINO_TORCH_BACKEND_DEVICE`` - enables selecting a specific hardware device to run the application.
|
||||
By default, the OpenVINO backend for ``torch.compile`` runs PyTorch applications using the CPU. Setting
|
||||
this variable to ``GPU.0``, for example, will make the application use the integrated graphics processor instead.
|
||||
* ``OPENVINO_TORCH_MODEL_CACHING``- enables saving the optimized model files to a hard drive, after the first application run.
|
||||
This makes them available for the following application executions, reducing the first-inference latency.
|
||||
By default, this variable is set to ``False``. Setting it to ``True`` enables caching.
|
||||
* ``OPENVINO_TORCH_CACHE_DIR``- enables defining a custom directory for the model files (if ``model_caching`` is set to ``True``).
|
||||
By default, the OpenVINO IR is saved in the ``cache`` sub-directory, created in the application's root directory.
|
||||
|
||||
Windows support
|
||||
+++++++++++++++++++++
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
> **NOTE**: Since 2023.0 release, you can compile [OpenVINO Intel CPU plugin](https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/intel_cpu) on ARM platforms.
|
||||
|
||||
## Hardware Requirements
|
||||
* Raspberry Pi 2 or 3 with Raspbian Stretch OS (32 or 64-bit).
|
||||
* Raspberry Pi with Raspbian Stretch OS or Raspberry Pi OS (32 or 64-bit).
|
||||
|
||||
> **NOTE**: Despite the Raspberry Pi CPU is ARMv8, 32-bit OS detects ARMv7 CPU instruction set. The default `gcc` compiler applies ARMv6 architecture flag for compatibility with lower versions of boards. For more information, run the `gcc -Q --help=target` command and refer to the description of the `-march=` option.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
> **NOTE**: This version is pre-release software and has not undergone full release validation or qualification. No support is offered on pre-release software and APIs/behavior are subject to change. It should NOT be incorporated into any production software/solution and instead should be used only for early testing and integration while awaiting a final release version of this software.
|
||||
|
|
@ -1,8 +1,5 @@
|
|||
# OpenVINO™ Development Tools
|
||||
|
||||
<!--- The note below is intended for master branch only for pre-release purpose. Remove it for official releases. --->
|
||||
> **NOTE**: This version is pre-release software and has not undergone full release validation or qualification. No support is offered on pre-release software and APIs/behavior are subject to change. It should NOT be incorporated into any production software/solution and instead should be used only for early testing and integration while awaiting a final release version of this software.
|
||||
|
||||
> **NOTE**: OpenVINO™ Development Tools package has been deprecated and will be discontinued with 2025.0 release. To learn more, refer to the [OpenVINO Legacy Features and Components page](https://docs.openvino.ai/2024/documentation/legacy-features.html).
|
||||
|
||||
Intel® Distribution of OpenVINO™ toolkit is an open-source toolkit for optimizing and deploying AI inference. It can be used to develop applications and solutions based on deep learning tasks, such as: emulation of human vision, automatic speech recognition, natural language processing, recommendation systems, etc. It provides high-performance and rich deployment options, from edge to cloud.
|
||||
|
|
@ -121,8 +118,8 @@ For example, to install and configure the components for working with TensorFlow
|
|||
|
||||
| Component | Console Script | Description |
|
||||
|------------------|---------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [Legacy Model conversion API](https://docs.openvino.ai/nightly/openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html) | `mo` |**Model conversion API** imports, converts, and optimizes models that were trained in popular frameworks to a format usable by OpenVINO components. <br>Supported frameworks include Caffe\*, TensorFlow\*, MXNet\*, PaddlePaddle\*, and ONNX\*. | |
|
||||
| [Model Downloader and other Open Model Zoo tools](https://docs.openvino.ai/nightly/omz_tools_downloader.html)| `omz_downloader` <br> `omz_converter` <br> `omz_quantizer` <br> `omz_info_dumper`| **Model Downloader** is a tool for getting access to the collection of high-quality and extremely fast pre-trained deep learning [public](@ref omz_models_group_public) and [Intel](@ref omz_models_group_intel)-trained models. These free pre-trained models can be used to speed up the development and production deployment process without training your own models. The tool downloads model files from online sources and, if necessary, patches them to make them more usable with model conversion API. A number of additional tools are also provided to automate the process of working with downloaded models:<br> **Model Converter** is a tool for converting Open Model Zoo models that are stored in an original deep learning framework format into the OpenVINO Intermediate Representation (IR) using model conversion API. <br> **Model Quantizer** is a tool for automatic quantization of full-precision models in the IR format into low-precision versions using the Post-Training Optimization Tool. <br> **Model Information Dumper** is a helper utility for dumping information about the models to a stable, machine-readable format. |
|
||||
| [Legacy Model conversion API](https://docs.openvino.ai/2024/documentation/legacy-features/transition-legacy-conversion-api.html) | `mo` |**Model conversion API** imports, converts, and optimizes models that were trained in popular frameworks to a format usable by OpenVINO components. <br>Supported frameworks include Caffe\*, TensorFlow\*, MXNet\*, PaddlePaddle\*, and ONNX\*. | |
|
||||
| [Model Downloader and other Open Model Zoo tools](https://docs.openvino.ai/2024/documentation/legacy-features/model-zoo.html)| `omz_downloader` <br> `omz_converter` <br> `omz_quantizer` <br> `omz_info_dumper`| **Model Downloader** is a tool for getting access to the collection of high-quality and extremely fast pre-trained deep learning [public](@ref omz_models_group_public) and [Intel](@ref omz_models_group_intel)-trained models. These free pre-trained models can be used to speed up the development and production deployment process without training your own models. The tool downloads model files from online sources and, if necessary, patches them to make them more usable with model conversion API. A number of additional tools are also provided to automate the process of working with downloaded models:<br> **Model Converter** is a tool for converting Open Model Zoo models that are stored in an original deep learning framework format into the OpenVINO Intermediate Representation (IR) using model conversion API. <br> **Model Quantizer** is a tool for automatic quantization of full-precision models in the IR format into low-precision versions using the Post-Training Optimization Tool. <br> **Model Information Dumper** is a helper utility for dumping information about the models to a stable, machine-readable format. |
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
# OpenVINO™
|
||||
|
||||
<!--- The note below is intended for master branch only for pre-release purpose. Remove it for official releases. --->
|
||||
> **NOTE**: This version is pre-release software and has not undergone full release validation or qualification. No support is offered on pre-release software and APIs/behavior are subject to change. It should NOT be incorporated into any production software/solution and instead should be used only for early testing and integration while awaiting a final release version of this software.
|
||||
|
||||
Intel® Distribution of OpenVINO™ toolkit is an open-source toolkit for optimizing and deploying AI inference. It can be used to develop applications and solutions based on deep learning tasks, such as: emulation of human vision, automatic speech recognition, natural language processing, recommendation systems, etc. It provides high-performance and rich deployment options, from edge to cloud.
|
||||
|
||||
If you have already finished developing your models and converting them to the OpenVINO model format, you can install OpenVINO Runtime to deploy your applications on various devices. The [OpenVINO™](https://docs.openvino.ai/2024/openvino-workflow/running-inference.html) Python package includes a set of libraries for an easy inference integration with your products.
|
||||
|
||||
## System Requirements
|
||||
|
||||
Before you start the installation, check the supported operating systems and required Python* versions. The complete list of supported hardware is available in the [System Requirements](https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html).
|
||||
Before you start the installation, check the supported operating systems and required Python* versions. The complete list of supported hardware is available in the [System Requirements](https://docs.openvino.ai/2024/about-openvino/system-requirements.html).
|
||||
|
||||
**C++ libraries** are also required for the installation on Windows*. To install that, you can [download the Visual Studio Redistributable file (.exe)](https://aka.ms/vs/17/release/vc_redist.x64.exe).
|
||||
|
||||
|
|
|
|||
195
docs/home.rst
195
docs/home.rst
|
|
@ -1,131 +1,178 @@
|
|||
============================
|
||||
OpenVINO 2024
|
||||
OpenVINO 2024.1
|
||||
============================
|
||||
|
||||
.. meta::
|
||||
:google-site-verification: _YqumYQ98cmXUTwtzM_0WIIadtDc6r_TMYGbmGgNvrk
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/homepage_style.css">
|
||||
**OpenVINO is an open-source toolkit** for optimizing and deploying deep learning models from cloud
|
||||
to edge. It accelerates deep learning inference across various use cases, such as generative AI, video,
|
||||
audio, and language with models from popular frameworks like PyTorch, TensorFlow, ONNX, and more.
|
||||
Convert and optimize models, and deploy across a mix of Intel® hardware and environments, on-premises
|
||||
and on-device, in the browser or in the cloud.
|
||||
|
||||
Check out the `OpenVINO Cheat Sheet. <https://docs.openvino.ai/2024/_static/download/OpenVINO_Quick_Start_Guide.pdf>`__
|
||||
|
||||
|
||||
.. container::
|
||||
:name: ov-homepage-banner
|
||||
|
||||
OpenVINO 2024.0
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/homepage_style.css">
|
||||
<div class="line-block">
|
||||
<section class="splide" aria-label="Splide Banner Carousel">
|
||||
<div class="splide__track">
|
||||
<ul class="splide__list">
|
||||
<li class="splide__slide">An open-source toolkit for optimizing and deploying deep learning models.<br>Boost your AI deep-learning inference performance!</li>
|
||||
|
||||
<li class="splide__slide">Better OpenVINO integration with PyTorch!<br>Use PyTorch models directly, without converting them first.<br>
|
||||
<a href="https://docs.openvino.ai/2024/openvino-workflow/model-preparation/convert-model-pytorch.html">Learn more...</a>
|
||||
<li id="ov-homepage-slide1" id class="splide__slide">
|
||||
<p class="ov-homepage-slide-title">An open-source toolkit for optimizing and deploying deep learning models.</p>
|
||||
<p class="ov-homepage-slide-subtitle">Boost your AI deep-learning inference performance!</p>
|
||||
<a class="ov-homepage-banner-btn" href="https://docs.openvino.ai/2024/get-started.html">Learn more</a>
|
||||
</li>
|
||||
<li class="splide__slide">OpenVINO via PyTorch 2.0 torch.compile()<br>Use OpenVINO directly in PyTorch-native applications!<br>
|
||||
<a href="https://docs.openvino.ai/2024/openvino-workflow/torch-compile.html">Learn more...</a>
|
||||
<li id="ov-homepage-slide2" class="splide__slide">
|
||||
<p class="ov-homepage-slide-title">Better OpenVINO integration with PyTorch!</p>
|
||||
<p class="ov-homepage-slide-subtitle">Use PyTorch models directly, without converting them first.</p>
|
||||
<a class="ov-homepage-banner-btn" href="https://docs.openvino.ai/2024/openvino-workflow/model-preparation/convert-model-pytorch.html">Learn more</a>
|
||||
</li>
|
||||
<li class="splide__slide">Do you like Generative AI? You will love how it performs with OpenVINO!<br>
|
||||
<a href="https://docs.openvino.ai/2024/learn-openvino/interactive-tutorials-python.html">Check out our new notebooks...</a>
|
||||
</ul>
|
||||
<li id="ov-homepage-slide3" class="splide__slide">
|
||||
<p class="ov-homepage-slide-title">OpenVINO via PyTorch 2.0 torch.compile()</p>
|
||||
<p class="ov-homepage-slide-subtitle">Use OpenVINO directly in PyTorch-native applications!</p>
|
||||
<a class="ov-homepage-banner-btn" href="https://docs.openvino.ai/2024/openvino-workflow/torch-compile.html">Learn more</a>
|
||||
</li>
|
||||
<li id="ov-homepage-slide4" class="splide__slide">
|
||||
<p class="ov-homepage-slide-title">Do you like Generative AI?</p>
|
||||
<p class="ov-homepage-slide-subtitle">You will love how it performs with OpenVINO!</p>
|
||||
<a class="ov-homepage-banner-btn" href="https://docs.openvino.ai/2024/learn-openvino/interactive-tutorials-python.html">Check out our new notebooks</a>
|
||||
</li>
|
||||
<li id="ov-homepage-slide5" id class="splide__slide">
|
||||
<p class="ov-homepage-slide-title">Boost your AI deep-learning inference performance.</p>
|
||||
<p class="ov-homepage-slide-subtitle">Use Intel's open-source OpenVINO toolkit for optimizing and deploying deep learning models.</p>
|
||||
<a class="ov-homepage-banner-btn" href="https://docs.openvino.ai/2024/openvino-workflow/running-inference/integrate-openvino-with-your-application.html">Learn more</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
.. button-ref:: get-started
|
||||
:ref-type: doc
|
||||
:class: ov-homepage-banner-btn
|
||||
:color: primary
|
||||
:outline:
|
||||
|
|
||||
|
|
||||
|
||||
Get started
|
||||
.. image:: _static/images/openvino-overview-diagram.jpg
|
||||
:align: center
|
||||
:alt: openvino diagram
|
||||
|
||||
.. rst-class:: openvino-diagram
|
||||
|
||||
.. image:: _static/images/ov_homepage_diagram.png
|
||||
:align: center
|
||||
|
|
||||
|
||||
Places to Begin
|
||||
++++++++++++++++++++++++++++
|
||||
|
||||
.. grid:: 2 2 3 3
|
||||
:class-container: ov-homepage-higlight-grid
|
||||
|
||||
.. grid-item-card:: Installation
|
||||
:img-top: ./_static/images/home_begin_tile_01.png
|
||||
:class-card: homepage_begin_tile
|
||||
|
||||
This guide introduces installation and learning materials for Intel® Distribution of OpenVINO™ toolkit.
|
||||
|
||||
.. button-link:: get-started/install-openvino.html
|
||||
:color: primary
|
||||
:outline:
|
||||
|
||||
Get Started
|
||||
|
||||
.. grid-item-card:: Performance Benchmarks
|
||||
:link: about-openvino/performance-benchmarks
|
||||
:link-alt: performance benchmarks
|
||||
:link-type: doc
|
||||
:img-top: ./_static/images/home_begin_tile_02.png
|
||||
:class-card: homepage_begin_tile
|
||||
|
||||
See latest benchmark numbers for OpenVINO and OpenVINO Model Server
|
||||
See latest benchmark numbers for OpenVINO and OpenVINO Model Server.
|
||||
|
||||
.. grid-item-card:: Work with Multiple Model Formats
|
||||
:link: openvino-workflow/model-preparation
|
||||
:link-alt: Supported Model Formats
|
||||
:link-type: doc
|
||||
.. button-link:: about-openvino/performance-benchmarks.html
|
||||
:color: primary
|
||||
:outline:
|
||||
|
||||
OpenVINO supports different model formats: PyTorch, TensorFlow, TensorFlow Lite, ONNX, and PaddlePaddle.
|
||||
View data
|
||||
|
||||
.. grid-item-card:: Deploy at Scale with OpenVINO Model Server
|
||||
:link: ovms_what_is_openvino_model_server
|
||||
:link-alt: model server
|
||||
:link-type: doc
|
||||
.. grid-item-card:: Framework Compatibility
|
||||
:img-top: ./_static/images/home_begin_tile_03.png
|
||||
:class-card: homepage_begin_tile
|
||||
|
||||
Cloud-ready deployments for microservice applications
|
||||
Load models directly (for TensorFlow, ONNX, PaddlePaddle) or convert to OpenVINO format.
|
||||
|
||||
.. grid-item-card:: Optimize Models
|
||||
:link: openvino-workflow/model-optimization
|
||||
:link-alt: model optimization
|
||||
:link-type: doc
|
||||
.. button-link:: openvino-workflow/model-preparation.html
|
||||
:color: primary
|
||||
:outline:
|
||||
|
||||
Boost performance using quantization and compression with NNCF
|
||||
Load your model
|
||||
|
||||
.. grid-item-card:: Use OpenVINO with PyTorch Apps with torch.compile()
|
||||
:link: openvino-workflow/torch-compile
|
||||
:link-alt: torch.compile
|
||||
:link-type: doc
|
||||
.. grid-item-card:: Easy Deployment
|
||||
:img-top: ./_static/images/home_begin_tile_04.png
|
||||
:class-card: homepage_begin_tile
|
||||
|
||||
Optimize generation of the graph model with PyTorch 2.0 torch.compile() backend
|
||||
Get started in just a few lines of code.
|
||||
|
||||
.. grid-item-card:: Optimize and Deploy Generative AI
|
||||
:link: learn-openvino/llm_inference_guide
|
||||
:link-alt: gen ai
|
||||
:link-type: doc
|
||||
.. button-link:: openvino-workflow/running-inference.html
|
||||
:color: primary
|
||||
:outline:
|
||||
|
||||
Enhance the efficiency of Generative AI
|
||||
Run Inference
|
||||
|
||||
.. grid-item-card:: Serving at scale
|
||||
:img-top: ./_static/images/home_begin_tile_05.png
|
||||
:class-card: homepage_begin_tile
|
||||
|
||||
Cloud-ready deployments for microservice applications.
|
||||
|
||||
.. button-link:: ovms_what_is_openvino_model_server.html
|
||||
:color: primary
|
||||
:outline:
|
||||
|
||||
Try it out
|
||||
|
||||
.. grid-item-card:: Model Compression
|
||||
:img-top: ./_static/images/home_begin_tile_06.png
|
||||
:class-card: homepage_begin_tile
|
||||
|
||||
Reach for performance with post-training and training-time compression with NNCF.
|
||||
|
||||
.. button-link:: openvino-workflow/model-optimization.html
|
||||
:color: primary
|
||||
:outline:
|
||||
|
||||
Optimize now
|
||||
|
||||
|
|
||||
|
||||
Key Features
|
||||
++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
Feature Overview
|
||||
##############################
|
||||
.. grid:: 2 2 2 2
|
||||
:class-container: homepage_begin_container
|
||||
|
||||
.. grid:: 1 2 2 2
|
||||
:class-container: ov-homepage-feature-grid
|
||||
.. grid-item-card:: Model Compression
|
||||
:img-top: ./_static/images/home_key_feature_01.png
|
||||
:class-card: homepage_begin_key
|
||||
|
||||
.. grid-item-card:: Local Inference & Model Serving
|
||||
You can either link directly with OpenVINO Runtime to run inference locally or use OpenVINO Model Server to serve model inference from a separate server or within a Kubernetes environment.
|
||||
|
||||
You can either link directly with OpenVINO Runtime to run inference locally or use OpenVINO Model Server
|
||||
to serve model inference from a separate server or within Kubernetes environment
|
||||
.. grid-item-card:: Fast & Scalable Deployment
|
||||
:img-top: ./_static/images/home_key_feature_02.png
|
||||
:class-card: homepage_begin_key
|
||||
|
||||
.. grid-item-card:: Improved Application Portability
|
||||
Write an application once, deploy it anywhere, achieving maximum performance from hardware. Automatic device discovery allows for superior deployment flexibility. OpenVINO Runtime supports Linux, Windows, and MacOS and provides Python, C++, and C API. Use your preferred language and OS.
|
||||
|
||||
Write an application once, deploy it anywhere, achieving maximum performance from hardware. Automatic device
|
||||
discovery allows for superior deployment flexibility. OpenVINO Runtime supports Linux, Windows and MacOS and
|
||||
provides Python, C++ and C API. Use your preferred language and OS.
|
||||
.. grid-item-card:: Lighter Deployment
|
||||
:img-top: ./_static/images/home_key_feature_03.png
|
||||
:class-card: homepage_begin_key
|
||||
|
||||
.. grid-item-card:: Minimal External Dependencies
|
||||
|
||||
Designed with minimal external dependencies reduces the application footprint, simplifying installation and
|
||||
dependency management. Popular package managers enable application dependencies to be easily installed and
|
||||
upgraded. Custom compilation for your specific model(s) further reduces final binary size.
|
||||
Designed with minimal external dependencies reduces the application footprint, simplifying installation and dependency management. Popular package managers enable application dependencies to be easily installed and upgraded. Custom compilation for your specific model(s) further reduces the final binary size.
|
||||
|
||||
.. grid-item-card:: Enhanced App Start-Up Time
|
||||
:img-top: ./_static/images/home_key_feature_04.png
|
||||
:class-card: homepage_begin_key
|
||||
|
||||
In applications where fast start-up is required, OpenVINO significantly reduces first-inference latency by using the
|
||||
CPU for initial inference and then switching to another device once the model has been compiled and loaded to memory.
|
||||
Compiled models are cached improving start-up time even more.
|
||||
|
||||
In applications where fast start-up is required, OpenVINO significantly reduces first-inference latency by using the CPU for initial inference and then switching to another device once the model has been compiled and loaded to memory. Compiled models are cached, improving start-up time even more.
|
||||
|
||||
|
||||
.. toctree::
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ repo_directory = "notebooks"
|
|||
repo_owner = "openvinotoolkit"
|
||||
repo_name = "openvino_notebooks"
|
||||
repo_branch = "tree/main"
|
||||
artifacts_link = "http://repository.toolbox.iotg.sclab.intel.com/projects/ov-notebook/0.1.0-latest/20240312220809/dist/rst_files/"
|
||||
artifacts_link = "http://repository.toolbox.iotg.sclab.intel.com/projects/ov-notebook/0.1.0-latest/20240506220807/dist/rst_files/"
|
||||
blacklisted_extensions = ['.xml', '.bin']
|
||||
notebooks_repo = "https://github.com/openvinotoolkit/openvino_notebooks/blob/main/"
|
||||
notebooks_repo = "https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/"
|
||||
notebooks_binder = "https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath="
|
||||
notebooks_colab = "https://colab.research.google.com/github/openvinotoolkit/openvino_notebooks/blob/main/"
|
||||
notebooks_colab = "https://colab.research.google.com/github/openvinotoolkit/openvino_notebooks/blob/latest/"
|
||||
file_with_binder_notebooks = Path('../../docs/notebooks/notebooks_with_binder_buttons.txt').resolve(strict=True)
|
||||
file_with_colab_notebooks = Path('../../docs/notebooks/notebooks_with_colab_buttons.txt').resolve(strict=True)
|
||||
openvino_notebooks_ipynb_list = Path('../../docs/notebooks/all_notebooks_paths.txt').resolve(strict=True)
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ import os
|
|||
import re
|
||||
import sys
|
||||
|
||||
matching_notebooks_paths = []
|
||||
|
||||
|
||||
def fetch_binder_list(binder_list_file) -> list:
|
||||
"""Function that fetches list of notebooks with binder buttons
|
||||
|
|
@ -127,25 +125,6 @@ class NbProcessor:
|
|||
def __init__(self, nb_path: str = notebooks_path):
|
||||
self.nb_path = nb_path
|
||||
|
||||
with open(openvino_notebooks_ipynb_list, 'r+', encoding='cp437') as ipynb_file:
|
||||
openvino_notebooks_paths_list = ipynb_file.readlines()
|
||||
|
||||
for notebook_name in [
|
||||
nb for nb in os.listdir(self.nb_path) if
|
||||
verify_notebook_name(nb)
|
||||
]:
|
||||
|
||||
if not os.path.exists(openvino_notebooks_ipynb_list):
|
||||
raise FileNotFoundError("all_notebooks_paths.txt is not found")
|
||||
else:
|
||||
ipynb_list = [x for x in openvino_notebooks_paths_list if re.match("notebooks/[0-9]{3}.*\.ipynb$", x)]
|
||||
notebook_with_ext = notebook_name[:-16] + ".ipynb"
|
||||
matching_notebooks = [re.sub('[\n]', '', match) for match in ipynb_list if notebook_with_ext in match]
|
||||
|
||||
if matching_notebooks is not None:
|
||||
for n in matching_notebooks:
|
||||
matching_notebooks_paths.append(n)
|
||||
|
||||
def add_binder(self, buttons_list: list, cbuttons_list: list, template_with_colab_and_binder: str = binder_colab_template, template_without_binder: str = no_binder_template):
|
||||
"""A function working as an example of how to add Binder or Google Colab buttons to existing RST files.
|
||||
|
||||
|
|
@ -161,22 +140,30 @@ class NbProcessor:
|
|||
|
||||
"""
|
||||
|
||||
for notebook_file, nb_path in zip([
|
||||
nb for nb in os.listdir(self.nb_path) if verify_notebook_name(nb)
|
||||
], matching_notebooks_paths):
|
||||
if not os.path.exists(openvino_notebooks_ipynb_list):
|
||||
raise FileNotFoundError("all_notebooks_paths.txt is not found")
|
||||
else:
|
||||
with open(openvino_notebooks_ipynb_list, 'r+', encoding='cp437') as ipynb_file:
|
||||
openvino_notebooks_paths_list = ipynb_file.read()
|
||||
|
||||
for notebook_file in [nb for nb in os.listdir(self.nb_path) if verify_notebook_name(nb)]:
|
||||
|
||||
notebook_ipynb_ext = notebook_file[:-16] + ".ipynb"
|
||||
nb_path_match = [line for line in openvino_notebooks_paths_list.split('\n') if notebook_ipynb_ext in line]
|
||||
nb_repo_path = ''.join(nb_path_match)
|
||||
notebook_item = '-'.join(notebook_file.split('-')[:-2])
|
||||
|
||||
local_install = ".. |installation_link| raw:: html\n\n <a href='https://github.com/" + \
|
||||
repo_owner + "/" + repo_name + "#-installation-guide' target='_blank' title='Install " + \
|
||||
notebook_item + " locally'>local installation</a> \n\n"
|
||||
binder_badge = ".. raw:: html\n\n <a href='" + notebooks_binder + \
|
||||
nb_path + "' target='_blank' title='Launch " + notebook_item + \
|
||||
nb_repo_path + "' target='_blank' title='Launch " + notebook_item + \
|
||||
" in Binder'><img src='data:image/svg+xml;base64," + binder_image_base64 + "' class='notebook-badge' alt='Binder'></a>\n\n"
|
||||
colab_badge = ".. raw:: html\n\n <a href='" + notebooks_colab + \
|
||||
nb_path + "' target='_blank' title='Open " + notebook_item + \
|
||||
nb_repo_path + "' target='_blank' title='Open " + notebook_item + \
|
||||
" in Google Colab'><img src='data:image/svg+xml;base64," + colab_image_base64 + "' class='notebook-badge'alt='Google Colab'></a>\n\n"
|
||||
github_badge = ".. raw:: html\n\n <a href='" + notebooks_repo + \
|
||||
nb_path + "' target='_blank' title='View " + notebook_item + \
|
||||
nb_repo_path + "' target='_blank' title='View " + notebook_item + \
|
||||
" on Github'><img src='data:image/svg+xml;base64," + github_image_base64 + "' class='notebook-badge' alt='Github'></a><br><br>\n\n"
|
||||
|
||||
binder_data = {
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@ def verify_notebook_name(notebook_name: str) -> bool:
|
|||
"""Verification based on notebook name
|
||||
|
||||
:param notebook_name: Notebook name by default keeps convention:
|
||||
[3 digit]-name-with-dashes-with-output.rst,
|
||||
example: 001-hello-world-with-output.rst
|
||||
name-with-dashes-with-output.rst,
|
||||
example: hello-world-with-output.rst
|
||||
:type notebook_name: str
|
||||
:returns: Return if notebook meets requirements
|
||||
:rtype: bool
|
||||
|
||||
"""
|
||||
return notebook_name[:3].isdigit() and notebook_name[-4:] == ".rst"
|
||||
return notebook_name[-16:] == "-with-output.rst"
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5712bd24e962ae0e0267607554ebe1f2869c223b108876ce10e5d20fe6285126
|
||||
size 387941
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:96f0eb3a9535d57b8784be4b717dc9f280e4bf107e5b61d7cf51b36e142e4c7a
|
||||
size 249032
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:caef59a6c15a5a1d512f4dd22395b12fbd754bba264ea5f0deae323ff8edee39
|
||||
size 20550
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6a3137d9359a44fb19e1900e6b808f9e7e7ded0ba209abe8c4bd90fcf37b1c6a
|
||||
size 260045
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c7a830fedc5653fd506c656144decc048cad5a7651c8e498024f0eb0ab8c8e96
|
||||
size 305482
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:edb00cb4f0e2c42cd9e0f90939afbd6352ca40c90866821898f2c42c1fd9df64
|
||||
size 457214
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5712bd24e962ae0e0267607554ebe1f2869c223b108876ce10e5d20fe6285126
|
||||
size 387941
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:085fc2e0ffdf71311eed99aebb0c6efafffe33ab3f01ca34c44f99feba46a565
|
||||
size 465692
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fe706f0dda105330b25a3a8d1679019ef40d88c86b28a5aa2ca77449800ec939
|
||||
size 465695
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:085fc2e0ffdf71311eed99aebb0c6efafffe33ab3f01ca34c44f99feba46a565
|
||||
size 465692
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:99b8398ef76f2959d210e2d30bb44420f8d34a885a4480bc26e2af6627ba7119
|
||||
size 120883
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1381e5922057c6bc70eb4ba9a04f3164382ad01191d320c1acbc819e7261f8c1
|
||||
size 224886
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1381e5922057c6bc70eb4ba9a04f3164382ad01191d320c1acbc819e7261f8c1
|
||||
size 224886
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1381e5922057c6bc70eb4ba9a04f3164382ad01191d320c1acbc819e7261f8c1
|
||||
size 224886
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1381e5922057c6bc70eb4ba9a04f3164382ad01191d320c1acbc819e7261f8c1
|
||||
size 224886
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8ce150e30514fd5c85f9d29b953b41d9cbd0c4f58c2289513286a4aef99c3984
|
||||
size 26193
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7b1eaf56574fadd9331d380d2f057dd74775ebacdaa34fff9a1af2fe382128ab
|
||||
size 40039
|
||||
|
|
@ -1,747 +0,0 @@
|
|||
Performance tricks in OpenVINO for latency mode
|
||||
===============================================
|
||||
|
||||
The goal of this notebook is to provide a step-by-step tutorial for
|
||||
improving performance for inferencing in a latency mode. Low latency is
|
||||
especially desired in real-time applications when the results are needed
|
||||
as soon as possible after the data appears. This notebook assumes
|
||||
computer vision workflow and uses
|
||||
`YOLOv5n <https://github.com/ultralytics/yolov5>`__ model. We will
|
||||
simulate a camera application that provides frames one by one.
|
||||
|
||||
The performance tips applied in this notebook could be summarized in the
|
||||
following figure. Some of the steps below can be applied to any device
|
||||
at any stage, e.g., ``shared_memory``; some can be used only to specific
|
||||
devices, e.g., ``INFERENCE_NUM_THREADS`` to CPU. As the number of
|
||||
potential configurations is vast, we recommend looking at the steps
|
||||
below and then apply a trial-and-error approach. You can incorporate
|
||||
many hints simultaneously, like more inference threads + shared memory.
|
||||
It should give even better performance, but we recommend testing it
|
||||
anyway.
|
||||
|
||||
**NOTE**: We especially recommend trying
|
||||
``OpenVINO IR model + CPU + shared memory in latency mode`` or
|
||||
``OpenVINO IR model + CPU + shared memory + more inference threads``.
|
||||
|
||||
The quantization and pre-post-processing API are not included here as
|
||||
they change the precision (quantization) or processing graph
|
||||
(prepostprocessor). You can find examples of how to apply them to
|
||||
optimize performance on OpenVINO IR files in
|
||||
`111-detection-quantization <111-detection-quantization-with-output.html>`__ and
|
||||
`118-optimize-preprocessing <118-optimize-preprocessing-with-output.html>`__.
|
||||
|
||||
|image0|
|
||||
|
||||
**NOTE**: Many of the steps presented below will give you better
|
||||
performance. However, some of them may **not change anything** or
|
||||
even **worsen the performance** if they are strongly dependent on
|
||||
either the hardware or the model. Please run this notebook on your
|
||||
computer with your model to learn which of them makes sense in your
|
||||
case.
|
||||
|
||||
All the following tricks were run with OpenVINO 2023.0. Future
|
||||
versions of OpenVINO may include various optimizations that may
|
||||
result in different performance.
|
||||
|
||||
A similar notebook focused on the throughput mode is available
|
||||
`here <109-throughput-tricks-with-output.html>`__.
|
||||
|
||||
Table of contents:
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- `Prerequisites <#prerequisites>`__
|
||||
- `Data <#data>`__
|
||||
- `Model <#model>`__
|
||||
- `Hardware <#hardware>`__
|
||||
- `Helper functions <#helper-functions>`__
|
||||
- `Optimizations <#optimizations>`__
|
||||
|
||||
- `PyTorch model <#pytorch-model>`__
|
||||
- `ONNX model <#onnx-model>`__
|
||||
- `OpenVINO IR model <#openvino-ir-model>`__
|
||||
- `OpenVINO IR model on GPU <#openvino-ir-model-on-gpu>`__
|
||||
- `OpenVINO IR model + more inference
|
||||
threads <#openvino-ir-model--more-inference-threads>`__
|
||||
- `OpenVINO IR model in latency
|
||||
mode <#openvino-ir-model-in-latency-mode>`__
|
||||
- `OpenVINO IR model in latency mode + shared
|
||||
memory <#openvino-ir-model-in-latency-mode--shared-memory>`__
|
||||
- `Other tricks <#other-tricks>`__
|
||||
|
||||
- `Performance comparison <#performance-comparison>`__
|
||||
- `Conclusions <#conclusions>`__
|
||||
|
||||
.. |image0| image:: https://user-images.githubusercontent.com/4547501/229120774-01f4f972-424d-4280-8395-220dd432985a.png
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
%pip install -q "openvino>=2023.1.0" seaborn "ultralytics<=8.0.178" onnx --extra-index-url https://download.pytorch.org/whl/cpu
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
Note: you may need to restart the kernel to use updated packages.
|
||||
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
import os
|
||||
import time
|
||||
from pathlib import Path
|
||||
from typing import Any, List, Tuple
|
||||
|
||||
# Fetch `notebook_utils` module
|
||||
import urllib.request
|
||||
urllib.request.urlretrieve(
|
||||
url='https://raw.githubusercontent.com/openvinotoolkit/openvino_notebooks/main/notebooks/utils/notebook_utils.py',
|
||||
filename='notebook_utils.py'
|
||||
)
|
||||
import notebook_utils as utils
|
||||
|
||||
Data
|
||||
----
|
||||
|
||||
|
||||
|
||||
We will use the same image of the dog sitting on a bicycle for all
|
||||
experiments below. The image is resized and preprocessed to fulfill the
|
||||
requirements of this particular object detection model.
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
import numpy as np
|
||||
import cv2
|
||||
|
||||
IMAGE_WIDTH = 640
|
||||
IMAGE_HEIGHT = 480
|
||||
|
||||
# load image
|
||||
image = utils.load_image("https://storage.openvinotoolkit.org/repositories/openvino_notebooks/data/data/image/coco_bike.jpg")
|
||||
image = cv2.resize(image, dsize=(IMAGE_WIDTH, IMAGE_HEIGHT), interpolation=cv2.INTER_AREA)
|
||||
|
||||
# preprocess it for YOLOv5
|
||||
input_image = image / 255.0
|
||||
input_image = np.transpose(input_image, axes=(2, 0, 1))
|
||||
input_image = np.expand_dims(input_image, axis=0)
|
||||
|
||||
# show the image
|
||||
utils.show_array(image)
|
||||
|
||||
|
||||
|
||||
.. image:: 109-latency-tricks-with-output_files/109-latency-tricks-with-output_5_0.jpg
|
||||
|
||||
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
<DisplayHandle display_id=7a4c7ef25e26f28ca0d4358f0a5c8e27>
|
||||
|
||||
|
||||
|
||||
Model
|
||||
-----
|
||||
|
||||
|
||||
|
||||
We decided to go with
|
||||
`YOLOv5n <https://github.com/ultralytics/yolov5>`__, one of the
|
||||
state-of-the-art object detection models, easily available through the
|
||||
PyTorch Hub and small enough to see the difference in performance.
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
import torch
|
||||
from IPython.utils import io
|
||||
|
||||
# directory for all models
|
||||
base_model_dir = Path("model")
|
||||
|
||||
model_name = "yolov5n"
|
||||
model_path = base_model_dir / model_name
|
||||
|
||||
# load YOLOv5n from PyTorch Hub
|
||||
pytorch_model = torch.hub.load("ultralytics/yolov5", "custom", path=model_path, device="cpu", skip_validation=True)
|
||||
# don't print full model architecture
|
||||
with io.capture_output():
|
||||
pytorch_model.eval()
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
Using cache found in /opt/home/k8sworker/.cache/torch/hub/ultralytics_yolov5_master
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
YOLOv5 🚀 2023-4-21 Python-3.8.10 torch-2.1.0+cpu CPU
|
||||
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
requirements: /opt/home/k8sworker/.cache/torch/hub/requirements.txt not found, check failed.
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
Downloading https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n.pt to model/yolov5n.pt...
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
|
||||
0%| | 0.00/3.87M [00:00<?, ?B/s]
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
|
||||
8%|▊ | 304k/3.87M [00:00<00:01, 3.08MB/s]
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
|
||||
64%|██████▎ | 2.47M/3.87M [00:00<00:00, 14.6MB/s]
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
|
||||
100%|██████████| 3.87M/3.87M [00:00<00:00, 18.6MB/s]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
Fusing layers...
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
YOLOv5n summary: 213 layers, 1867405 parameters, 0 gradients
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
Adding AutoShape...
|
||||
|
||||
|
||||
Hardware
|
||||
--------
|
||||
|
||||
|
||||
|
||||
The code below lists the available hardware we will use in the
|
||||
benchmarking process.
|
||||
|
||||
**NOTE**: The hardware you have is probably completely different from
|
||||
ours. It means you can see completely different results.
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
import openvino as ov
|
||||
|
||||
# initialize OpenVINO
|
||||
core = ov.Core()
|
||||
|
||||
# print available devices
|
||||
for device in core.available_devices:
|
||||
device_name = core.get_property(device, "FULL_DEVICE_NAME")
|
||||
print(f"{device}: {device_name}")
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
CPU: Intel(R) Core(TM) i9-10920X CPU @ 3.50GHz
|
||||
|
||||
|
||||
Helper functions
|
||||
----------------
|
||||
|
||||
|
||||
|
||||
We’re defining a benchmark model function to use for all optimized
|
||||
models below. It runs inference 1000 times, averages the latency time,
|
||||
and prints two measures: seconds per image and frames per second (FPS).
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
INFER_NUMBER = 1000
|
||||
|
||||
|
||||
def benchmark_model(model: Any, input_data: np.ndarray, benchmark_name: str, device_name: str = "CPU") -> float:
|
||||
"""
|
||||
Helper function for benchmarking the model. It measures the time and prints results.
|
||||
"""
|
||||
# measure the first inference separately - it may be slower as it contains also initialization
|
||||
start = time.perf_counter()
|
||||
model(input_data)
|
||||
end = time.perf_counter()
|
||||
first_infer_time = end - start
|
||||
print(f"{benchmark_name} on {device_name}. First inference time: {first_infer_time :.4f} seconds")
|
||||
|
||||
# benchmarking
|
||||
start = time.perf_counter()
|
||||
for _ in range(INFER_NUMBER):
|
||||
model(input_data)
|
||||
end = time.perf_counter()
|
||||
|
||||
# elapsed time
|
||||
infer_time = end - start
|
||||
|
||||
# print second per image and FPS
|
||||
mean_infer_time = infer_time / INFER_NUMBER
|
||||
mean_fps = INFER_NUMBER / infer_time
|
||||
print(f"{benchmark_name} on {device_name}: {mean_infer_time :.4f} seconds per image ({mean_fps :.2f} FPS)")
|
||||
|
||||
return mean_infer_time
|
||||
|
||||
The following functions aim to post-process results and draw boxes on
|
||||
the image.
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
# https://gist.github.com/AruniRC/7b3dadd004da04c80198557db5da4bda
|
||||
classes = [
|
||||
"person", "bicycle", "car", "motorcycle", "airplane", "bus", "train", "truck", "boat", "traffic light", "fire hydrant",
|
||||
"stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow", "elephant", "bear", "zebra",
|
||||
"giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee", "skis", "snowboard", "sports ball", "kite",
|
||||
"baseball bat", "baseball glove", "skateboard", "surfboard", "tennis racket", "bottle", "wine glass", "cup", "fork",
|
||||
"knife", "spoon", "bowl", "banana", "apple", "sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut",
|
||||
"cake", "chair", "couch", "potted plant", "bed", "dining table", "toilet", "tv", "laptop", "mouse", "remote", "keyboard",
|
||||
"cell phone", "microwave", "oven", "oaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear",
|
||||
"hair drier", "toothbrush"
|
||||
]
|
||||
|
||||
# Colors for the classes above (Rainbow Color Map).
|
||||
colors = cv2.applyColorMap(
|
||||
src=np.arange(0, 255, 255 / len(classes), dtype=np.float32).astype(np.uint8),
|
||||
colormap=cv2.COLORMAP_RAINBOW,
|
||||
).squeeze()
|
||||
|
||||
|
||||
def postprocess(detections: np.ndarray) -> List[Tuple]:
|
||||
"""
|
||||
Postprocess the raw results from the model.
|
||||
"""
|
||||
# candidates - probability > 0.25
|
||||
detections = detections[detections[..., 4] > 0.25]
|
||||
|
||||
boxes = []
|
||||
labels = []
|
||||
scores = []
|
||||
for obj in detections:
|
||||
xmin, ymin, ww, hh = obj[:4]
|
||||
score = obj[4]
|
||||
label = np.argmax(obj[5:])
|
||||
# Create a box with pixels coordinates from the box with normalized coordinates [0,1].
|
||||
boxes.append(
|
||||
tuple(map(int, (xmin - ww // 2, ymin - hh // 2, ww, hh)))
|
||||
)
|
||||
labels.append(int(label))
|
||||
scores.append(float(score))
|
||||
|
||||
# Apply non-maximum suppression to get rid of many overlapping entities.
|
||||
# See https://paperswithcode.com/method/non-maximum-suppression
|
||||
# This algorithm returns indices of objects to keep.
|
||||
indices = cv2.dnn.NMSBoxes(
|
||||
bboxes=boxes, scores=scores, score_threshold=0.25, nms_threshold=0.5
|
||||
)
|
||||
|
||||
# If there are no boxes.
|
||||
if len(indices) == 0:
|
||||
return []
|
||||
|
||||
# Filter detected objects.
|
||||
return [(labels[idx], scores[idx], boxes[idx]) for idx in indices.flatten()]
|
||||
|
||||
|
||||
def draw_boxes(img: np.ndarray, boxes):
|
||||
"""
|
||||
Draw detected boxes on the image.
|
||||
"""
|
||||
for label, score, box in boxes:
|
||||
# Choose color for the label.
|
||||
color = tuple(map(int, colors[label]))
|
||||
# Draw a box.
|
||||
x2 = box[0] + box[2]
|
||||
y2 = box[1] + box[3]
|
||||
cv2.rectangle(img=img, pt1=box[:2], pt2=(x2, y2), color=color, thickness=2)
|
||||
|
||||
# Draw a label name inside the box.
|
||||
cv2.putText(
|
||||
img=img,
|
||||
text=f"{classes[label]} {score:.2f}",
|
||||
org=(box[0] + 10, box[1] + 20),
|
||||
fontFace=cv2.FONT_HERSHEY_COMPLEX,
|
||||
fontScale=img.shape[1] / 1200,
|
||||
color=color,
|
||||
thickness=1,
|
||||
lineType=cv2.LINE_AA,
|
||||
)
|
||||
|
||||
|
||||
def show_result(results: np.ndarray):
|
||||
"""
|
||||
Postprocess the raw results, draw boxes and show the image.
|
||||
"""
|
||||
output_img = image.copy()
|
||||
|
||||
detections = postprocess(results)
|
||||
draw_boxes(output_img, detections)
|
||||
|
||||
utils.show_array(output_img)
|
||||
|
||||
Optimizations
|
||||
-------------
|
||||
|
||||
|
||||
|
||||
Below, we present the performance tricks for faster inference in the
|
||||
latency mode. We release resources after every benchmarking to be sure
|
||||
the same amount of resource is available for every experiment.
|
||||
|
||||
PyTorch model
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
First, we’re benchmarking the original PyTorch model without any
|
||||
optimizations applied. We will treat it as our baseline.
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
import torch
|
||||
|
||||
with torch.no_grad():
|
||||
result = pytorch_model(torch.as_tensor(input_image)).detach().numpy()[0]
|
||||
show_result(result)
|
||||
pytorch_infer_time = benchmark_model(pytorch_model, input_data=torch.as_tensor(input_image).float(), benchmark_name="PyTorch model")
|
||||
|
||||
|
||||
|
||||
.. image:: 109-latency-tricks-with-output_files/109-latency-tricks-with-output_15_0.jpg
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
PyTorch model on CPU. First inference time: 0.0266 seconds
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
PyTorch model on CPU: 0.0216 seconds per image (46.33 FPS)
|
||||
|
||||
|
||||
ONNX model
|
||||
~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
The first optimization is exporting the PyTorch model to ONNX and
|
||||
running it in OpenVINO. It’s possible, thanks to the ONNX frontend. It
|
||||
means we don’t necessarily have to convert the model to Intermediate
|
||||
Representation (IR) to leverage the OpenVINO Runtime.
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
onnx_path = base_model_dir / Path(f"{model_name}_{IMAGE_WIDTH}_{IMAGE_HEIGHT}").with_suffix(".onnx")
|
||||
|
||||
# export PyTorch model to ONNX if it doesn't already exist
|
||||
if not onnx_path.exists():
|
||||
dummy_input = torch.randn(1, 3, IMAGE_HEIGHT, IMAGE_WIDTH)
|
||||
torch.onnx.export(pytorch_model, dummy_input, onnx_path)
|
||||
|
||||
# load and compile in OpenVINO
|
||||
onnx_model = core.read_model(onnx_path)
|
||||
onnx_model = core.compile_model(onnx_model, device_name="CPU")
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
/opt/home/k8sworker/.cache/torch/hub/ultralytics_yolov5_master/models/common.py:514: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
|
||||
y = self.model(im, augment=augment, visualize=visualize) if augment or visualize else self.model(im)
|
||||
/opt/home/k8sworker/.cache/torch/hub/ultralytics_yolov5_master/models/yolo.py:64: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
|
||||
if self.dynamic or self.grid[i].shape[2:4] != x[i].shape[2:4]:
|
||||
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
result = onnx_model(input_image)[onnx_model.output(0)][0]
|
||||
show_result(result)
|
||||
onnx_infer_time = benchmark_model(model=onnx_model, input_data=input_image, benchmark_name="ONNX model")
|
||||
|
||||
del onnx_model # release resources
|
||||
|
||||
|
||||
|
||||
.. image:: 109-latency-tricks-with-output_files/109-latency-tricks-with-output_18_0.jpg
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
ONNX model on CPU. First inference time: 0.0164 seconds
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
ONNX model on CPU: 0.0125 seconds per image (80.25 FPS)
|
||||
|
||||
|
||||
OpenVINO IR model
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
Let’s convert the ONNX model to OpenVINO Intermediate Representation
|
||||
(IR) FP16 and run it. Reducing the precision is one of the well-known
|
||||
methods for faster inference provided the hardware that supports lower
|
||||
precision, such as FP16 or even INT8. If the hardware doesn’t support
|
||||
lower precision, the model will be inferred in FP32 automatically. We
|
||||
could also use quantization (INT8), but we should experience a little
|
||||
accuracy drop. That’s why we skip that step in this notebook.
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
ov_model = ov.convert_model(onnx_path)
|
||||
# save the model on disk
|
||||
ov.save_model(ov_model, str(onnx_path.with_suffix(".xml")))
|
||||
|
||||
ov_cpu_model = core.compile_model(ov_model, device_name="CPU")
|
||||
|
||||
result = ov_cpu_model(input_image)[ov_cpu_model.output(0)][0]
|
||||
show_result(result)
|
||||
ov_cpu_infer_time = benchmark_model(model=ov_cpu_model, input_data=input_image, benchmark_name="OpenVINO model")
|
||||
|
||||
del ov_cpu_model # release resources
|
||||
|
||||
|
||||
|
||||
.. image:: 109-latency-tricks-with-output_files/109-latency-tricks-with-output_20_0.jpg
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
OpenVINO model on CPU. First inference time: 0.0163 seconds
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
OpenVINO model on CPU: 0.0123 seconds per image (81.26 FPS)
|
||||
|
||||
|
||||
OpenVINO IR model on GPU
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
Usually, a GPU device is faster than a CPU, so let’s run the above model
|
||||
on the GPU. Please note you need to have an Intel GPU and `install
|
||||
drivers <https://github.com/openvinotoolkit/openvino_notebooks/wiki/Ubuntu#1-install-python-git-and-gpu-drivers-optional>`__
|
||||
to be able to run this step. In addition, offloading to the GPU helps
|
||||
reduce CPU load and memory consumption, allowing it to be left for
|
||||
routine processes. If you cannot observe a faster inference on GPU, it
|
||||
may be because the model is too light to benefit from massive parallel
|
||||
execution.
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
ov_gpu_infer_time = 0.0
|
||||
if "GPU" in core.available_devices:
|
||||
ov_gpu_model = core.compile_model(ov_model, device_name="GPU")
|
||||
|
||||
result = ov_gpu_model(input_image)[ov_gpu_model.output(0)][0]
|
||||
show_result(result)
|
||||
ov_gpu_infer_time = benchmark_model(model=ov_gpu_model, input_data=input_image, benchmark_name="OpenVINO model", device_name="GPU")
|
||||
|
||||
del ov_gpu_model # release resources
|
||||
|
||||
OpenVINO IR model + more inference threads
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
There is a possibility to add a config for any device (CPU in this
|
||||
case). We will increase the number of threads to an equal number of our
|
||||
cores. There are `more
|
||||
options <https://docs.openvino.ai/2024/api/c_cpp_api/group__ov__runtime__cpp__prop__api.html>`__
|
||||
to be changed, so it’s worth playing with them to see what works best in
|
||||
our case. In some cases, this optimization may worsen the performance.
|
||||
If it is the case, don’t use it.
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
num_cores = os.cpu_count()
|
||||
|
||||
ov_cpu_config_model = core.compile_model(ov_model, device_name="CPU", config={"INFERENCE_NUM_THREADS": num_cores})
|
||||
|
||||
result = ov_cpu_config_model(input_image)[ov_cpu_config_model.output(0)][0]
|
||||
show_result(result)
|
||||
ov_cpu_config_infer_time = benchmark_model(model=ov_cpu_config_model, input_data=input_image, benchmark_name="OpenVINO model + more threads")
|
||||
|
||||
del ov_cpu_config_model # release resources
|
||||
|
||||
|
||||
|
||||
.. image:: 109-latency-tricks-with-output_files/109-latency-tricks-with-output_24_0.jpg
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
OpenVINO model + more threads on CPU. First inference time: 0.0151 seconds
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
OpenVINO model + more threads on CPU: 0.0124 seconds per image (80.94 FPS)
|
||||
|
||||
|
||||
OpenVINO IR model in latency mode
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
OpenVINO offers a virtual device called
|
||||
`AUTO <https://docs.openvino.ai/2024/openvino-workflow/running-inference/inference-devices-and-modes/auto-device-selection.html>`__,
|
||||
which can select the best device for us based on a performance hint.
|
||||
There are three different hints: ``LATENCY``, ``THROUGHPUT``, and
|
||||
``CUMULATIVE_THROUGHPUT``. As this notebook is focused on the latency
|
||||
mode, we will use ``LATENCY``. The above hints can be used with other
|
||||
devices as well.
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
ov_auto_model = core.compile_model(ov_model, device_name="AUTO", config={"PERFORMANCE_HINT": "LATENCY"})
|
||||
|
||||
result = ov_auto_model(input_image)[ov_auto_model.output(0)][0]
|
||||
show_result(result)
|
||||
ov_auto_infer_time = benchmark_model(model=ov_auto_model, input_data=input_image, benchmark_name="OpenVINO model", device_name="AUTO")
|
||||
|
||||
|
||||
|
||||
.. image:: 109-latency-tricks-with-output_files/109-latency-tricks-with-output_26_0.jpg
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
OpenVINO model on AUTO. First inference time: 0.0158 seconds
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
OpenVINO model on AUTO: 0.0126 seconds per image (79.53 FPS)
|
||||
|
||||
|
||||
OpenVINO IR model in latency mode + shared memory
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
OpenVINO is a C++ toolkit with Python wrappers (API). The default
|
||||
behavior in the Python API is copying the input to the additional buffer
|
||||
and then running processing in C++, which prevents many
|
||||
multiprocessing-related issues. However, it also increases time cost. We
|
||||
can create a tensor with enabled shared memory (keeping in mind we
|
||||
cannot overwrite our input), save time for copying and improve the
|
||||
performance!
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
# it must be assigned to a variable, not to be garbage collected
|
||||
c_input_image = np.ascontiguousarray(input_image, dtype=np.float32)
|
||||
input_tensor = ov.Tensor(c_input_image, shared_memory=True)
|
||||
|
||||
result = ov_auto_model(input_tensor)[ov_auto_model.output(0)][0]
|
||||
show_result(result)
|
||||
ov_auto_shared_infer_time = benchmark_model(model=ov_auto_model, input_data=input_tensor, benchmark_name="OpenVINO model + shared memory", device_name="AUTO")
|
||||
|
||||
del ov_auto_model # release resources
|
||||
|
||||
|
||||
|
||||
.. image:: 109-latency-tricks-with-output_files/109-latency-tricks-with-output_28_0.jpg
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
OpenVINO model + shared memory on AUTO. First inference time: 0.0103 seconds
|
||||
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
OpenVINO model + shared memory on AUTO: 0.0054 seconds per image (185.55 FPS)
|
||||
|
||||
|
||||
Other tricks
|
||||
~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
There are other tricks for performance improvement, such as quantization
|
||||
and pre-post-processing or dedicated to throughput mode. To get even
|
||||
more from your model, please visit
|
||||
`111-detection-quantization <111-detection-quantization-with-output.html>`__,
|
||||
`118-optimize-preprocessing <118-optimize-preprocessing>`__, and
|
||||
`109-throughput-tricks <109-throughput-tricks-with-output.html>`__.
|
||||
|
||||
Performance comparison
|
||||
----------------------
|
||||
|
||||
|
||||
|
||||
The following graphical comparison is valid for the selected model and
|
||||
hardware simultaneously. If you cannot see any improvement between some
|
||||
steps, just skip them.
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
%matplotlib inline
|
||||
|
||||
.. code:: ipython3
|
||||
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
labels = ["PyTorch model", "ONNX model", "OpenVINO IR model", "OpenVINO IR model on GPU", "OpenVINO IR model + more inference threads",
|
||||
"OpenVINO IR model in latency mode", "OpenVINO IR model in latency mode + shared memory"]
|
||||
# make them milliseconds
|
||||
times = list(map(lambda x: 1000 * x, [pytorch_infer_time, onnx_infer_time, ov_cpu_infer_time, ov_gpu_infer_time, ov_cpu_config_infer_time,
|
||||
ov_auto_infer_time, ov_auto_shared_infer_time]))
|
||||
|
||||
bar_colors = colors[::10] / 255.0
|
||||
|
||||
fig, ax = plt.subplots(figsize=(16, 8))
|
||||
ax.bar(labels, times, color=bar_colors)
|
||||
|
||||
ax.set_ylabel("Inference time [ms]")
|
||||
ax.set_title("Performance difference")
|
||||
|
||||
plt.xticks(rotation='vertical')
|
||||
plt.show()
|
||||
|
||||
|
||||
|
||||
.. image:: 109-latency-tricks-with-output_files/109-latency-tricks-with-output_31_0.png
|
||||
|
||||
|
||||
Conclusions
|
||||
-----------
|
||||
|
||||
|
||||
|
||||
We already showed the steps needed to improve the performance of an
|
||||
object detection model. Even if you experience much better performance
|
||||
after running this notebook, please note this may not be valid for every
|
||||
hardware or every model. For the most accurate results, please use
|
||||
``benchmark_app`` `command-line
|
||||
tool <https://docs.openvino.ai/2024/learn-openvino/openvino-samples/benchmark-tool.html>`__.
|
||||
Note that ``benchmark_app`` cannot measure the impact of some tricks
|
||||
above, e.g., shared memory.
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:84e4f91c248768c2ea746240e307041396099f0d52fdb89b0179fa72e353894a
|
||||
size 162715
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:84e4f91c248768c2ea746240e307041396099f0d52fdb89b0179fa72e353894a
|
||||
size 162715
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:84e4f91c248768c2ea746240e307041396099f0d52fdb89b0179fa72e353894a
|
||||
size 162715
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:84e4f91c248768c2ea746240e307041396099f0d52fdb89b0179fa72e353894a
|
||||
size 162715
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:84e4f91c248768c2ea746240e307041396099f0d52fdb89b0179fa72e353894a
|
||||
size 162715
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:84e4f91c248768c2ea746240e307041396099f0d52fdb89b0179fa72e353894a
|
||||
size 162715
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5d89934369311be59343b18178462948179f2338b011e203bd44ba12f2c5f415
|
||||
size 52981
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:41c502fdff24ada81c63ccfca7d9153ea368b1eb3330caa03afa3281c35e4484
|
||||
size 155828
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue