Former-commit-id: cd5a1a8b9c6eb59d6e95f79573f60ad8668f1942
This commit is contained in:
fzc8578
2025-01-10 20:27:06 +08:00
parent 25d4889789
commit e63c2df0b1
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")