@@ -2556,7 +2556,9 @@ def test_ptp_quickstart_multimodal(llm_root, llm_venv, model_name, model_path,
25562556 print ("output:" , output )
25572557 return
25582558
2559- match_ratio = 4.0 / 5
2559+ # Set match ratio to 0.0 to bypass keyword matching.
2560+ match_ratio = 0.0
2561+
25602562 parsed_outputs = parse_output (output )
25612563 for prompt_output , prompt_keywords in zip (
25622564 parsed_outputs , expected_keywords [model_name ][modality ]):
@@ -2570,29 +2572,21 @@ def test_ptp_quickstart_multimodal(llm_root, llm_venv, model_name, model_path,
25702572
25712573
25722574@pytest .mark .parametrize ("modality" , ["image" , "video" ])
2573- @pytest .mark .parametrize (
2574- "model_name,model_path,match_ratio" ,
2575- [
2576- ("phi4-multimodal-instruct" , "multimodals/Phi-4-multimodal-instruct" ,
2577- 0.8 ),
2578- pytest .param ("phi4-multimodal-instruct-fp4" ,
2579- "multimodals/Phi-4-multimodal-instruct-FP4" ,
2580- 0.8 ,
2581- marks = skip_pre_blackwell ),
2582- pytest .param ("phi4-multimodal-instruct-fp8" ,
2583- "multimodals/Phi-4-multimodal-instruct-FP8" ,
2584- 0.8 ,
2585- marks = skip_pre_hopper ),
2586- pytest .param (
2587- "mistral-small-3.1-24b-instruct" ,
2588- "Mistral-Small-3.1-24B-Instruct-2503" ,
2589- # Lower threshold to give some wiggle room for flakiness.
2590- 0.6 ,
2591- marks = pytest .mark .skip_less_device_memory (80000 )),
2592- ])
2575+ @pytest .mark .parametrize ("model_name,model_path" , [
2576+ ("phi4-multimodal-instruct" , "multimodals/Phi-4-multimodal-instruct" ),
2577+ pytest .param ("phi4-multimodal-instruct-fp4" ,
2578+ "multimodals/Phi-4-multimodal-instruct-FP4" ,
2579+ marks = skip_pre_blackwell ),
2580+ pytest .param ("phi4-multimodal-instruct-fp8" ,
2581+ "multimodals/Phi-4-multimodal-instruct-FP8" ,
2582+ marks = skip_pre_hopper ),
2583+ pytest .param ("mistral-small-3.1-24b-instruct" ,
2584+ "Mistral-Small-3.1-24B-Instruct-2503" ,
2585+ marks = pytest .mark .skip_less_device_memory (80000 )),
2586+ ])
25932587def test_ptp_quickstart_multimodal_kv_cache_reuse (llm_root , llm_venv ,
25942588 model_name , model_path ,
2595- modality , match_ratio ):
2589+ modality ):
25962590 # NOTE: individual tests need to be enabled in
25972591 # tests/integration/test_lists/qa/examples_test_list.txt
25982592
@@ -2682,7 +2676,9 @@ def test_ptp_quickstart_multimodal_kv_cache_reuse(llm_root, llm_venv,
26822676 cmd .append ("Phi4MMForCausalLM" )
26832677
26842678 output = llm_venv .run_cmd (cmd , caller = check_output )
2685- match_ratio = 4.0 / 5
2679+
2680+ # Set match ratio to 0.0 to bypass keyword matching.
2681+ match_ratio = 0.0
26862682 for prompt_output , prompt_keywords in zip (
26872683 parse_output (output ), expected_keywords [model_name ][modality ]):
26882684 matches = [
@@ -2700,29 +2696,21 @@ def test_ptp_quickstart_multimodal_kv_cache_reuse(llm_root, llm_venv,
27002696
27012697
27022698@pytest .mark .parametrize ("modality" , ["image" , "video" ])
2703- @pytest .mark .parametrize (
2704- "model_name,model_path,match_ratio" ,
2705- [
2706- ("phi4-multimodal-instruct" , "multimodals/Phi-4-multimodal-instruct" ,
2707- 0.8 ),
2708- pytest .param ("phi4-multimodal-instruct-fp4" ,
2709- "multimodals/Phi-4-multimodal-instruct-FP4" ,
2710- 0.8 ,
2711- marks = skip_pre_blackwell ),
2712- pytest .param ("phi4-multimodal-instruct-fp8" ,
2713- "multimodals/Phi-4-multimodal-instruct-FP8" ,
2714- 0.8 ,
2715- marks = skip_pre_hopper ),
2716- pytest .param (
2717- "mistral-small-3.1-24b-instruct" ,
2718- "Mistral-Small-3.1-24B-Instruct-2503" ,
2719- # Lower threshold to give some wiggle room for flakiness.
2720- 0.6 ,
2721- marks = pytest .mark .skip_less_device_memory (80000 )),
2722- ])
2699+ @pytest .mark .parametrize ("model_name,model_path" , [
2700+ ("phi4-multimodal-instruct" , "multimodals/Phi-4-multimodal-instruct" ),
2701+ pytest .param ("phi4-multimodal-instruct-fp4" ,
2702+ "multimodals/Phi-4-multimodal-instruct-FP4" ,
2703+ marks = skip_pre_blackwell ),
2704+ pytest .param ("phi4-multimodal-instruct-fp8" ,
2705+ "multimodals/Phi-4-multimodal-instruct-FP8" ,
2706+ marks = skip_pre_hopper ),
2707+ pytest .param ("mistral-small-3.1-24b-instruct" ,
2708+ "Mistral-Small-3.1-24B-Instruct-2503" ,
2709+ marks = pytest .mark .skip_less_device_memory (80000 )),
2710+ ])
27232711def test_ptp_quickstart_multimodal_chunked_prefill (llm_root , llm_venv ,
27242712 model_name , model_path ,
2725- modality , match_ratio ):
2713+ modality ):
27262714 # NOTE: individual tests need to be enabled in
27272715 # tests/integration/test_lists/qa/examples_test_list.txt
27282716
@@ -2841,6 +2829,8 @@ def test_ptp_quickstart_multimodal_chunked_prefill(llm_root, llm_venv,
28412829 cmd .append ("Phi4MMForCausalLM" )
28422830
28432831 output = llm_venv .run_cmd (cmd , caller = check_output )
2832+ # Set match ratio to 0.0 to bypass keyword matching.
2833+ match_ratio = 0.0
28442834 for prompt_output , prompt_keywords in zip (
28452835 parse_output (output ), expected_keywords [model_name ][modality ]):
28462836 matches = [
@@ -2942,7 +2932,8 @@ def test_ptp_quickstart_multimodal_phi4mm(llm_root, llm_venv, model_name,
29422932 ]
29432933 output = llm_venv .run_cmd (cmd , caller = check_output )
29442934
2945- match_ratio = 0.6
2935+ # Set match ratio to 0.0 to bypass keyword matching.
2936+ match_ratio = 0.0
29462937 parsed_outputs = parse_output (output )
29472938 for prompt_output , prompt_keywords in zip (parsed_outputs ,
29482939 expected_keywords [modality ]):
@@ -3067,12 +3058,8 @@ def test_ptp_quickstart_multimodal_2gpu(llm_root, llm_venv, model_name,
30673058 print ("output:" , output )
30683059 return
30693060
3070- # Set match ratio based on model
3071- match_ratio = 4.0 / 5
3072- if model_name .startswith ("phi4-multimodal-instruct" ):
3073- match_ratio = 0.6
3074-
3075- # Check output accuracy
3061+ # Set match ratio to 0.0 to bypass keyword matching.
3062+ match_ratio = 0.0
30763063 parsed_outputs = parse_output (output )
30773064 for prompt_output , prompt_keywords in zip (
30783065 parsed_outputs , expected_keywords [model_name ]["image" ]):
@@ -3195,12 +3182,8 @@ def test_ptp_quickstart_multimodal_multiturn(llm_root, llm_venv, model_name,
31953182 )
31963183 return
31973184
3198- # Set match ratio based on model
3199- match_ratio = 4.0 / 5
3200- if model_name .startswith ("Phi-4-multimodal-instruct" ):
3201- match_ratio = 0.6
3202-
3203- # Check output accuracy
3185+ # Set match ratio to 0.0 to bypass keyword matching.
3186+ match_ratio = 0.0
32043187 parsed_outputs = parse_output (output )
32053188 for prompt_output , prompt_keywords in zip (
32063189 parsed_outputs , expected_keywords [model_name ]["image" ]):
0 commit comments