AMchat icon indicating copy to clipboard operation
AMchat copied to clipboard

AttributeError: 'GenerationConfig' object has no attribute '_eos_token_tensor'

Open qianqiang-just opened this issue 1 year ago • 2 comments

我运行python start.py后会在浏览器刷新出界面,输入问题后,即出现以下错误: AttributeError: 'GenerationConfig' object has no attribute '_eos_token_tensor' Traceback: File "/home/qian/learningCodesAndTutorials/LLM/AMchat-main/web_demo.py", line 296, in main() File "/home/qian/learningCodesAndTutorials/LLM/AMchat-main/web_demo.py", line 276, in main for cur_response in generate_interactive( File "/home/qian/anaconda3/envs/deepseek/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 36, in generator_context response = gen.send(None) File "/home/qian/learningCodesAndTutorials/LLM/AMchat-main/web_demo.py", line 122, in generate_interactive logits_processor = model._get_logits_processor( File "/home/qian/anaconda3/envs/deepseek/lib/python3.10/site-packages/transformers/generation/utils.py", line 956, in _get_logits_processor and generation_config._eos_token_tensor is not None

qianqiang-just avatar Feb 04 '25 07:02 qianqiang-just

参考一下这个:https://github.com/THUDM/ChatGLM3/issues/1299

AXYZdong avatar Feb 04 '25 07:02 AXYZdong

感谢,将transformers的版本安装在 4.40.2就解决了

qianqiang-just avatar Feb 04 '25 08:02 qianqiang-just