compatible for transformers >=4.45.0

#112

File "../run.py", line 224, in parse_input
input_ids = tokenizer.encode(curr_text,
File "/home/pt201/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 2788, in encode
encoded_inputs = self.encode_plus(
File "/home/pt201/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 3207, in encode_plus
return self._encode_plus(
File "/home/pt201/lib/python3.8/site-packages/transformers/tokenization_utils.py", line 804, in _encode_plus
return self.prepare_for_model(
File "/home/pt201/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 3704, in prepare_for_model
encoded_inputs = self.pad(
File "/home/pt201/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 3506, in pad
encoded_inputs = self._pad(
TypeError: _pad() got an unexpected keyword argument 'padding_side'

compatible for transformers >=4.45.0

lqf changed pull request title from Upload tokenization_chatglm.py to compatible for transformers >=4.45.0

PTAL, thanks!@yuxiaod

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment