Skip to content

Commit

Permalink
removing grad clip
Browse files Browse the repository at this point in the history
  • Loading branch information
SalmanMohammadi committed Feb 6, 2025
1 parent eef1b01 commit 46c59ec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/recipes/test_full_dpo_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def _get_test_config_overrides(self, dtype_str: str = "fp32", epochs: int = 2):
"optimizer=torch.optim.AdamW",
"optimizer.lr=2e-6",
"log_every_n_steps=1",
"gradient_accumulation_steps=4",
"tokenizer.max_seq_len=256",
] + dummy_stack_exchange_dataset_config()

Expand Down Expand Up @@ -98,7 +97,7 @@ def test_training_state_on_resume(self, tmpdir, monkeypatch, optimizer_in_bwd):

cmd_1 = cmd_1 + self._get_test_config_overrides() + model_config
if not optimizer_in_bwd:
cmd_1 += ["clip_grad_norm=100"]
cmd_1 += ["gradient_accumulation_steps=4"]

monkeypatch.setattr(sys, "argv", cmd_1)
# with pytest.raises(SystemExit, match=""):
Expand Down

0 comments on commit 46c59ec

Please sign in to comment.