Skip to content

Commit a698e8e

Browse files
EtelisEtelisIBM
andauthored
[Model] Use mm_position to compute mrope positions for Qwen2.5-Omni (vllm-project#32772)
Signed-off-by: Itay Etelis <[email protected]> Co-authored-by: Itay Etelis <[email protected]>
1 parent 151e545 commit a698e8e

File tree

3 files changed

+386
-201
lines changed

3 files changed

+386
-201
lines changed

examples/offline_inference/qwen2_5_omni/only_thinker.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,36 @@ def get_multi_audios_query() -> QueryResult:
112112
)
113113

114114

115+
def get_multi_images_query() -> QueryResult:
116+
question = "What are the differences between these two images?"
117+
prompt = (
118+
f"<|im_start|>system\n{default_system}<|im_end|>\n"
119+
"<|im_start|>user\n<|vision_bos|><|IMAGE|><|vision_eos|>"
120+
"<|vision_bos|><|IMAGE|><|vision_eos|>"
121+
f"{question}<|im_end|>\n"
122+
f"<|im_start|>assistant\n"
123+
)
124+
return QueryResult(
125+
inputs={
126+
"prompt": prompt,
127+
"multi_modal_data": {
128+
"image": [
129+
convert_image_mode(ImageAsset("cherry_blossom").pil_image, "RGB"),
130+
convert_image_mode(ImageAsset("stop_sign").pil_image, "RGB"),
131+
],
132+
},
133+
},
134+
limit_mm_per_prompt={
135+
"image": 2,
136+
},
137+
)
138+
139+
115140
query_map = {
116141
"mixed_modalities": get_mixed_modalities_query,
117142
"use_audio_in_video": get_use_audio_in_video_query,
118143
"multi_audios": get_multi_audios_query,
144+
"multi_images": get_multi_images_query,
119145
}
120146

121147

0 commit comments

Comments
 (0)