winglian commited on
Commit
05b0bd0
·
unverified ·
1 Parent(s): d4f6c65

need to add back drop_last for sampler (#1676)

Browse files
src/axolotl/core/trainer_builder.py CHANGED
@@ -384,6 +384,7 @@ class AxolotlTrainer(Trainer):
384
  batch_size=batch_size,
385
  group_size=self.args.sample_packing_group_size,
386
  bin_size=self.args.sample_packing_bin_size,
 
387
  )
388
  if self.args.curriculum_sampling:
389
  return SequentialSampler(self.train_dataset)
@@ -408,6 +409,7 @@ class AxolotlTrainer(Trainer):
408
  batch_size=batch_size,
409
  group_size=self.args.sample_packing_group_size,
410
  bin_size=self.args.sample_packing_bin_size,
 
411
  )
412
  return super()._get_eval_sampler(eval_dataset)
413
 
 
384
  batch_size=batch_size,
385
  group_size=self.args.sample_packing_group_size,
386
  bin_size=self.args.sample_packing_bin_size,
387
+ drop_last=True,
388
  )
389
  if self.args.curriculum_sampling:
390
  return SequentialSampler(self.train_dataset)
 
409
  batch_size=batch_size,
410
  group_size=self.args.sample_packing_group_size,
411
  bin_size=self.args.sample_packing_bin_size,
412
+ drop_last=True,
413
  )
414
  return super()._get_eval_sampler(eval_dataset)
415