We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 047748a commit e9a81f4Copy full SHA for e9a81f4
src/compressed_tensors/quantization/utils/helpers.py
@@ -80,7 +80,7 @@ def calculate_qparams(
80
zero_points = torch.zeros(scales.shape, device=device, dtype=min_vals.dtype)
81
else:
82
scales = (max_vals - min_vals) / float(bit_range)
83
- scales = torch.clamp(scales, min=1e-5)
+ scales = torch.clamp(scales, min=torch.finfo(torch.float32).eps)
84
zero_points = bit_min - (min_vals / scales)
85
zero_points = torch.clamp(torch.round(zero_points), bit_min, bit_max)
86
0 commit comments