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: 'GenerationConfig' object has no attribute '_eos_token_tensor' #24

Open
qianqiang-just opened this issue Feb 4, 2025 · 2 comments

Comments

@qianqiang-just
Copy link

我运行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

@AXYZdong
Copy link
Owner

AXYZdong commented Feb 4, 2025

参考一下这个:THUDM/ChatGLM3#1299

@qianqiang-just
Copy link
Author

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

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

2 participants