Skip to content

Commit

Permalink
Use manylinux
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov committed Jan 17, 2025
1 parent 02fb243 commit 8dc70f5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/causal_lm_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ env:
l_u22_ov_link: https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2025.0.0rc1/l_openvino_toolkit_ubuntu22_2025.0.0.dev20250116_x86_64.tgz
m_ov_link: https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2025.0.0rc1/m_openvino_toolkit_macos_12_6_2025.0.0.dev20250116_x86_64.tgz
w_ov_link: https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2025.0.0rc1/w_openvino_toolkit_windows_2025.0.0.dev20250116_x86_64.zip

jobs:
cpp-multinomial-greedy_causal_lm-ubuntu:
runs-on: ubuntu-20.04-8-cores
Expand Down Expand Up @@ -463,6 +464,7 @@ jobs:
env:
PYTHONPATH: "./build/:$PYTHONPATH"
LD_LIBRARY_PATH: "./build/openvino_genai/:$LD_LIBRARY_PATH"

cpp-prompt_lookup_decoding_lm-ubuntu:
runs-on: ubuntu-20.04-16-cores
defaults:
Expand Down Expand Up @@ -520,6 +522,7 @@ jobs:
env:
PYTHONPATH: "./build/:$PYTHONPATH"
LD_LIBRARY_PATH: "./build/openvino_genai/:$LD_LIBRARY_PATH"

cpp-Phi-1_5:
runs-on: ubuntu-20.04-16-cores
defaults:
Expand Down Expand Up @@ -697,7 +700,6 @@ jobs:
diff pred2.txt ref.txt
echo "Chat sample python" passed
visual_language_chat_sample-ubuntu-minicpm_v2_6:
runs-on: ubuntu-22.04-16-cores
steps:
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/genai-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
merge-multiple: true
- name: Install dependencies
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
python -m pip install ${{ env.SRC_DIR }}/thirdparty/openvino_tokenizers -v ${{ needs.openvino_download.outputs.ov_wheel_source }}
python -m pip install ${{ env.SRC_DIR }} -v ${{ needs.openvino_download.outputs.ov_wheel_source }}
python -m pip install -r ${{ env.LLM_BENCH_PYPATH }}/requirements.txt ${{ needs.openvino_download.outputs.ov_wheel_source }}
Expand All @@ -95,6 +96,7 @@ jobs:
rm -rf ./tiny-random-qwen
- name: Test katuni4ka/tiny-random-baichuan2 Optimum Intel
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
optimum-cli export openvino --model katuni4ka/tiny-random-baichuan2 --trust-remote-code --weight-format fp16 ./ov_models/tiny-random-baichuan2
python ./tools/llm_bench/benchmark.py -m ./ov_models/tiny-random-baichuan2/ -d cpu -n 1 --optimum -ic 10
rm -rf ./ov_models/
Expand All @@ -106,24 +108,30 @@ jobs:
jq -n -c --arg steps "4" --arg width "64" --arg height "32" --arg guidance_scale "7.0" --arg prompt "$prompt" "$json_template" >> ./image_generation.jsonl
- name: Test echarlaix/tiny-random-latent-consistency Optimum Intel
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
optimum-cli export openvino --model echarlaix/tiny-random-latent-consistency --trust-remote-code --weight-format fp16 ./ov_models/tiny-random-latent-consistency
python ./tools/llm_bench/benchmark.py -m ./ov_models/tiny-random-latent-consistency/ -pf ./image_generation.jsonl -d cpu -n 1 --optimum --num_steps 4
- name: Test echarlaix/tiny-random-latent-consistency with GenAI
run: python ./tools/llm_bench/benchmark.py -m ./ov_models/tiny-random-latent-consistency/ -pf ./image_generation.jsonl -d cpu -n 1 --num_steps 4
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
python ./tools/llm_bench/benchmark.py -m ./ov_models/tiny-random-latent-consistency/ -pf ./image_generation.jsonl -d cpu -n 1 --num_steps 4
- name: Test echarlaix/tiny-random-latent-consistency with GenAI and LoRA
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
huggingface-cli download katuni4ka/tiny-random-latent-consistency-lora --local-dir ./lora
python ./tools/llm_bench/benchmark.py -m ./ov_models/tiny-random-latent-consistency/ -pf ./image_generation.jsonl -d cpu -n 1 --num_steps 4 --lora ./lora/tiny-random-latent-consistency-lora.safetensors --lora_alphas 0.7
rm -rf ./ov_models/ ./lora ./image_generation.jsonl
- name: Test TinyLlama-1.1B-Chat-v1.0 in Speculative Decoding via GenAI
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
optimum-cli export openvino --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 --trust-remote-code --weight-format fp16 ov_models/TinyLlama-1.1B-Chat-v1.0/FP16
optimum-cli export openvino --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 --trust-remote-code --weight-format int8 ov_models/TinyLlama-1.1B-Chat-v1.0/INT8
python ./tools/llm_bench/benchmark.py -m ./ov_models/TinyLlama-1.1B-Chat-v1.0/FP16/ --draft_model ./ov_models/TinyLlama-1.1B-Chat-v1.0/INT8/ -p "Why is the Sun yellow?" -d cpu --draft_device cpu -n 1 --assistant_confidence_threshold 0.4 -ic 20
python ./tools/llm_bench/benchmark.py -m ./ov_models/TinyLlama-1.1B-Chat-v1.0/FP16/ --draft_model ./ov_models/TinyLlama-1.1B-Chat-v1.0/INT8/ -p "Why is the Sun yellow?" -d cpu --draft_device cpu -n 1 --num_assistant_tokens 5 -ic 20
rm -rf ov_models/TinyLlama-1.1B-Chat-v1.0
- name: Test openai/whisper-tiny via Optimum
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
GIT_LFS_SKIP_SMUDGE=1 git clone --depth 1 --branch main --single-branch https://huggingface.co/datasets/facebook/multilingual_librispeech
cd multilingual_librispeech
git lfs pull -I /data/mls_polish/train/audio/3283_1447_000.tar.gz
Expand All @@ -134,15 +142,18 @@ jobs:
python ./tools/llm_bench/benchmark.py -m ./ov_models/whisper-tiny --media multilingual_librispeech/data/mls_polish/train/audio/3283_1447_000/3283_1447_000000.flac -d cpu -n 1 --optimum
- name: Test openai/whisper-tiny via GenAI
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
python ./tools/llm_bench/benchmark.py -m ./ov_models/whisper-tiny --media multilingual_librispeech/data/mls_polish/train/audio/3283_1447_000/3283_1447_000000.flac -d cpu -n 1
rm -rf ./ov_models/whisper-tiny
rm -rf multilingual_librispeech
- name: Test katuni4ka/tiny-random-llava via Optimum
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
optimum-cli export openvino --model katuni4ka/tiny-random-llava ./ov_models/tiny-random-llava --task image-text-to-text --trust-remote-code
python ./tools/llm_bench/benchmark.py -m ./ov_models/tiny-random-llava --media https://github.com/openvinotoolkit/openvino_notebooks/assets/29454499/d5fbbd1a-d484-415c-88cb-9986625b7b11 --prompt "What is unusual on this image?" -ic 20 --optimum
- name: Test katuni4ka/tiny-random-llava via GenAI
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
python ./tools/llm_bench/benchmark.py -m ./ov_models/tiny-random-llava --media https://github.com/openvinotoolkit/openvino_notebooks/assets/29454499/d5fbbd1a-d484-415c-88cb-9986625b7b11 --prompt "What is unusual on this image?" -ic 20
rm -rf ./ov_models
Expand Down Expand Up @@ -184,13 +195,15 @@ jobs:
merge-multiple: true
- name: Install dependencies
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
python -m pip install ${{ env.SRC_DIR }}/thirdparty/openvino_tokenizers -v ${{ needs.openvino_download.outputs.ov_wheel_source }}
python -m pip install ${{ env.SRC_DIR }} -v ${{ needs.openvino_download.outputs.ov_wheel_source }}
python -m pip install -r ${{ env.WWB_PATH }}/requirements.txt ${{ needs.openvino_download.outputs.ov_wheel_source }}
python -m pip install git+https://github.com/huggingface/optimum-intel.git@main#egg=optimum-intel
working-directory: ${{ env.OV_INSTALL_DIR }}
- name: WWB Tests
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
python -m pip install -v ${{ env.WWB_PATH }}
python -m pytest -v ${{ env.WWB_PATH }}/tests
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ jobs:

