-
Notifications
You must be signed in to change notification settings - Fork 442
Description
Traceback (most recent call last):
File "C:\Users\admin\PycharmProjects\PythonProject5\VL_test.py", line 22, in
prompt = llava_processor.tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
File "C:\Users\admin\PycharmProjects\PythonProject5.venv\Lib\site-packages\transformers\tokenization_utils_base.py", line 1629, in apply_chat_template
chat_template = self.get_chat_template(chat_template, tools)
File "C:\Users\admin\PycharmProjects\PythonProject5.venv\Lib\site-packages\transformers\tokenization_utils_base.py", line 1805, in get_chat_template
raise ValueError(
...<4 lines>...
)
ValueError: Cannot use chat template functions because tokenizer.chat_template is not set and no template argument was passed! For information about writing templates and setting the tokenizer.chat_template attribute, please see the documentation at https://huggingface.co/docs/transformers/main/en/chat_templating
请问如何解决这个问题。