Skip to content

Commit

Permalink
clean up InvSqrtWithWarmup
Browse files Browse the repository at this point in the history
  • Loading branch information
epwalsh committed Aug 3, 2023
1 parent e167b7d commit c157fca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion olmo/optim.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_lr(self, initial_lr: float, step: int, max_steps: int) -> float:
if step < self.warmup_steps:
return self._linear_warmup(initial_lr, step, self.warmup_steps)
del max_steps
return initial_lr * sqrt(self.warmup_steps) / sqrt(max(self.warmup_steps, step))
return initial_lr * sqrt(self.warmup_steps / max(self.warmup_steps, step))


@dataclass
Expand Down

0 comments on commit c157fca

Please sign in to comment.