Skip to content

Commit 17439e6

Browse files
authored
Move phi4_mm warning to above (NVIDIA#389)
Signed-off-by: Chenjie Luo <[email protected]>
1 parent d8ef6f8 commit 17439e6

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
@@ -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

0 commit comments

Comments
 (0)