Skip to content

Commit

Permalink
fix compatible with auto-gptq
Browse files Browse the repository at this point in the history
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
  • Loading branch information
jiqing-feng committed Dec 2, 2024
1 parent 4709869 commit 32d434f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion optimum/gptq/quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,10 @@ def tmp(_, input, output):
h.remove()
for name in subset_name_list:
logger.info(f"Quantizing {name} in block {i + 1}/{len(blocks)}...")
scale, zero, g_idx, _, _, _ = gptq[name].fasterquant(
quant_outputs = gptq[name].fasterquant(
percdamp=self.damp_percent, group_size=self.group_size, actorder=self.desc_act
)
scale, zero, g_idx = quant_outputs[0], quant_outputs[1], quant_outputs[2]
quantizers[f"{self.block_name_to_quantize}.{i}.{name}"] = (
gptq[name].quantizer,
scale,
Expand Down

0 comments on commit 32d434f

Please sign in to comment.