From 1ef4a0ea9b7f19d6891f811d622ab1b11837c85c Mon Sep 17 00:00:00 2001 From: weimingc <17592131+meenchen@users.noreply.github.com> Date: Mon, 22 Dec 2025 23:17:40 +0000 Subject: [PATCH] fix awq export Signed-off-by: weimingc <17592131+meenchen@users.noreply.github.com> --- modelopt/torch/export/unified_export_hf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modelopt/torch/export/unified_export_hf.py b/modelopt/torch/export/unified_export_hf.py index ccfc01200..1dd1c1822 100644 --- a/modelopt/torch/export/unified_export_hf.py +++ b/modelopt/torch/export/unified_export_hf.py @@ -117,7 +117,9 @@ def _output_hook(module, input, output): module_names.add(name) # For MoE models update pre_quant_scale to average pre_quant_scale amongst experts - if is_moe(module) and ("awq" in quantization_format): + if is_moe(module) and ( + quantization_format is not QUANTIZATION_NONE and "awq" in quantization_format + ): # update_experts_avg_prequant_scale(module) grouped_experts = get_experts_list(module, model_type) for modules in grouped_experts: