Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'T5Model' object has no attribute 'chat' #64

Open
xihaofei opened this issue Jan 4, 2024 · 0 comments
Open

AttributeError: 'T5Model' object has no attribute 'chat' #64

xihaofei opened this issue Jan 4, 2024 · 0 comments

Comments

@xihaofei
Copy link

xihaofei commented Jan 4, 2024

C:\envs\yolov5\python.exe C:\Project\LongChainKBQA-main\LongChainKBQA-main\test.py
You are using the default legacy behaviour of the <class 'transformers.models.t5.tokenization_t5.T5Tokenizer'>. This is expected, and simply means that the legacy (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set legacy=False. This should only be set if you understand what it means, and thouroughly read the reason why this was added as explained in huggingface/transformers#24565

用户:你好
Traceback (most recent call last):
File "C:\Project\LongChainKBQA-main\LongChainKBQA-main\test.py", line 19, in
response, history = model.chat(tokenizer, query, history=history)
File "C:\envs\yolov5\lib\site-packages\torch\nn\modules\module.py", line 1185, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'T5Model' object has no attribute 'chat'

Process finished with exit code 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant