Skip to content

Commit 4c45d10

Browse files
committed
fix bug
Signed-off-by: n1ck-guo <heng.guo@intel.com>
1 parent 09ccf3c commit 4c45d10

File tree

1 file changed

+1
-1
lines changed
  • neural_compressor/adaptor/torch_utils

1 file changed

+1
-1
lines changed

neural_compressor/adaptor/torch_utils/gptq.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ def tmp(_, inp, out):
745745
for j in range(len(self.dataloader)):
746746
cache_keyword_batch = self.gather_single_batch_from_dict(self.cache_key_arguments, j)
747747
cache_positional_batch = self.gather_single_batch_from_list(self.cache_positional_arguments, j)
748+
transformer_block.to(cache_positional_batch[0].dtype)
748749
out = transformer_block(*cache_positional_batch, **cache_keyword_batch)
749750
out = self.track_hidden_states(out)
750751
outs.append(out)
@@ -967,7 +968,6 @@ def fasterquant(self, W, blocksize=128, percdamp=0.01, groupsize=-1, act_order=F
967968
if not static_groups:
968969
if (i1 + i) % groupsize == 0:
969970
self.quantizer.find_params(W[:, (i1 + i) : (i1 + i + groupsize)], weight=True)
970-
scale.append(self.quantizer.scale)
971971
zero.append(self.quantizer.zero)
972972
else:
973973
idx = i1 + i

0 commit comments

Comments
 (0)