|
@@ -119,11 +119,9 @@ def get_quant_config(model_config: ModelConfig,
|
|
|
hf_quant_config = getattr(model_config.hf_config, "quantization_config",
|
|
|
None)
|
|
|
if hf_quant_config is None:
|
|
|
- compression_config = getattr(model_config.hf_config,
|
|
|
- "compression_config", None)
|
|
|
- if compression_config is not None:
|
|
|
- hf_quant_config = compression_config.get("quantization_config",
|
|
|
- None)
|
|
|
+ # compressed-tensors uses a compressions_config
|
|
|
+ hf_quant_config = getattr(model_config.hf_config, "compression_config",
|
|
|
+ None)
|
|
|
if hf_quant_config is not None:
|
|
|
return quant_cls.from_config(hf_quant_config)
|
|
|
# In case of bitsandbytes/QLoRA, get quant config from the adapter model.
|