File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/llmcompressor/modifiers/awq Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2323from huggingface_hub import load_state_dict_from_file , snapshot_download
2424
2525
26- def is_autoawq_model (model_path : Path ) -> bool :
27- config = transformers .AutoConfig .from_pretrained (model_path , trust_remote_code = True )
26+ def is_autoawq_model (model_path : Path , trust_remote_code : bool = False ) -> bool :
27+ config = transformers .AutoConfig .from_pretrained (model_path , trust_remote_code = trust_remote_code )
2828 if not hasattr (config , "quantization_config" ):
2929 return False
3030
@@ -163,7 +163,7 @@ def convert_and_save(
163163 )
164164
165165 model_path = resolve_model_path (model_name_or_path )
166- if not is_autoawq_model (model_path ):
166+ if not is_autoawq_model (model_path , trust_remote_code ):
167167 raise ValueError ("Model is not an AutoAWQ model" )
168168
169169 config = transformers .AutoConfig .from_pretrained (
You can’t perform that action at this time.
0 commit comments