[Bugfix] handle hf_config with architectures == None (#3982)
Signed-off-by: Travis Johnson <tsjohnso@us.ibm.com> Co-authored-by: Simon Mo <simon.mo@hey.com>
This commit is contained in:
parent
92cd2e2f21
commit
934d3662f7
@ -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. ")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user