From 3c81529f17d6382f3b1609f4276c5401b24115cc Mon Sep 17 00:00:00 2001 From: Travis Johnson Date: Wed, 10 Apr 2024 16:28:25 -0600 Subject: [PATCH] [Bugfix] handle hf_config with architectures == None (#3982) Signed-off-by: Travis Johnson Co-authored-by: Simon Mo --- vllm/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vllm/config.py b/vllm/config.py index 84746bd41c205..29deec03638e0 100644 --- a/vllm/config.py +++ b/vllm/config.py @@ -164,7 +164,9 @@ def _verify_load_format(self) -> None: # TODO: Remove this check once HF updates the pt weights of Mixtral. 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( "Currently, the 'pt' format is not supported for Mixtral. " "Please use the 'safetensors' format instead. ")