Skip to content

Commit 05270f8

Browse files
committed
update layers to ignore
1 parent 485781c commit 05270f8

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

tests/test_grpo_trainer.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,6 @@ def reward_func(completions, **kwargs):
12911291
"model.vision_tower.",
12921292
"model.multi_modal_projector.",
12931293
"model.vision_model.",
1294-
"model.connector.modality_projection.",
12951294
"model.visual.",
12961295
"model.image_newline",
12971296
)
@@ -1587,17 +1586,7 @@ def reward_func(completions, **kwargs):
15871586
# Check that the params have changed
15881587
# Because of the way the tiny models are initialized, the gradient does not flow properly through the
15891588
# vision parts of the model, so we skip them. Ideally, we should fix the init of these models.
1590-
params_to_skip = (
1591-
# "model.vision_tower.",
1592-
# "model.multi_modal_projector.",
1593-
# "model.vision_model.",
1594-
# "model.connector.modality_projection.",
1595-
# "model.visual.",
1596-
# "model.image_newline",
1597-
)
15981589
for n, param in previous_trainable_params.items():
1599-
if n.startswith(params_to_skip):
1600-
continue
16011590
new_param = trainer.model.get_parameter(n)
16021591
self.assertFalse(torch.equal(param, new_param), f"Parameter {n} has not changed.")
16031592

tests/test_rloo_trainer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,6 @@ def reward_func(completions, **kwargs):
11211121
params_to_skip = (
11221122
"model.vision_tower.",
11231123
"model.multi_modal_projector.",
1124-
"model.vision_model.",
1125-
"model.connector.modality_projection.",
11261124
"model.visual.",
11271125
"model.image_newline",
11281126
)

0 commit comments

Comments
 (0)