Skip to content

Commit

Permalink
mul lower by grad accum steps
Browse files Browse the repository at this point in the history
  • Loading branch information
bastiscode committed Jun 26, 2024
1 parent 72fdeb6 commit 82c11fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/text_utils/api/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ def __init__(
lower = self.cfg["train"]["data"]["batch_limit"]
if self.cfg["train"]["data"]["batch_limit_type"] != "batch_size":
lower = lower // self.cfg["train"]["data"]["max_length"]
lower = lower * self.gradient_accumulation_steps

self.log_interval = clamp(
self.training_items *
self.cfg["train"].get("log_interval", 0.001),
Expand Down

0 comments on commit 82c11fa

Please sign in to comment.