If you are using local checkpoint (i.e., you are specifying a local model path instead of a huggingface url for xxxx.from_pretrained), then please pull the latest content from the corresponding huggingface model repo. You should see that either 1) there's a chat_template attribute in the tokenizer_config.json file, or 2) there's a chat_template.json file in your checkpoint folder.
Try upgrading the transformers library by python -m pip install --upgrade transformers.
If the error is still there after these two steps, feel free to open an issue and describe your specific case in detail.
chat_template
attribute in thetokenizer_config.json
file, or 2) there's achat_template.json
file in your checkpoint folder.python -m pip install --upgrade transformers
.If the error is still there after these two steps, feel free to open an issue and describe your specific case in detail.