Skip to content

Commit b341803

Browse files
authored
Update model_compressor.py (#104)
1 parent cff8a10 commit b341803

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compressed_tensors/compressors/model_compressor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class ModelCompressor:
8181
def from_pretrained(
8282
cls,
8383
pretrained_model_name_or_path: str,
84+
**kwargs,
8485
) -> Optional["ModelCompressor"]:
8586
"""
8687
Given a path to a model config, extract the sparsity and/or quantization
@@ -89,7 +90,7 @@ def from_pretrained(
8990
:param pretrained_model_name_or_path: path to model config on disk or HF hub
9091
:return: compressor for the extracted configs
9192
"""
92-
config = AutoConfig.from_pretrained(pretrained_model_name_or_path)
93+
config = AutoConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)
9394
compression_config = getattr(config, COMPRESSION_CONFIG_NAME, None)
9495
return cls.from_compression_config(compression_config)
9596

0 commit comments

Comments
 (0)