PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度
fix ipex tqdm mismatch issue (#293)
wenhuach21487abd6f9f9f
diff --git a/README.md b/README.mdindex c622ba4b7..ca6abfa34 100644--- a/README.md+++ b/README.md@@ -54,7 +54,7 @@ pip install auto-round## Model Quantization-### Basic Usage ((Gaudi2/CPU/GPU))+### Basic Usage (Gaudi2/CPU/GPU)A user guide detailing the full list of supported arguments is provided by calling ```auto-round -h``` on the terminal.Alternatively, you can use ```auto_round``` instead of ```auto-round```.diff --git a/auto_round/auto_quantizer.py b/auto_round/auto_quantizer.pyindex 859481302..0cfbf0729 100644--- a/auto_round/auto_quantizer.py+++ b/auto_round/auto_quantizer.py@@ -582,9 +582,12 @@ class AutoRoundQuantizer(HfQuantizer):def cpu_post_init(self, model):dep_check = Truemessage = "Repacking to CPU format"+ layers = [] ## ipex post_init will add one more layer+ for n,m in model.named_modules():+ layers.append((n,m))- for n, layer in tqdm(model.named_modules(), desc=message, total=len(list(model.named_modules())),- leave=True): ##not exit correctly+ for n, layer in tqdm(layers, desc=message, total=len(layers),+ leave=True):if isinstance(layer, (qlinear_qbits.QuantLinear, qlinear_qbits_gptq.QuantLinear)):if dep_check:layer.req_check()