Fix internvl fp16 error (#13205)

This commit is contained in:
Wang, Jian4 2025-06-05 11:17:44 +08:00 committed by GitHub
parent 45864790f7
commit 5a1c1297e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,