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

generate 不使用fp16时报错 #53

Closed
xiaofei05 opened this issue Jun 21, 2021 · 4 comments
Closed

generate 不使用fp16时报错 #53

xiaofei05 opened this issue Jun 21, 2021 · 4 comments

Comments

@xiaofei05
Copy link

模型finetune时没有使用fp16, 对finetune后的模型使用 ./scripts/generate_text.sh 交互生成正常,但是去掉./scripts/generate_text.sh中的--fp16时报错:
image

修改generate_examples.py 233行
past_key_values = [x.half() for x in past_key_values]

past_key_values = [x for x in past_key_values]

仍然报相同错误。

@zzy14
Copy link
Contributor

zzy14 commented Jun 22, 2021

您可以尝试把 generate_examples.py中past_key_values = [x.half() for x in past_key_values] 的half()删除。

@xiaofei05
Copy link
Author

您可以尝试把 generate_examples.py中past_key_values = [x.half() for x in past_key_values] 的half()删除。

如题所说,仍然是相同错误

@zzy14
Copy link
Contributor

zzy14 commented Jun 24, 2021

您好,我们更新了一下对应的代码,测试现在是可以跑fp32的,您可以试试看

@xiaofei05
Copy link
Author

好的,现在没有问题了,感谢!

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