Skip to content

Commit

Permalink
Update model_compressor.py (vllm-project#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbogunowicz authored Jul 3, 2024
1 parent cff8a10 commit b341803
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compressed_tensors/compressors/model_compressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class ModelCompressor:
def from_pretrained(
cls,
pretrained_model_name_or_path: str,
**kwargs,
) -> Optional["ModelCompressor"]:
"""
Given a path to a model config, extract the sparsity and/or quantization
Expand All @@ -89,7 +90,7 @@ def from_pretrained(
:param pretrained_model_name_or_path: path to model config on disk or HF hub
:return: compressor for the extracted configs
"""
config = AutoConfig.from_pretrained(pretrained_model_name_or_path)
config = AutoConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)
compression_config = getattr(config, COMPRESSION_CONFIG_NAME, None)
return cls.from_compression_config(compression_config)

Expand Down

0 comments on commit b341803

Please sign in to comment.