Update loader.py

This commit is contained in:
hoshi-hiyouga 2024-05-11 23:58:47 +08:00 committed by GitHub
parent bb2e6b0ea3
commit 5bfa8e4667
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -155,8 +155,7 @@ def load_model(
model.eval()
else:
model.train()
if model_args.visual_inputs:
model.vision_tower.requires_grad_(False)
trainable_params, all_param = count_parameters(model)
if is_trainable:
param_stats = "trainable params: {:d} || all params: {:d} || trainable%: {:.4f}".format(