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

RuntimeError: value cannot be converted to type at::Half without overflow #32

Closed
trexliu opened this issue Aug 4, 2023 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@trexliu
Copy link

trexliu commented Aug 4, 2023

跑官方README里面的例子和repo中的demo.py都报这个错误。

File "/root/.cache/huggingface/modules/transformers_modules/Qwen/Qwen-7B-Chat/44e46a0f02169a2c4790fbcccec82cd20f4df717/qwen_generation_utils.py", line 349, in call
scores[i, self.eos_token_id] = float(2**30)
RuntimeError: value cannot be converted to type at::Half without overflow

@jackaihfia2334
Copy link

+1,求解答

@shujun1992
Copy link

bf16=True可以解决

@logicwong
Copy link
Member

@trexliu @jackaihfia2334 感谢反馈!这个原因是float(2**30)超出了float16的范围,最新代码已经修复了哈。可以再尝试下

@trexliu
Copy link
Author

trexliu commented Aug 4, 2023

收到。。可以运行了。。感谢

@trexliu trexliu closed this as completed Aug 4, 2023
@fyabc fyabc added the bug Something isn't working label Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants