# About training data pre-processing

**URL:** <https://discuss.huggingface.co/t/about-training-data-pre-processing/32856>\
**Category:** Beginners\
**Created:** [March 2, 2023, 2:40am UTC](https://discuss.huggingface.co/t/about-training-data-pre-processing/32856 "2023-03-02T02:40:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jyang18](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@jyang18](https://discuss.huggingface.co/u/jyang18)\
**Post date:** [March 2, 2023, 2:40am UTC](https://discuss.huggingface.co/t/about-training-data-pre-processing/32856/1 "2023-03-02T02:40:55Z")

</div>

Hello

I have a dataset with different lengths for each piece of data, and when I Tokenizer it, the lengths of each piece are different. When I feed the tokenized data into the GPT-2 model for training, an error occurs.

Do I have the same length of data for the final GPT-2 model to be trained?

Thanks.
