Skip to content

Commit d56f03c

Browse files
cjluo-nvkevalmorabia97
authored andcommitted
Move phi4_mm warning to above (#389)
Signed-off-by: Chenjie Luo <[email protected]>
1 parent 71edf4d commit d56f03c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/llm_ptq/hf_ptq.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ def main(args):
325325
model = model.language_model
326326
model_type = get_model_type(model)
327327

328+
if model_type == "phi4mm":
329+
warnings.warn("Please set the default input_mode to InputMode.LANGUAGE before quantizing.")
330+
328331
if args.sparsity_fmt != "dense":
329332
if args.batch_size == 0:
330333
# Sparse algorithm takes more GPU memory so we reduce the batch_size by 4.
@@ -475,9 +478,6 @@ def main(args):
475478
quant_cfg["quant_cfg"]["*audio*"] = {"enable": False}
476479
quant_cfg["quant_cfg"]["*image*"] = {"enable": False}
477480
quant_cfg["quant_cfg"]["*vision*"] = {"enable": False}
478-
warnings.warn(
479-
"Please set the default input_mode to InputMode.LANGUAGE before quantizing."
480-
)
481481

482482
if not model_is_already_quantized or calibration_only:
483483
# Only run single sample for preview

0 commit comments

Comments
 (0)