-
Notifications
You must be signed in to change notification settings - Fork 247
Open
Description
我在https://github.com/hiyouga/EasyR1/blob/main/verl/workers/fsdp_workers.py#L239 之后加了这样的代码,不知道对不对?
if model_config.freeze_language_backbone:
model.requires_grad_(False)
if not model_config.freeze_vision_tower:
if hasattr(model, "model") and hasattr(model.model, "visual"):
model.model.visual.requires_grad_(True)
elif hasattr(model, "visual"):
model.visual.requires_grad_(True)
if hasattr(model, "model") and hasattr(model.model, "mm_projector"):
model.model.mm_projector.requires_grad_(True)
if hasattr(model, "lm_head"):
model.lm_head.requires_grad_(True)
fsdp_config.use_orig_params = True
self.print_rank0("Language backbone is frozen. Only specified layers are trainable.")
Metadata
Metadata
Assignees
Labels
No labels