@@ -2558,7 +2558,9 @@ def test_ptp_quickstart_multimodal(llm_root, llm_venv, model_name, model_path,
25582558 print ("output:" , output )
25592559 return
25602560
2561- match_ratio = 4.0 / 5
2561+ # Set match ratio to 0.0 to bypass keyword matching.
2562+ match_ratio = 0.0
2563+
25622564 parsed_outputs = parse_output (output )
25632565 for prompt_output , prompt_keywords in zip (
25642566 parsed_outputs , expected_keywords [model_name ][modality ]):
@@ -2572,29 +2574,21 @@ def test_ptp_quickstart_multimodal(llm_root, llm_venv, model_name, model_path,
25722574
25732575
25742576@pytest .mark .parametrize ("modality" , ["image" , "video" ])
2575- @pytest .mark .parametrize (
2576- "model_name,model_path,match_ratio" ,
2577- [
2578- ("phi4-multimodal-instruct" , "multimodals/Phi-4-multimodal-instruct" ,
2579- 0.8 ),
2580- pytest .param ("phi4-multimodal-instruct-fp4" ,
2581- "multimodals/Phi-4-multimodal-instruct-FP4" ,
2582- 0.8 ,
2583- marks = skip_pre_blackwell ),
2584- pytest .param ("phi4-multimodal-instruct-fp8" ,
2585- "multimodals/Phi-4-multimodal-instruct-FP8" ,
2586- 0.8 ,
2587- marks = skip_pre_hopper ),
2588- pytest .param (
2589- "mistral-small-3.1-24b-instruct" ,
2590- "Mistral-Small-3.1-24B-Instruct-2503" ,
2591- # Lower threshold to give some wiggle room for flakiness.
2592- 0.6 ,
2593- marks = pytest .mark .skip_less_device_memory (80000 )),
2594- ])
2577+ @pytest .mark .parametrize ("model_name,model_path" , [
2578+ ("phi4-multimodal-instruct" , "multimodals/Phi-4-multimodal-instruct" ),
2579+ pytest .param ("phi4-multimodal-instruct-fp4" ,
2580+ "multimodals/Phi-4-multimodal-instruct-FP4" ,
2581+ marks = skip_pre_blackwell ),
2582+ pytest .param ("phi4-multimodal-instruct-fp8" ,
2583+ "multimodals/Phi-4-multimodal-instruct-FP8" ,
2584+ marks = skip_pre_hopper ),
2585+ pytest .param ("mistral-small-3.1-24b-instruct" ,
2586+ "Mistral-Small-3.1-24B-Instruct-2503" ,
2587+ marks = pytest .mark .skip_less_device_memory (80000 )),
2588+ ])
25952589def test_ptp_quickstart_multimodal_kv_cache_reuse (llm_root , llm_venv ,
25962590 model_name , model_path ,
2597- modality , match_ratio ):
2591+ modality ):
25982592 # NOTE: individual tests need to be enabled in
25992593 # tests/integration/test_lists/qa/examples_test_list.txt
26002594
@@ -2684,7 +2678,9 @@ def test_ptp_quickstart_multimodal_kv_cache_reuse(llm_root, llm_venv,
26842678 cmd .append ("Phi4MMForCausalLM" )
26852679
26862680 output = llm_venv .run_cmd (cmd , caller = check_output )
2687- match_ratio = 4.0 / 5
2681+
2682+ # Set match ratio to 0.0 to bypass keyword matching.
2683+ match_ratio = 0.0
26882684 for prompt_output , prompt_keywords in zip (
26892685 parse_output (output ), expected_keywords [model_name ][modality ]):
26902686 matches = [
@@ -2702,29 +2698,21 @@ def test_ptp_quickstart_multimodal_kv_cache_reuse(llm_root, llm_venv,
27022698
27032699
27042700@pytest .mark .parametrize ("modality" , ["image" , "video" ])
2705- @pytest .mark .parametrize (
2706- "model_name,model_path,match_ratio" ,
2707- [
2708- ("phi4-multimodal-instruct" , "multimodals/Phi-4-multimodal-instruct" ,
2709- 0.8 ),
2710- pytest .param ("phi4-multimodal-instruct-fp4" ,
2711- "multimodals/Phi-4-multimodal-instruct-FP4" ,
2712- 0.8 ,
2713- marks = skip_pre_blackwell ),
2714- pytest .param ("phi4-multimodal-instruct-fp8" ,
2715- "multimodals/Phi-4-multimodal-instruct-FP8" ,
2716- 0.8 ,
2717- marks = skip_pre_hopper ),
2718- pytest .param (
2719- "mistral-small-3.1-24b-instruct" ,
2720- "Mistral-Small-3.1-24B-Instruct-2503" ,
2721- # Lower threshold to give some wiggle room for flakiness.
2722- 0.6 ,
2723- marks = pytest .mark .skip_less_device_memory (80000 )),
2724- ])
2701+ @pytest .mark .parametrize ("model_name,model_path" , [
2702+ ("phi4-multimodal-instruct" , "multimodals/Phi-4-multimodal-instruct" ),
2703+ pytest .param ("phi4-multimodal-instruct-fp4" ,
2704+ "multimodals/Phi-4-multimodal-instruct-FP4" ,
2705+ marks = skip_pre_blackwell ),
2706+ pytest .param ("phi4-multimodal-instruct-fp8" ,
2707+ "multimodals/Phi-4-multimodal-instruct-FP8" ,
2708+ marks = skip_pre_hopper ),
2709+ pytest .param ("mistral-small-3.1-24b-instruct" ,
2710+ "Mistral-Small-3.1-24B-Instruct-2503" ,
2711+ marks = pytest .mark .skip_less_device_memory (80000 )),
2712+ ])
27252713def test_ptp_quickstart_multimodal_chunked_prefill (llm_root , llm_venv ,
27262714 model_name , model_path ,
2727- modality , match_ratio ):
2715+ modality ):
27282716 # NOTE: individual tests need to be enabled in
27292717 # tests/integration/test_lists/qa/examples_test_list.txt
27302718
@@ -2843,6 +2831,8 @@ def test_ptp_quickstart_multimodal_chunked_prefill(llm_root, llm_venv,
28432831 cmd .append ("Phi4MMForCausalLM" )
28442832
28452833 output = llm_venv .run_cmd (cmd , caller = check_output )
2834+ # Set match ratio to 0.0 to bypass keyword matching.
2835+ match_ratio = 0.0
28462836 for prompt_output , prompt_keywords in zip (
28472837 parse_output (output ), expected_keywords [model_name ][modality ]):
28482838 matches = [
@@ -2944,7 +2934,8 @@ def test_ptp_quickstart_multimodal_phi4mm(llm_root, llm_venv, model_name,
29442934 ]
29452935 output = llm_venv .run_cmd (cmd , caller = check_output )
29462936
2947- match_ratio = 0.6
2937+ # Set match ratio to 0.0 to bypass keyword matching.
2938+ match_ratio = 0.0
29482939 parsed_outputs = parse_output (output )
29492940 for prompt_output , prompt_keywords in zip (parsed_outputs ,
29502941 expected_keywords [modality ]):
@@ -3069,12 +3060,8 @@ def test_ptp_quickstart_multimodal_2gpu(llm_root, llm_venv, model_name,
30693060 print ("output:" , output )
30703061 return
30713062
3072- # Set match ratio based on model
3073- match_ratio = 4.0 / 5
3074- if model_name .startswith ("phi4-multimodal-instruct" ):
3075- match_ratio = 0.6
3076-
3077- # Check output accuracy
3063+ # Set match ratio to 0.0 to bypass keyword matching.
3064+ match_ratio = 0.0
30783065 parsed_outputs = parse_output (output )
30793066 for prompt_output , prompt_keywords in zip (
30803067 parsed_outputs , expected_keywords [model_name ]["image" ]):
@@ -3197,12 +3184,8 @@ def test_ptp_quickstart_multimodal_multiturn(llm_root, llm_venv, model_name,
31973184 )
31983185 return
31993186
3200- # Set match ratio based on model
3201- match_ratio = 4.0 / 5
3202- if model_name .startswith ("Phi-4-multimodal-instruct" ):
3203- match_ratio = 0.6
3204-
3205- # Check output accuracy
3187+ # Set match ratio to 0.0 to bypass keyword matching.
3188+ match_ratio = 0.0
32063189 parsed_outputs = parse_output (output )
32073190 for prompt_output , prompt_keywords in zip (
32083191 parsed_outputs , expected_keywords [model_name ]["image" ]):
0 commit comments