# BatchSampler - with trainer

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbatchsampler-with-trainer%2F47470%3E%5C
**Category:** Beginners\
**Created:** [July 20, 2023, 11:16am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbatchsampler-with-trainer%2F47470 "2023-07-20T11:16:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul1020](https://avatars.discourse-cdn.com/v4/letter/p/c37758/32.png) [@Paul1020](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FPaul1020)%5C
**Post date:** [July 20, 2023, 11:16am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbatchsampler-with-trainer%2F47470%2F1 "2023-07-20T11:16:16Z")

</div>

I am trying to use Transformers Trainer and I want to generate batches and not single items.

I need that in order to generate batches of different sizes without doing padding.  
Is that possible to do with the implemented trainer ?
