Skip to content

Commit

Permalink
Enable loss average across devices
Browse files Browse the repository at this point in the history
  • Loading branch information
chiragjn committed Oct 30, 2024
1 parent 930e1d3 commit 811833d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/axolotl/core/trainer_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ def build(self, total_num_steps):
else max(min(int(0.005 * total_num_steps), 10), 1)
)

training_arguments_kwargs = {}
training_arguments_kwargs = {"average_tokens_across_devices": True}
if self.cfg.bf16 == "full":
training_arguments_kwargs["bf16_full_eval"] = True
else:
Expand Down Expand Up @@ -1808,7 +1808,7 @@ def get_post_trainer_create_callbacks(self, trainer):
return callbacks

def build_training_arguments(self, total_num_steps):
training_args_kwargs = {}
training_args_kwargs = {"average_tokens_across_devices": True}
for arg in [
"adam_beta1",
"adam_beta2",
Expand Down

0 comments on commit 811833d

Please sign in to comment.