Skip to content

Commit

Permalink
Increase the number of dataloader workers
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Normandin <normandf@mila.quebec>
  • Loading branch information
lebrice committed Nov 8, 2024
1 parent 9b282dc commit 159de06
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions project/algorithms/llm_finetuning_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ def train_dataloader(self):
self.train_dataset,
shuffle=True,
collate_fn=default_data_collator,
num_workers=self.dataset_config.preprocessing_num_workers,
batch_size=self.dataset_config.per_device_train_batch_size,
)

Expand All @@ -414,6 +415,7 @@ def val_dataloader(self):
return DataLoader(
self.valid_dataset,
collate_fn=default_data_collator,
num_workers=self.dataset_config.preprocessing_num_workers,
batch_size=self.dataset_config.per_device_eval_batch_size,
)

Expand Down

0 comments on commit 159de06

Please sign in to comment.