Skip to content

Commit

Permalink
need to add back drop_last for sampler (#1676)
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian authored May 31, 2024
1 parent d4f6c65 commit 05b0bd0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/axolotl/core/trainer_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ def _get_train_sampler(self) -> Optional[torch.utils.data.Sampler]:
batch_size=batch_size,
group_size=self.args.sample_packing_group_size,
bin_size=self.args.sample_packing_bin_size,
drop_last=True,
)
if self.args.curriculum_sampling:
return SequentialSampler(self.train_dataset)
Expand All @@ -408,6 +409,7 @@ def _get_eval_sampler(
batch_size=batch_size,
group_size=self.args.sample_packing_group_size,
bin_size=self.args.sample_packing_bin_size,
drop_last=True,
)
return super()._get_eval_sampler(eval_dataset)

Expand Down

0 comments on commit 05b0bd0

Please sign in to comment.