Skip to content

Commit

Permalink
don't add position_ids for evals (axolotl-ai-cloud#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed Sep 16, 2023
1 parent cf8cb56 commit de2940f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/axolotl/utils/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,11 @@ def process_datasets_for_packing(cfg, train_dataset, eval_dataset):

if cfg.sample_packing:
train_dataset = train_dataset.map(add_position_ids, num_proc=os.cpu_count())
if eval_dataset:
eval_dataset = eval_dataset.map(
add_position_ids, num_proc=os.cpu_count()
)
if cfg.eval_sample_packing is not False:
if eval_dataset:
eval_dataset = eval_dataset.map(
add_position_ids, num_proc=os.cpu_count()
)
return train_dataset, eval_dataset


Expand Down

0 comments on commit de2940f

Please sign in to comment.