Skip to content

Commit f83f934

Browse files
committed
minor
Signed-off-by: Suguna Velury <[email protected]>
1 parent 33fdcf3 commit f83f934

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

modelopt/torch/export/quant_utils.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,9 @@ def get_weight_scaling_factor(module: nn.Module, weight_name: str = "weight") ->
270270
QUANTIZATION_W4A8_NVFP4_FP8,
271271
]:
272272
if hasattr(weight_quantizer, "_scale"):
273-
# In this case, weight must be a QTensorWrapper
274-
original_shape = weight.metadata["shape"]
275-
ws = NVFP4QTensor.get_modelopt_weights_scaling_factor(
276-
weight_quantizer._scale, original_shape
273+
return NVFP4QTensor.get_modelopt_weights_scaling_factor(
274+
weight_quantizer._scale, weight.metadata["shape"]
277275
)
278-
print(f"weight_quantizer._scale: {ws.shape}")
279-
return ws
280276

281277
return NVFP4QTensor.get_weights_scaling_factor(
282278
weight,

0 commit comments

Comments
 (0)