Skip to content

Commit e4e4f86

Browse files
committed
fix grad norm fsdp
1 parent 1531aa5 commit e4e4f86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

open_diloco/train_fsdp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def scheduler_fn(opt):
402402
else:
403403
scaler.unscale_(optimizer=optimizer)
404404

405-
torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0) # gradient clipping
405+
model.clip_grad_norm_(1.0) # gradient clipping
406406

407407
if world_messenger_hv:
408408
optimizer.step(scaler=scaler)

0 commit comments

Comments
 (0)