Unverified Commit 934d3662 authored by Travis Johnson's avatar Travis Johnson Committed by GitHub
Browse files

[Bugfix] handle hf_config with architectures == None (#3982)


Signed-off-by: default avatarTravis Johnson <tsjohnso@us.ibm.com>
Co-authored-by: default avatarSimon Mo <simon.mo@hey.com>
parent 92cd2e2f
...@@ -158,7 +158,9 @@ class ModelConfig: ...@@ -158,7 +158,9 @@ class ModelConfig:
# TODO: Remove this check once HF updates the pt weights of Mixtral. # TODO: Remove this check once HF updates the pt weights of Mixtral.
architectures = getattr(self.hf_config, "architectures", []) architectures = getattr(self.hf_config, "architectures", [])
if "MixtralForCausalLM" in architectures and load_format == "pt": # architectures can be None instead of []
if architectures and "MixtralForCausalLM" in architectures \
and load_format == "pt":
raise ValueError( raise ValueError(
"Currently, the 'pt' format is not supported for Mixtral. " "Currently, the 'pt' format is not supported for Mixtral. "
"Please use the 'safetensors' format instead. ") "Please use the 'safetensors' format instead. ")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment