Skip to content

Commit 7310346

Browse files
committed
minor
Signed-off-by: Suguna Velury <[email protected]>
1 parent 5fcef97 commit 7310346

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
@@ -271,13 +271,9 @@ def get_weight_scaling_factor(module: nn.Module, weight_name: str = "weight") ->
271271
QUANTIZATION_W4A8_NVFP4_FP8,
272272
]:
273273
if hasattr(weight_quantizer, "_scale"):
274-
# In this case, weight must be a QTensorWrapper
275-
original_shape = weight.metadata["shape"]
276-
ws = NVFP4QTensor.get_modelopt_weights_scaling_factor(
277-
weight_quantizer._scale, original_shape
274+
return NVFP4QTensor.get_modelopt_weights_scaling_factor(
275+
weight_quantizer._scale, weight.metadata["shape"]
278276
)
279-
print(f"weight_quantizer._scale: {ws.shape}")
280-
return ws
281277

282278
return NVFP4QTensor.get_weights_scaling_factor(
283279
weight,

0 commit comments

Comments
 (0)