Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/python_tests/samples/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@
"name": "optimum-intel-internal-testing/tiny-random-qwen3-vl",
"convert_args": ["--trust-remote-code", "--task", "image-text-to-text"],
},
"tiny-random-qwen3-omni": {
"name": "optimum-intel-internal-testing/tiny-random-qwen3-omni",
"convert_args": ["--trust-remote-code", "--task", "image-text-to-text"],
},
}

TEST_FILES = {
Expand Down
32 changes: 32 additions & 0 deletions tests/python_tests/samples/test_tools_llm_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
import os
import pytest
import sys
from importlib import metadata
from pathlib import Path

from test_utils import run_sample
from data.models import GGUF_MODEL_LIST
from utils.hugging_face import download_gguf_model
from conftest import SAMPLES_PY_DIR, convert_model, download_test_content


_TRANSFORMERS_VERSION = tuple(int(p) for p in metadata.version("transformers").split(".")[:2])
Comment thread
avasenin-14 marked this conversation as resolved.
Outdated

convert_draft_model = convert_model
download_mask_image = download_test_content

Expand Down Expand Up @@ -615,3 +619,31 @@ def test_python_tool_llm_benchmark_video_gen_json(
generate_llm_bench_input_generation_jsonl,
] + sample_args
run_sample(benchmark_py_command)

@pytest.mark.samples
@pytest.mark.skipif(
_TRANSFORMERS_VERSION < (5, 1),
reason="Requires transformers >= 5.1",
)
Comment thread
avasenin-14 marked this conversation as resolved.
@pytest.mark.parametrize("download_test_content", ["cat.png"], indirect=True)
@pytest.mark.parametrize("convert_model", ["tiny-random-qwen3-omni"], indirect=True)
@pytest.mark.parametrize(
"sample_args",
[
["-d", "cpu", "-n", "1", "--num_steps", "4", "--task", "visual_text_gen", "--optimum"],
["-d", "cpu", "-n", "1", "--num_steps", "4", "--task", "visual_text_gen", "--genai"],
],
)
Comment on lines +727 to +732
def test_python_tool_llm_benchmark_visual_text_gen(self, download_test_content, convert_model, sample_args):
benchmark_script = SAMPLES_PY_DIR / "llm_bench/benchmark.py"
benchmark_py_command = [
sys.executable,
benchmark_script,
"-m",
convert_model,
"--media",
download_test_content,
"--prompt",
"What animal is in this image?",
] + sample_args
run_sample(benchmark_py_command)
4 changes: 3 additions & 1 deletion tools/llm_bench/llm_bench_utils/config_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
OVDiffusionPipeline,
OVModelForSpeechSeq2Seq,
OVModelForVisualCausalLM,
OVModelForMultimodalLM,
OVPipelineForInpainting,
OVPipelineForImage2Image,
OVModelForFeatureExtraction,
Expand Down Expand Up @@ -171,7 +172,8 @@ class UseCaseTextToSpeech(UseCase):
"videochat-flash-qwen",
"gemma4",
]
)
),
UseCaseVLM(["qwen3-omni"], ov_cls=OVModelForMultimodalLM),
Comment thread
avasenin-14 marked this conversation as resolved.
Outdated
],
"speech_to_text": [UseCaseSpeech2Text(["whisper"])],
"image_cls": [UseCaseImageCls(["vit"])],
Expand Down
Loading