try to past test

This commit is contained in:
BUAADreamer
2024-09-10 13:12:51 +08:00
parent b0cff7d909
commit 7b4ba0efb6
4 changed files with 54 additions and 43 deletions

View File

@@ -108,7 +108,13 @@ def configure_visual_model(config: "PretrainedConfig") -> None:
Patches VLMs before loading them.
"""
model_type = getattr(config, "model_type", None)
if model_type in ["llava", "llava_next", "video_llava", "idefics2", "llava_next_video"]: # required for ds zero3 and valuehead models
if model_type in [
"llava",
"llava_next",
"video_llava",
"idefics2",
"llava_next_video",
]: # required for ds zero3 and valuehead models
setattr(config, "hidden_size", getattr(config.text_config, "hidden_size", None))
if getattr(config, "is_yi_vl_derived_model", None):