Skip to content

PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度

remove fp32 conversion in exporting to autogptq (#123)

wenhuach2117024b16da5e
diff --git a/auto_round/export/export_to_autogptq.py b/auto_round/export/export_to_autogptq.py
index 73fcc50a9..06f4694b8 100644
--- a/auto_round/export/export_to_autogptq.py
+++ b/auto_round/export/export_to_autogptq.py
@@ -126,8 +126,7 @@ def save_quantized_as_autogptq(output_dir, use_triton=True, inplace=True, **kwar
info = weight_config[key]
if not check_to_quantized(info):
continue
- info["zp"] = info["zp"].to(torch.float32)
- quantizers[key] = (None, info["scale"].to(torch.float32), info["zp"], info["g_idx"])
+ quantizers[key] = (None, info["scale"], info["zp"], info["g_idx"])
pack_model(
compressed_model,
quantizers,