Skip to content

Commit

Permalink
add back packing efficiency estimate so epochs and multi-gpu works pr…
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian authored Jun 8, 2024
1 parent 00ac302 commit ed8ef65
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 @@ -387,6 +387,7 @@ def _get_train_sampler(self) -> Optional[torch.utils.data.Sampler]:
return MultipackBatchSampler(
RandomSampler(self.train_dataset),
lengths=get_dataset_lengths(self.train_dataset),
packing_efficiency_estimate=self.args.sample_packing_efficiency,
batch_max_len=batch_max_len,
batch_size=batch_size,
group_size=self.args.sample_packing_group_size,
Expand All @@ -412,6 +413,7 @@ def _get_eval_sampler(
return MultipackBatchSampler(
SequentialSampler(eval_dataset),
lengths=get_dataset_lengths(self.eval_dataset),
packing_efficiency_estimate=self.args.sample_packing_efficiency,
batch_max_len=batch_max_len,
batch_size=batch_size,
group_size=self.args.sample_packing_group_size,
Expand Down

0 comments on commit ed8ef65

Please sign in to comment.