clue-ai / ChatYuan

ChatYuan: Large Language Model for Dialogue in Chinese and English
https://www.clueai.cn
Other
1.9k stars 183 forks source link

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

Open xihaofei opened 8 months ago

xihaofei commented 8 months ago

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 https://github.com/huggingface/transformers/pull/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