# Need clarity on "padding" parameter in Bert Tokenizer

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fneed-clarity-on-padding-parameter-in-bert-tokenizer%2F27444%3E%5C
**Category:** 🤗Tokenizers\
**Created:** [December 8, 2022, 7:37am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fneed-clarity-on-padding-parameter-in-bert-tokenizer%2F27444 "2022-12-08T07:37:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shivammavihs](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@shivammavihs](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fshivammavihs)%5C
**Post date:** [December 8, 2022, 7:37am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fneed-clarity-on-padding-parameter-in-bert-tokenizer%2F27444%2F1 "2022-12-08T07:37:17Z")

</div>

Hi All,

I have been fine tuning a **BERT** model for sentence classification. In training, while tokenization I had passed these parameters `padding="max_length", truncation=True, max_length=150` but while inferencing it is still predicting even if `padding="max_length"` parameter is not being passed.

Surprisingly, predictions are same in both the cases when `padding="max_length"` is passed or not but if `padding="max_length"` is not being passed, inferencing is much faster.

So, I need some clarity on the parameter “padding” in Bert Tokenizer. Can someone help me to understand how bert is able to predict even without the padding since the length of the sentences will differ and does it have any negative consequences If `padding="max_length"` is not passed while inferencing? Any help would be highly appreciated.

Thanks
