Skip to content

Commit

Permalink
Remove quantization related config from dequantized model (#34856)
Browse files Browse the repository at this point in the history
* Remove quantization related config from dequantized model

* Fix whitespace
  • Loading branch information
konradkalita authored Nov 22, 2024
1 parent 1867be6 commit d9e6f30
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/transformers/quantizers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d9e6f30

Please sign in to comment.