Skip to content

Commit 6f9adf6

Browse files
committed
handle text config
Signed-off-by: Isotr0py <2037008807@qq.com>
1 parent c0c86c2 commit 6f9adf6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vllm/model_executor/model_loader/loader.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,6 +1328,14 @@ def download_model(self, model_config: ModelConfig) -> None:
13281328
def load_model(self, vllm_config: VllmConfig) -> nn.Module:
13291329
device_config = vllm_config.device_config
13301330
model_config = vllm_config.model_config
1331+
1332+
# GGUF hasn't supported multimodal models yet, we need to
1333+
# extract text_config to only initialize the llm backbone
1334+
architectures = model_config.hf_config.architectures
1335+
vllm_config.model_config.hf_config = (
1336+
vllm_config.model_config.hf_text_config)
1337+
vllm_config.model_config.hf_config.architectures = architectures
1338+
13311339
local_model_path = self._prepare_weights(model_config.model)
13321340
gguf_weights_map = self._get_gguf_weights_map(model_config)
13331341
# we can only know if tie word embeddings after mapping weights

0 commit comments

Comments
 (0)