Update `PreTrainedTokenizerBase` to check/handle batch length for `text_pair` parameter (#11486)
Update `PreTrainedTokenizerBase` to check/handle batch length for `text_pair` parameter (#11486)

* Update tokenization_utils_base.py

* add assertion

* check batch len

* Update src/transformers/tokenization_utils_base.py

Co-authored-by: Sylvain Gugger <222c4d44cc8ec39802c192ed0aa3f97cdb77ff4e@users.noreply.github.com>

* add error message

Co-authored-by: Sylvain Gugger <222c4d44cc8ec39802c192ed0aa3f97cdb77ff4e@users.noreply.github.com>
huggingface/transformers,huggingface/transformers,huggingface/pytorch-transformers,huggingface/transformers,huggingface/transformers