File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -328,6 +328,11 @@ def main(args):
328
328
model = model .language_model
329
329
model_type = get_model_type (model )
330
330
331
+ if model_type == "phi4mm" :
332
+ warnings .warn (
333
+ "Please set the default input_mode to InputMode.LANGUAGE before quantizing."
334
+ )
335
+
331
336
if args .sparsity_fmt != "dense" :
332
337
if args .batch_size == 0 :
333
338
# Sparse algorithm takes more GPU memory so we reduce the batch_size by 4.
@@ -478,9 +483,6 @@ def main(args):
478
483
quant_cfg ["quant_cfg" ]["*audio*" ] = {"enable" : False }
479
484
quant_cfg ["quant_cfg" ]["*image*" ] = {"enable" : False }
480
485
quant_cfg ["quant_cfg" ]["*vision*" ] = {"enable" : False }
481
- warnings .warn (
482
- "Please set the default input_mode to InputMode.LANGUAGE before quantizing."
483
- )
484
486
485
487
if not model_is_already_quantized or calibration_only :
486
488
# Only run single sample for preview
You can’t perform that action at this time.
0 commit comments