- name: Build Tokenizers Wheel
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \
--config-settings=override=cross.arch="manylinux_2_31_x86_64" \
${{ needs.openvino_download.outputs.ov_wheel_source }} \
Expand All @@ -172,6 +173,7 @@ jobs:

- name: Build GenAI Wheel
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
python -m pip wheel -v --no-deps --wheel-dir ${{ env.WHEELS_DIR }} \
--config-settings=override=cross.arch="manylinux_2_31_x86_64" \
${{ needs.openvino_download.outputs.ov_wheel_source }} \
Expand Down Expand Up @@ -374,18 +376,22 @@ jobs:
- name: Test multinomial_causal_lm.py
if: ${{ 'Release' == matrix.build-type }} # Python bindings can be built in Release only
timeout-minutes: 1
run: ${{ env.INSTALL_DIR }}/samples/python/text_generation/multinomial_causal_lm.py ./TinyLlama-1.1B-Chat-v1.0/ 0
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_DIR }}/samples/python/text_generation/multinomial_causal_lm.py ./TinyLlama-1.1B-Chat-v1.0/ 0
working-directory: ${{ env.MODELS_DIR }}

- name: Test whisper_speech_recognition.py
if: ${{ 'Release' == matrix.build-type }} # Python bindings can be built in Release only
timeout-minutes: 1
run: ${{ env.INSTALL_DIR }}/samples/python/whisper_speech_recognition/whisper_speech_recognition.py ./whisper-tiny/ how_are_you_doing_today.wav
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_DIR }}/samples/python/whisper_speech_recognition/whisper_speech_recognition.py ./whisper-tiny/ how_are_you_doing_today.wav
working-directory: ${{ env.MODELS_DIR }}

- name: C++ Tests Prerequisites
run: python -m pip uninstall openvino openvino-tokenizers openvino-genai -y

- name: Test greedy_causal_lm
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/src/make_tokenizer_stateful.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace genai {
**/
class MakeCombineSegmentsSatateful : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("MakeCombineSegmentsSatateful", "0");
OPENVINO_MODEL_PASS_RTTI("MakeCombineSegmentsSatateful");
bool run_on_model(const std::shared_ptr<ov::Model>& model) override;
};

Expand Down Expand Up @@ -70,7 +70,7 @@ class MakeCombineSegmentsSatateful : public ov::pass::ModelPass {
**/
class MakeVocabDecoderSatateful : public ov::pass::ModelPass {
public:
OPENVINO_RTTI("MakeVocabDecoderSatateful", "0");
OPENVINO_MODEL_PASS_RTTI("MakeVocabDecoderSatateful");
bool run_on_model(const std::shared_ptr<ov::Model>& model) override;
};

Expand Down

0 comments on commit 8dc70f5

Please sign in to comment.