From 5a1c1297e1e3fff4c3aabf241d0efbc0616fdaa9 Mon Sep 17 00:00:00 2001 From: "Wang, Jian4" <61138589+hzjane@users.noreply.github.com> Date: Thu, 5 Jun 2025 11:17:44 +0800 Subject: [PATCH] Fix internvl fp16 error (#13205) --- python/llm/src/ipex_llm/vllm/xpu/model_convert.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/llm/src/ipex_llm/vllm/xpu/model_convert.py b/python/llm/src/ipex_llm/vllm/xpu/model_convert.py index 2d5418b9..8c3c8f65 100644 --- a/python/llm/src/ipex_llm/vllm/xpu/model_convert.py +++ b/python/llm/src/ipex_llm/vllm/xpu/model_convert.py @@ -133,7 +133,11 @@ def get_load_function(low_bit): modules = ["vision_encoder", "embed_tokens_extend"] if low_bit == "fp16": # to fix qwen2.5-vl and glm-4v - modules = ["vision", "visual"] + if modules is None: + modules = ["vision", "visual"] + else: + modules.append("vision") + modules.append("visual") optimize_model(self.model, low_bit=low_bit, torch_dtype=self.vllm_config.model_config.dtype,