Skip to content

Commit 2d98b37

Browse files
authored
Move phi4mm warning to above
Signed-off-by: Chenjie Luo <[email protected]>
1 parent 615f3c0 commit 2d98b37

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

examples/llm_ptq/hf_ptq.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ def main(args):
328328
model = model.language_model
329329
model_type = get_model_type(model)
330330

331+
if model_type == "phi4mm":
332+
warnings.warn(
333+
"Please set the default input_mode to InputMode.LANGUAGE before quantizing."
334+
)
335+
331336
if args.sparsity_fmt != "dense":
332337
if args.batch_size == 0:
333338
# Sparse algorithm takes more GPU memory so we reduce the batch_size by 4.
@@ -478,9 +483,6 @@ def main(args):
478483
quant_cfg["quant_cfg"]["*audio*"] = {"enable": False}
479484
quant_cfg["quant_cfg"]["*image*"] = {"enable": False}
480485
quant_cfg["quant_cfg"]["*vision*"] = {"enable": False}
481-
warnings.warn(
482-
"Please set the default input_mode to InputMode.LANGUAGE before quantizing."
483-
)
484486

485487
if not model_is_already_quantized or calibration_only:
486488
# Only run single sample for preview

0 commit comments

Comments
 (0)