From d9e6f307e71b5108a7882ec00ffcc0d0eb316cb7 Mon Sep 17 00:00:00 2001 From: Konrad Kalita Date: Fri, 22 Nov 2024 10:06:29 +0100 Subject: [PATCH] Remove quantization related config from dequantized model (#34856) * Remove quantization related config from dequantized model * Fix whitespace --- src/transformers/quantizers/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/transformers/quantizers/base.py b/src/transformers/quantizers/base.py index 015c0015cf7e7b..e3236ab8f0fb09 100755 --- a/src/transformers/quantizers/base.py +++ b/src/transformers/quantizers/base.py @@ -215,6 +215,9 @@ def dequantize(self, model): # Delete quantizer and quantization config del model.hf_quantizer + del model.config.quantization_config + del model.config._pre_quantization_dtype + model.is_quantized = False return model