### System Info / 系統信息 torch==2.4.0 transformers==4.45.0 ### Who can help? / 谁可以帮助到您? _No response_ ### Information / 问题信息 - [X] The official example scripts / 官方的示例脚本 - [ ] My own modified scripts / 我自己修改的脚本和任务 ### Reproduction / 复现过程 #### Step1 升级到transformers到`4.45.0` #### Step2 运行如下代码: ``` python from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm3-6b", trust_remote_code=True) model = AutoModel.from_pretrained("THUDM/chatglm3-6b", trust_remote_code=True).half().cuda() model = model.eval() response, history = model.chat(tokenizer, "你好", history=[]) print(response) response, history = model.chat(tokenizer, "晚上睡不着应该怎么办", history=history) print(response) ``` #### Expected behavior / 期待表现 应该需要更新HF仓库中的:[ChatGLMTokenizer._pad](https://huggingface.co/THUDM/chatglm3-6b/blob/main/tokenization_chatglm.py#L267) 的参数