Skip to content

Commit fac8927

Browse files
committed
update
Signed-off-by: Zhiyu Cheng <zhiyuc@nvidia.com>
1 parent 011a2a6 commit fac8927

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

examples/llm_ptq/hf_ptq.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -966,13 +966,7 @@ def quantize_main(
966966
if mtp_layer_prefixes:
967967
quant_cfg = copy.deepcopy(quant_cfg)
968968
for prefix in mtp_layer_prefixes:
969-
parts = prefix.split(".")
970-
if len(parts) >= 2:
971-
# Multi-component prefix (e.g., "mtp.layers.0" -> "*layers.0*")
972-
pattern = f"*{parts[-2]}.{parts[-1]}*"
973-
else:
974-
# Single-component prefix (e.g., "mtp" -> "*mtp*")
975-
pattern = f"*{prefix}*"
969+
pattern = f"*{prefix}*"
976970
quant_cfg["quant_cfg"][pattern] = {"enable": False}
977971
print(f"Excluding MTP layer from quantization: {pattern}")
978972

0 commit comments

Comments
 (0)