[Bugfix] Remove assertion for NVFP4 scale dynamic range (#37465)

Signed-off-by: Michael Goin <mgoin64@gmail.com>
This commit is contained in:
Michael Goin
2026-03-18 23:37:49 +01:00
committed by GitHub
parent 5bc1da147f
commit 9482b0b085

View File

@@ -37,9 +37,6 @@ def _nvfp4_compute_scale_factor(marlin_scales: torch.Tensor) -> float:
min_val = ws_float[nonzero_mask].min()
if min_val < 2:
sf = (2 / min_val).log2().ceil().exp2()
assert (ws_float[nonzero_mask] * sf <= 448 * (2**7)).all(), (
"NVFP4 scale dynamic range too large for rescaling"
)
return sf.item()
return 1.0