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 f1f2304 commit 2763f81Copy full SHA for 2763f81
src/compressed_tensors/quantization/quant_args.py
@@ -427,7 +427,7 @@ def round_to_quantized_type_dtype(
427
rounded = torch.clamp(tensor, finfo.min, finfo.max).to(dtype)
428
else:
429
iinfo = torch.iinfo(dtype)
430
- rounded = torch.round(torch.clamp(tensor, iinfo.min, iinfo.max))
+ rounded = torch.round(torch.clamp(tensor, iinfo.min, iinfo.max)).to(dtype)
431
432
if cast_to_original_dtype:
433
return rounded.to(original_dtype)
0 commit comments