Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed export
Signed-off-by: yiliu30 <[email protected]>
  • Loading branch information
yiliu30 committed Jul 11, 2024
commit e508c942a63bd323be0d0ff1f120c408da9af83e
6 changes: 5 additions & 1 deletion neural_compressor/torch/algorithms/weight_only/teq.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,11 @@ def quantize(self, **kwargs):
weight = m.weight.detach()
if isinstance(m, torch.nn.Linear): # pragma: no cover
int_weight, scale, zp = quant_tensor(
weight.data, num_bits=num_bits, group_size=group_size, scheme=scheme
weight.data,
num_bits=num_bits,
group_size=group_size,
scheme=scheme,
return_int=True,
)
int_weight = int_weight.t_().contiguous() if transpose else int_weight
scale = scale.t_().contiguous() if transpose else scale
Expand Down