This commit is contained in:
fzc8578
2025-01-10 20:27:06 +08:00
parent 84026be06e
commit 2ee8ba2f39
5 changed files with 51 additions and 47 deletions

View File

@@ -142,7 +142,7 @@ def get_forbidden_modules(config: "PretrainedConfig", finetuning_args: "Finetuni
forbidden_modules.update({"visual.patch_embed", "visual.blocks", "model", "lm_head"})
elif finetuning_args.freeze_vision_tower:
forbidden_modules.add("visual")
elif model_type == "minicpmv":
if finetuning_args.freeze_vision_tower:
forbidden_modules.add("vpm")