You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
请问如何解决这个问题。
The text was updated successfully, but these errors were encountered:
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
请问如何解决这个问题。
The text was updated successfully, but these errors were encountered: