Skip to content

Commit

Permalink
Fix final value of exponential decay lr (#1040)
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin-Anthony committed Sep 23, 2023
1 parent 390d37c commit e431ff5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configs/neox_arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Logging Arguments

- **git_hash**: str

Default = aa6c176
Default = 1f832c1

current git hash of repository

Expand Down
3 changes: 2 additions & 1 deletion megatron/learning_rates.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def get_lr(self):
)
elif self.decay_style == "exponential":
# exp(-0.693) = 1/2
lr = self.start_lr * math.exp(-0.693 * num_iters_ / self.end_iter)
end_iter = self.end_iter - self.warmup_iter
lr = self.start_lr * math.exp(-0.693 * num_iters_ / end_iter)
else:
lr = self.start_lr
return max(lr, self.min_lr)
Expand Down

0 comments on commit e431ff5

Please sign in to comment.