Skip to content

Commit 6dec1b7

Browse files
committed
Configurable gradient clipping to avoid exploding gradients
1 parent 605deb8 commit 6dec1b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/electrai/entrypoints/train.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def train(args):
9393
precision=cfg.model_precision,
9494
log_every_n_steps=10,
9595
profiler=profiler,
96+
gradient_clip_val=getattr(cfg, "gradient_clip_value", 1.0),
9697
)
9798

9899
# -----------------------------

0 commit comments

Comments
 (0)