try to past test

Former-commit-id: 3b6bfae0e5fe795a70d530b2765f27d95c5862f8
This commit is contained in:
BUAADreamer
2024-09-10 13:12:51 +08:00
parent 66b870fd08
commit 514f976cc1
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):