File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -328,6 +328,9 @@ def main(args):
328328 model = model .language_model
329329 model_type = get_model_type (model )
330330
331+ if model_type == "phi4mm" :
332+ warnings .warn ("Please set the default input_mode to InputMode.LANGUAGE before quantizing." )
333+
331334 if args .sparsity_fmt != "dense" :
332335 if args .batch_size == 0 :
333336 # Sparse algorithm takes more GPU memory so we reduce the batch_size by 4.
@@ -478,9 +481,6 @@ def main(args):
478481 quant_cfg ["quant_cfg" ]["*audio*" ] = {"enable" : False }
479482 quant_cfg ["quant_cfg" ]["*image*" ] = {"enable" : False }
480483 quant_cfg ["quant_cfg" ]["*vision*" ] = {"enable" : False }
481- warnings .warn (
482- "Please set the default input_mode to InputMode.LANGUAGE before quantizing."
483- )
484484
485485 if not model_is_already_quantized or calibration_only :
486486 # Only run single sample for preview
You can’t perform that action at this time.
0 commit comments