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 "/home/paperspace/Ahmer/privatellm/src/2.py", line 50, in <module>
ai_msg = hf_text_model.invoke(messages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperspace/.virtualenvs/privatellm/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", line 286, in invoke
self.generate_prompt(
File "/home/paperspace/.virtualenvs/privatellm/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", line 786, in generate_prompt
return self.generate(prompt_messages, stop=stop, callbacks=callbacks, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperspace/.virtualenvs/privatellm/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", line 643, in generate
raise e
File "/home/paperspace/.virtualenvs/privatellm/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", line 633, in generate
self._generate_with_cache(
File "/home/paperspace/.virtualenvs/privatellm/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", line 851, in _generate_with_cache
result = self._generate(
^^^^^^^^^^^^^^^
File "/home/paperspace/.virtualenvs/privatellm/lib/python3.11/site-packages/langchain_huggingface/chat_models/huggingface.py", line 373, in _generate
llm_input = self._to_chat_prompt(messages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperspace/.virtualenvs/privatellm/lib/python3.11/site-packages/langchain_huggingface/chat_models/huggingface.py", line 410, in _to_chat_prompt
return self.tokenizer.apply_chat_template(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperspace/.virtualenvs/privatellm/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 1617, in apply_chat_template
chat_template = self.get_chat_template(chat_template, tools)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paperspace/.virtualenvs/privatellm/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 1785, in get_chat_template
raise ValueError(
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
Chat Template:
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████| 2/2 [00:01<00:00, 1.06it/s]
Device set to use cuda:0
hf_pipe_llm.pipeline.tokenizer.chat_template -----------
None
hf_pipe_llm.pipeline.tokenizer.chat_template -----------
hf_text_model.tokenizer.chat_template-----------
None
hf_text_model.tokenizer.chat_template-----------
Description
use langchain_huggingface
System Info
.
The text was updated successfully, but these errors were encountered:
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
How to resolve?
ERROR:
Chat Template:
Description
use langchain_huggingface
System Info
.
The text was updated successfully, but these errors were encountered: