Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 0c1155f

Browse files
committed
minor changes for nits
1 parent 30afac5 commit 0c1155f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

torchchat/utils/quantize.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,6 @@ def dynamically_quantize_per_channel(
429429
max_val_pos = torch.max(-min_val_neg, max_val_pos)
430430
scales = max_val_pos / (float(quant_max - quant_min) / 2)
431431
# ensure scales is the same dtype as the original tensor
432-
433432
scales = torch.clamp(scales, min=eps).to(x.dtype)
434433
zero_points = torch.zeros(min_val_neg.size(), dtype=torch.int64, device=device)
435434
# quantize based on qmin/qmax/scales/zp
@@ -713,7 +712,7 @@ class WeightOnlyInt8QuantHandler(QuantHandler):
713712
def __init__(
714713
self,
715714
model: Optional[nn.Module] = None,
716-
device=None,
715+
device = None,
717716
precision=None,
718717
tokenizer=None,
719718
*,

0 commit comments

Comments
 (0)