# Does Trainer use multiple workers on datasets?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdoes-trainer-use-multiple-workers-on-datasets%2F46694%3E%5C
**Category:** 🤗Transformers\
**Created:** [July 13, 2023, 2:04pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdoes-trainer-use-multiple-workers-on-datasets%2F46694 "2023-07-13T14:04:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oran-sh](https://avatars.discourse-cdn.com/v4/letter/o/a4c791/32.png) [@oran-sh](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Foran-sh)%5C
**Post date:** [July 13, 2023, 2:04pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdoes-trainer-use-multiple-workers-on-datasets%2F46694%2F1 "2023-07-13T14:04:48Z")

</div>

Hey,  
when using trainer with a hugging face dataset, does it use multiple workers and prefetching when loading batches (as can be done with torch.DataLoader)?  
This can extremely effect training time. Is there a way to prefetch data so that it won’t be a bottleneck for training?

Thanks
