Skip to content

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

fix scale dtype (#1207)

Wenhua Chengf670a25ae72c
diff --git a/auto_round/formats.py b/auto_round/formats.py
index 901b4411c..77dcce458 100644
--- a/auto_round/formats.py
+++ b/auto_round/formats.py
@@ -115,7 +115,7 @@ def get_formats(
formats = [fmt for fmt in formats if fmt is not None]
- if len(formats) == 1 and formats[0].is_gguf and ar.scale_dtype != torch.float32:
+ if len(formats) == 1 and formats[0].is_gguf() and ar.scale_dtype != torch.float32:
ar.scale_dtype = torch.float32
logger.info("change `scale_dtype` to `torch.float32` for gguf format")