Skip to content

Commit d3ade54

Browse files
committed
Add test for vlm sample with llava model
1 parent 685a350 commit d3ade54

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/causal_lm_cpp.yml

+33
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,39 @@ jobs:
681681
diff pred2.txt ref.txt
682682
echo "Chat sample python" passed
683683
684+
py-vlm_chat_sample-ubuntu:
685+
runs-on: ubuntu-22.04-16-cores
686+
steps:
687+
- uses: actions/checkout@v4
688+
with:
689+
submodules: recursive
690+
- uses: actions/setup-python@v4
691+
with:
692+
python-version: 3.11
693+
- name: Install OpenVINO
694+
run: |
695+
mkdir ./ov/
696+
curl ${{ env.l_ov_link }} | tar --directory ./ov/ --strip-components 1 -xz
697+
sudo ./ov/install_dependencies/install_openvino_dependencies.sh
698+
- name: Build app
699+
run: |
700+
source ./ov/setupvars.sh
701+
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
702+
cmake --build ./build/ --config Release --target visual_language_chat -j
703+
- name: Download and convert LLaVa 1.5 model and an image
704+
run: |
705+
source ./ov/setupvars.sh
706+
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
707+
python -m pip install --upgrade-strategy eager -r ./samples/requirements.txt --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
708+
# Install optimum-intel from fork with OVModelForVisionCausalLM support
709+
python -m pip install "optimum-intel[openvino]"@git+https://github.com/eaidova/optimum-intel.git@ea/llava_model
710+
optimum-cli export openvino --model llava-hf/llava-1.5-7b-hf ./llava_1_5_7b_ov/
711+
wget https://llava-vl.github.io/static/images/monalisa.jpg
712+
- run: >
713+
source ./ov/setupvars.sh
714+
&& timeout 120s ./build/samples/cpp/visual_language_chat/visual_language_chat ./llava_1_5_7b_ov/ monalisa.jpg
715+
<<< $'Who drew this painting?\nWhen did the painter live?'
716+
684717
cpp-continuous-batching-ubuntu:
685718
runs-on: ubuntu-20.04-8-cores
686719
defaults:

0 commit comments

Comments
 (0)