Skip to content

Commit d34d6e3

Browse files
committed
Move qwen3_omni_case_compare.py to tools/ and reorganize
- Move qwen3_omni_case_compare.py into samples/tools/ - Rename requirements.txt to requirements_hf_tokenizer_to_ov.txt (per-tool naming convention for independent dependencies) - Update tools/README.md with both tools documented - Update bat launcher and modeling README with new paths - qwen3_omni_case_compare.py uses stdlib only, no extra requirements Signed-off-by: Zhang, Xiaolin <xiaolin.zhang@intel.com>
1 parent efcd3a0 commit d34d6e3

File tree

4 files changed

+33
-6
lines changed

4 files changed

+33
-6
lines changed

src/cpp/src/modeling/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ modeling/
2121
├── samples/ # Sample executables
2222
│ ├── modeling_qwen3_omni.cpp # Case 1: image+text → text
2323
│ ├── modeling_qwen3_omni_tts_min.cpp # Cases 2–5: multimodal → text + TTS
24-
│ └── extract_video_frames.cpp # Video frame extraction tool
25-
└── qwen3_omni_case_compare.py # Automated test harness (all cases × devices × precisions)
24+
│ ├── extract_video_frames.cpp # Video frame extraction tool
25+
│ └── tools/ # Dev-only Python utilities (see tools/README.md)
26+
│ └── qwen3_omni_case_compare.py # Automated test harness (all cases × devices × precisions)
27+
│ └── hf_tokenizer_to_ov.py # Convert a HuggingFace tokenizer to OpenVINO IR format.
2628
```
2729

2830
## Prerequisites
@@ -199,13 +201,13 @@ Control inference precision and KV-cache compression via the `--precision` argum
199201

200202
Aliases: `fp32_kv8``inf_fp32_kv_int8`, `fp16_kv8``inf_fp16_kv_int8`, etc.
201203

202-
## Automated Case Comparison (`qwen3_omni_case_compare.py`)
204+
## Automated Case Comparison (`tools/qwen3_omni_case_compare.py`)
203205

204206
Runs all cases across multiple devices and precision modes, generating a JSON report
205207
with performance metrics and text outputs for comparison.
206208

207209
```bat
208-
python qwen3_omni_case_compare.py ^
210+
python tools/qwen3_omni_case_compare.py ^
209211
--model-dir D:\models\Qwen3-Omni-4B-Instruct-multilingual ^
210212
--image path\to\image.jpg ^
211213
--test-audio path\to\audio.wav ^

src/cpp/src/modeling/samples/tools/README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Dev Tools
22

3-
Dev-only Python utilities for model preparation. **Not included in release builds.**
3+
Dev-only Python utilities for model preparation and testing. **Not included in release builds.**
44

55
## Setup
66

7+
Each tool may have its own `requirements_<tool>.txt`. Install as needed:
8+
79
```bash
8-
pip install -r requirements.txt
10+
pip install -r requirements_hf_tokenizer_to_ov.txt
911
```
1012

1113
## Tools
@@ -14,6 +16,8 @@ pip install -r requirements.txt
1416

1517
Convert a HuggingFace tokenizer to OpenVINO IR (`openvino_tokenizer.xml` + `openvino_detokenizer.xml`).
1618

19+
Dependencies: `requirements_hf_tokenizer_to_ov.txt`
20+
1721
```bash
1822
# Basic usage — output defaults to model_id directory
1923
python hf_tokenizer_to_ov.py <model_id_or_path>
@@ -27,3 +31,24 @@ Options:
2731
| Flag | Description |
2832
|------|-------------|
2933
| `-o, --output-dir` | Output directory (default: model_id directory) |
34+
35+
---
36+
37+
### qwen3_omni_case_compare.py
38+
39+
Automated test harness: runs Qwen3-Omni inference cases across multiple devices and precision modes, generating a JSON report with performance metrics and text outputs.
40+
41+
Dependencies: Python standard library only (no extra install needed).
42+
43+
```bat
44+
python qwen3_omni_case_compare.py ^
45+
--model-dir D:\models\Qwen3-Omni-4B-Instruct-multilingual ^
46+
--image path\to\image.jpg ^
47+
--test-audio path\to\audio.wav ^
48+
--cpp-bin path\to\modeling_qwen3_omni.exe ^
49+
--out-json reports\case_compare.json ^
50+
--devices CPU,GPU ^
51+
--precisions fp32,inf_fp16_kv_int8
52+
```
53+
54+
See [modeling README](../../../modeling/README.md) for full options.

src/cpp/src/modeling/samples/qwen3_omni_case_compare.py renamed to src/cpp/src/modeling/samples/tools/qwen3_omni_case_compare.py

File renamed without changes.

src/cpp/src/modeling/samples/tools/requirements.txt renamed to src/cpp/src/modeling/samples/tools/requirements_hf_tokenizer_to_ov.txt

File renamed without changes.

0 commit comments

Comments
 (0)