Skip to content

Commit 9902928

Browse files
pavel-esirWovchenailya-lavrenovas-suvorovyatarkan
authored
Generate pipeline (openvinotoolkit#334)
LLM return logits with probabilities of each token, these probabilities can be converted to tokens/words with different technics: greedy decoding, beam search decoding, random sampling, etc. This requires writing user unfriendly post-processing even for the simplest scenario of greedy decoding. In order to make live easier we we combined all decoding scenarios into a single function call, where the decoding method and parameters are specified by arguments. In this PR we provide a user friendly API for text generation inspired by `generate` method from HuggingFace transformers library. - [x] enable calling tokenizers/detokenizers from LLMPipeline - [ ] add callback for streaming mode - done partially, need to improve - [x] rewritten samples with the current approach: [causal_lm/cpp/generate_pipeline/generate_sample.cpp#L73-L83](https://github.com/pavel-esir/openvino.genai/blob/generate_pipeline/text_generation/causal_lm/cpp/generate_pipeline/generate_sample.cpp#L73-L83) - [x] Multibatch greedy decoding - [ ] Speculative decoding - [ ] Grouped Beam Search decoding: ready for batch 1, need to rebase multibatch support after merging openvinotoolkit#349 - [x] Random sampling Example 1: Greedy search generation ``` LLMPipeline pipe(model_path, device); // Will try to load config from generation_config.json. // but if not found default velues for gready search will be used GenerationConfig config = pipe.generation_config(); cout << pipe(prompt, config.max_new_tokens(20)); ``` Example 2: TextStreaming mode ``` LLMPipeline pipe(model_path, device); GenerationConfig config = pipe.generation_config(); auto text_streamer = TextStreamer{pipe}; auto text_streamer_callback = [&text_streamer](std::vector<int64_t>&& tokens, LLMPipeline& pipe){ text_streamer.put(tokens[0]); }; pipe(prompt, config.max_new_tokens(20).set_callback(text_streamer_callback)); text_streamer.end(); ``` CVS-132907 CVS-137920 --------- Co-authored-by: Wovchena <vladimir.zlobin@intel.com> Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com> Co-authored-by: Alexander Suvorov <alexander.suvorov@intel.com> Co-authored-by: Yaroslav Tarkan <yaroslav.tarkan@intel.com> Co-authored-by: Xiake Sun <xiake.sun@intel.com> Co-authored-by: wenyi5608 <93560477+wenyi5608@users.noreply.github.com> Co-authored-by: Ekaterina Aidova <ekaterina.aidova@intel.com> Co-authored-by: guozhong wang <guozhong.wang@intel.com> Co-authored-by: Chen Peter <peter.chen@intel.com>
1 parent 561cde0 commit 9902928

File tree

76 files changed

+5054
-711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+5054
-711
lines changed

.github/dependabot.yml

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
version: 2
22
updates:
3+
- package-ecosystem: "pip"
4+
directory: "./"
5+
schedule:
6+
interval: "weekly"
37
- package-ecosystem: "pip"
48
directory: "image_generation/stable_diffusion_1_5/cpp/scripts/"
59
schedule:
@@ -8,6 +12,10 @@ updates:
812
directory: "image_generation/lcm_dreamshaper_v7/cpp/scripts/"
913
schedule:
1014
interval: "weekly"
15+
- package-ecosystem: "pip"
16+
directory: "./tests/python_tests/"
17+
schedule:
18+
interval: "weekly"
1119
- package-ecosystem: "pip"
1220
directory: "text_generation/causal_lm/cpp/"
1321
schedule:

.github/workflows/causal_lm_cpp.yml

+80-86
Large diffs are not rendered by default.

.github/workflows/genai_package.yml

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: genai_package
2+
on: pull_request
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
5+
cancel-in-progress: true
6+
jobs:
7+
ubuntu_genai_package:
8+
strategy:
9+
matrix:
10+
build-type: [Release, Debug]
11+
runs-on: ubuntu-20.04
12+
env:
13+
CMAKE_BUILD_PARALLEL_LEVEL: null
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
submodules: recursive
18+
- uses: actions/setup-python@v4
19+
with:
20+
python-version: 3.8
21+
- run: mkdir ./ov/
22+
- run: curl https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc1/linux/l_openvino_toolkit_ubuntu20_2024.2.0.dev20240524_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz
23+
- run: sudo ./ov/install_dependencies/install_openvino_dependencies.sh
24+
- run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ -B ./build/
25+
- run: source ./ov/setupvars.sh && cmake --build ./build/ --config ${{ matrix.build-type }} --target package -j
26+
- run: source ./ov/setupvars.sh && cmake --install ./build/ --config ${{ matrix.build-type }} --prefix ov
27+
- run: ov/samples/cpp/build_samples.sh -i ${{ github.workspace }}/s\ pace
28+
if: ${{ 'Release' == matrix.build-type }} # build_samples enforces Release build
29+
- run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ov/samples/cpp/ -B ./samples\ build/ && cmake --build ./samples\ build/ --config ${{ matrix.build-type }} -j && cmake --install ./samples\ build/ --config ${{ matrix.build-type }} --component samples_bin --prefix s\ pace
30+
if: ${{ 'Release' != matrix.build-type }}
31+
- run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
32+
- run: source ./ov/setupvars.sh && python -m pip install --upgrade-strategy eager -r ./samples/cpp/requirements.txt
33+
- run: source ./ov/setupvars.sh && optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
34+
- run: source ./ov/setupvars.sh && timeout 50s ${{ github.workspace }}/s\ pace/samples_bin/greedy_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ ""
35+
36+
macos_genai_package:
37+
strategy:
38+
matrix:
39+
build-type: [Release, Debug]
40+
runs-on: macos-12
41+
steps:
42+
- uses: actions/checkout@v4
43+
with:
44+
submodules: recursive
45+
- uses: actions/setup-python@v4
46+
with:
47+
python-version: 3.8
48+
- run: mkdir ./ov/
49+
- run: curl https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc2/macos/m_openvino_toolkit_macos_12_6_2024.2.0.dev20240529_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz
50+
- run: brew install coreutils scons
51+
- run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ -B ./build/
52+
- run: source ./ov/setupvars.sh && cmake --build ./build/ --config ${{ matrix.build-type }} --target package -j
53+
- run: source ./ov/setupvars.sh && cmake --install ./build/ --config ${{ matrix.build-type }} --prefix ov
54+
- run: ov/samples/cpp/build_samples.sh -i ${{ github.workspace }}/s\ pace
55+
if: ${{ 'Release' == matrix.build-type }} # build_samples enforces Release build
56+
- run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
57+
if: ${{ 'Release' == matrix.build-type }}
58+
- run: source ./ov/setupvars.sh && python -m pip install --upgrade-strategy eager -r ./samples/cpp/requirements.txt
59+
if: ${{ 'Release' == matrix.build-type }}
60+
- run: source ./ov/setupvars.sh && optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
61+
if: ${{ 'Release' == matrix.build-type }}
62+
- run: source ./ov/setupvars.sh && timeout 50s ${{ github.workspace }}/s\ pace/samples_bin/greedy_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ ""
63+
if: ${{ 'Release' == matrix.build-type }}
64+
65+
windows_genai_package:
66+
strategy:
67+
matrix:
68+
build-type: [Release, Debug]
69+
runs-on: windows-latest
70+
env:
71+
CMAKE_BUILD_PARALLEL_LEVEL: null
72+
defaults:
73+
run:
74+
shell: cmd
75+
steps:
76+
- uses: actions/checkout@v4
77+
with:
78+
submodules: recursive
79+
- uses: actions/setup-python@v4
80+
with:
81+
python-version: 3.8
82+
- run: curl --output ov.zip https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc1/windows/w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64.zip
83+
- run: unzip ov.zip
84+
# Shorten the next setupvars calls.
85+
- run: mklink /D ov w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64
86+
- run: call ov\setupvars.bat && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ -B ./build/
87+
- run: call ov\setupvars.bat && cmake --build ./build/ --config ${{ matrix.build-type }} --target package -j
88+
- run: call ov\setupvars.bat && cmake --install ./build/ --config ${{ matrix.build-type }} --prefix ov
89+
- run: call ov\samples\cpp\build_samples_msvc.bat -i "${{ github.workspace }}/samples_install"
90+
if: ${{ false && 'Release' == matrix.build-type }} # build_samples enforces Release build
91+
- run: call ov\setupvars.bat && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
92+
if: ${{ false && 'Release' == matrix.build-type }}
93+
- run: call ov\setupvars.bat && python -m pip install --upgrade-strategy eager -r ./samples/cpp/requirements.txt
94+
if: ${{ false && 'Release' == matrix.build-type }}
95+
- run: call ov\setupvars.bat && optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
96+
if: ${{ false && 'Release' == matrix.build-type }}
97+
- run: call ov\setupvars.bat && "${{ github.workspace }}/samples_install/samples_bin/greedy_causal_lm" .\TinyLlama-1.1B-Chat-v1.0\ ""
98+
if: ${{ false && 'Release' == matrix.build-type }}
+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: genai_python_lib
2+
on: pull_request
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
5+
cancel-in-progress: true
6+
jobs:
7+
ubuntu_genai_python_lib:
8+
# A tokenizers' dependency fails to compile on ubuntu-20 n CenOS7 env.
9+
runs-on: ubuntu-22.04
10+
env:
11+
# A tokenizers' dependency fails to compile with Ninja in CenOS7 env.
12+
CMAKE_GENERATOR: Unix Makefiles
13+
CMAKE_BUILD_PARALLEL_LEVEL: null
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
submodules: recursive
18+
- uses: actions/setup-python@v4
19+
with:
20+
python-version: 3.8
21+
- run: mkdir ./ov/
22+
# Install CentOS7 instead of Ubuntu to match PyPI distribution ABI.
23+
- run: curl https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc1/linux/l_openvino_toolkit_centos7_2024.2.0.dev20240524_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz
24+
- run: sudo ./ov/install_dependencies/install_openvino_dependencies.sh
25+
- run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
26+
- run: source ./ov/setupvars.sh && cmake --build ./build/ --config Release -j
27+
# GitHub Actions already provides what is listed in ./requirements-build.txt but the internal
28+
# build system doesn't. Install ./requirements-build.txt to detect possible conflicts.
29+
- run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt -r ./tests/python_tests/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release --upgrade-strategy eager
30+
- run: source ./ov/setupvars.sh && PYTHONPATH=./build/:$PYTHONPATH python -m pytest ./tests/python_tests/test_generate_api.py -m precommit
31+
- run: source ./ov/setupvars.sh && python -m pip install . --config-settings=build-dir="build" --verbose
32+
- run: python -m pytest ./tests/python_tests/test_generate_api.py -m precommit
33+
34+
macos_genai_python_lib:
35+
runs-on: macos-12
36+
env:
37+
# A tokenizers' dependency fails to compile with Ninja.
38+
CMAKE_GENERATOR: Unix Makefiles
39+
CMAKE_BUILD_PARALLEL_LEVEL: null
40+
steps:
41+
- uses: actions/checkout@v4
42+
with:
43+
submodules: recursive
44+
- uses: actions/setup-python@v4
45+
with:
46+
python-version: 3.8
47+
- run: mkdir ./ov/
48+
- run: curl https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc2/macos/m_openvino_toolkit_macos_12_6_2024.2.0.dev20240529_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz
49+
- run: brew install coreutils scons
50+
- run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
51+
- run: source ./ov/setupvars.sh && cmake --build ./build/ --config Release -j
52+
# GitHub Actions already provides what is listed in ./requirements-build.txt but the internal
53+
# build system doesn't. Install ./requirements-build.txt to detect possible conflicts.
54+
- run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt -r ./tests/python_tests/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release --upgrade-strategy eager
55+
- run: source ./ov/setupvars.sh && PYTHONPATH=./build/:$PYTHONPATH python -m pytest ./tests/python_tests/test_generate_api.py -m precommit
56+
- run: source ./ov/setupvars.sh && python -m pip install . --config-settings=build-dir="build" --verbose
57+
- run: python -c "from openvino_genai import LLMPipeline"
58+
- run: python -m pytest ./tests/python_tests/test_generate_api.py -m precommit
59+
60+
windows_genai_python_lib:
61+
if: false
62+
runs-on: windows-latest
63+
env:
64+
CMAKE_BUILD_PARALLEL_LEVEL: null
65+
defaults:
66+
run:
67+
shell: cmd
68+
steps:
69+
- uses: actions/checkout@v4
70+
with:
71+
submodules: recursive
72+
- uses: actions/setup-python@v4
73+
with:
74+
python-version: 3.8
75+
- run: curl --output ov.zip https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc1/windows/w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64.zip
76+
- run: unzip ov.zip
77+
# Shorten the next setupvars calls.
78+
- run: mklink /D ov w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64
79+
- run: call ./ov/setupvars.bat && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
80+
- run: call ./ov/setupvars.bat && cmake --build ./build/ --config Release -j
81+
- run: call ./ov/setupvars.bat && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt -r ./tests/python_tests/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release --upgrade-strategy eager
82+
# cmd evaluates variables in a different way. Setting PYTHONPATH before setupvars.bat instead of doing that after solves that.
83+
- run: set "PYTHONPATH=./build/" && call ./ov/setupvars.bat && python -m pytest ./tests/python_tests/test_generate_api.py -m precommit
84+
- run: call ./ov/setupvars.bat && python -m pip install . --config-settings=build-dir="build" --verbose
85+
- run: python -m pytest ./tests/python_tests/test_generate_api.py -m precommit

.github/workflows/lcm_dreamshaper_cpp.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ jobs:
4040
run: |
4141
conda activate openvino_lcm_cpp
4242
conda update -c conda-forge --all
43-
conda install -c conda-forge openvino=2024.1.0 c-compiler cxx-compiler git make cmake
43+
conda install -c conda-forge -c conda-forge/label/openvino_dev openvino==2024.2.0.dev20240513 c-compiler cxx-compiler git make cmake
4444
conda env config vars set LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
4545
4646
- name: Install python dependencies
4747
working-directory: ${{ env.working_directory }}
4848
run: |
4949
conda activate openvino_lcm_cpp
50-
python -m pip install -r requirements.txt
5150
python -m pip install ../../../thirdparty/openvino_tokenizers/[transformers]
51+
python -m pip install -r requirements.txt
5252
5353
- name: Download and convert model and tokenizer
5454
working-directory: ${{ env.working_directory }}
@@ -85,15 +85,15 @@ jobs:
8585
run: |
8686
conda activate openvino_lcm_cpp
8787
conda update -c conda-forge --all
88-
conda install -c conda-forge openvino=2024.1.0 c-compiler cxx-compiler git make cmake
88+
conda install -c conda-forge -c conda-forge/label/openvino_dev openvino==2024.2.0.dev20240513 c-compiler cxx-compiler git make cmake
8989
conda env config vars set LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
9090
9191
- name: Install python dependencies
9292
working-directory: ${{ env.working_directory }}
9393
run: |
9494
conda activate openvino_lcm_cpp
95-
python -m pip install -r requirements.txt
9695
python -m pip install ../../../thirdparty/openvino_tokenizers/[transformers]
96+
python -m pip install -r requirements.txt
9797
9898
- name: Download and convert model and tokenizer
9999
working-directory: ${{ env.working_directory }}

.github/workflows/stable_diffusion_1_5_cpp.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ jobs:
3939
- name: Install OpenVINO and other conda dependencies
4040
run: |
4141
conda activate openvino_sd_cpp
42-
conda install -c conda-forge openvino=2024.1.0 c-compiler cxx-compiler git make cmake
42+
conda install -c conda-forge -c conda-forge/label/openvino_dev openvino==2024.2.0.dev20240513 c-compiler cxx-compiler git make cmake
4343
conda env config vars set LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
4444
4545
- name: Install python dependencies
4646
working-directory: ${{ env.working_directory }}
4747
run: |
4848
conda activate openvino_sd_cpp
49-
python -m pip install -r requirements.txt
5049
python -m pip install ../../../thirdparty/openvino_tokenizers/[transformers]
50+
python -m pip install -r requirements.txt
5151
5252
- name: Download and convert model and tokenizer
5353
working-directory: ${{ env.working_directory }}
@@ -83,14 +83,14 @@ jobs:
8383
- name: Install OpenVINO and other conda dependencies
8484
run: |
8585
conda activate openvino_sd_cpp
86-
conda install -c conda-forge openvino=2024.1.0 c-compiler cxx-compiler git make cmake
86+
conda install -c conda-forge -c conda-forge/label/openvino_dev openvino==2024.2.0.dev20240513 c-compiler cxx-compiler git make cmake
8787
8888
- name: Install python dependencies
8989
working-directory: ${{ env.working_directory }}
9090
run: |
9191
conda activate openvino_sd_cpp
92-
python -m pip install -r requirements.txt
9392
python -m pip install ../../../thirdparty/openvino_tokenizers/[transformers]
93+
python -m pip install -r requirements.txt
9494
9595
- name: Download and convert model and tokenizer
9696
working-directory: ${{ env.working_directory }}

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ CMakeUserPresets.json
3838
# Python-specific
3939
*.?env*
4040
*.pyc
41-
__pycache__
41+
__pycache__

CMakeLists.txt

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copyright (C) 2018-2024 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
5+
cmake_minimum_required(VERSION 3.23.0) # The requirement comes from Jinja2Cpp
6+
7+
# Multi config generators such as Visual Studio ignore CMAKE_BUILD_TYPE. Multi config generators are configured with
8+
# CMAKE_CONFIGURATION_TYPES, but limiting options in it completely removes such build options
9+
get_property(GENERATOR_IS_MULTI_CONFIG_VAR GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
10+
if(CMAKE_GENERATOR STREQUAL "Ninja Multi-Config")
11+
# 'Ninja Multi-Config' specific, see:
12+
# https://cmake.org/cmake/help/latest/variable/CMAKE_DEFAULT_BUILD_TYPE.html
13+
set(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "CMake default build type")
14+
elseif(NOT GENERATOR_IS_MULTI_CONFIG_VAR AND NOT DEFINED CMAKE_BUILD_TYPE)
15+
message(STATUS "CMAKE_BUILD_TYPE is not defined, 'Release' will be used")
16+
# Setting CMAKE_BUILD_TYPE as CACHE must go before project(). Otherwise project() sets its value and set() doesn't take an effect
17+
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ...")
18+
endif()
19+
20+
project(OpenVINOGenAI VERSION 2024.2.0.0)
21+
22+
add_subdirectory(./thirdparty/)
23+
add_subdirectory(src)
24+
add_subdirectory(samples/cpp/beam_search_causal_lm/)
25+
add_subdirectory(samples/cpp/chat_sample/)
26+
add_subdirectory(samples/cpp/greedy_causal_lm/)
27+
add_subdirectory(samples/cpp/multinomial_causal_lm/)
28+
add_subdirectory(samples/cpp/prompt_lookup_decoding_lm/)
29+
add_subdirectory(samples/cpp/speculative_decoding_lm/)
30+
31+
install(DIRECTORY
32+
./samples/cpp/beam_search_causal_lm
33+
./samples/cpp/chat_sample
34+
./samples/cpp/greedy_causal_lm
35+
./samples/cpp/multinomial_causal_lm
36+
# Don't install prompt_lookup_decoding_lm and speculative_decoding_lm because they don't use openvino_genai library and arent verifyed yet.
37+
DESTINATION samples/cpp/ COMPONENT cpp_samples_genai)
38+
install(FILES ./samples/cpp/requirements.txt DESTINATION samples/cpp/ COMPONENT cpp_samples_genai)
39+
install(FILES LICENSE DESTINATION licensing COMPONENT licensing_genai RENAME LICENSE-GENAI)
40+
install(FILES third-party-programs.txt DESTINATION licensing COMPONENT licensing_genai RENAME third-party-programs-genai.txt)
41+
if(MSVC AND NOT DEFINED CPACK_GENERATOR)
42+
set(CPACK_GENERATOR "ZIP")
43+
endif()
44+
include(CPack)

image_generation/lcm_dreamshaper_v7/cpp/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Prepare a python environment and install dependencies:
1818
conda create -n openvino_lcm_cpp python==3.10
1919
conda activate openvino_lcm_cpp
2020
conda update -c conda-forge --all
21-
conda install -c conda-forge openvino=2024.1.0 c-compiler cxx-compiler git make cmake
21+
conda install -c conda-forge openvino=2024.2.0 c-compiler cxx-compiler git make cmake
2222
# Ensure that Conda standard libraries are used
2323
conda env config vars set LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
2424
```
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
--extra-index-url https://download.pytorch.org/whl/cpu
22
torch==2.2.2+cpu
33
diffusers==0.27.2
4-
optimum-intel[openvino] @ git+https://github.com/huggingface/optimum-intel.git@fb1b35bef23242d65b2fb057c4a7ac78a7cfd4c3
4+
optimum-intel[openvino]==1.17.0

image_generation/stable_diffusion_1_5/cpp/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Prepare a python environment and install dependencies:
1818
```shell
1919
conda create -n openvino_sd_cpp python==3.10
2020
conda activate openvino_sd_cpp
21-
conda install -c conda-forge openvino=2024.1.0 c-compiler cxx-compiler git make cmake
21+
conda install -c conda-forge openvino=2024.2.0 c-compiler cxx-compiler git make cmake
2222
# Ensure that Conda standard libraries are used
2323
conda env config vars set LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
2424
```

image_generation/stable_diffusion_1_5/cpp/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
torch==2.2.2+cpu
33
diffusers==0.27.2
44
transformers==4.39.3
5-
optimum-intel[openvino] @ git+https://github.com/huggingface/optimum-intel.git@fb1b35bef23242d65b2fb057c4a7ac78a7cfd4c3
5+
optimum-intel[openvino]==1.17.0
66
huggingface_hub[cli]==0.22.2

0 commit comments

Comments
 (0)