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

使用transformers运行5B,报错:已杀死 #91

Open
franky1024 opened this issue Jun 29, 2023 · 1 comment
Open

使用transformers运行5B,报错:已杀死 #91

franky1024 opened this issue Jun 29, 2023 · 1 comment

Comments

@franky1024
Copy link

from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("openbmb/cpm-bee-5b", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("openbmb/cpm-bee-5b", trust_remote_code=True).cuda() #
result = model.generate({"input": "今天天气不错,", "": ""}, tokenizer)
print(result)

安装环境:python3.9 transformers

@gongbaitao
Copy link
Collaborator

您的内存配置是多少呢,加载5B模型应该要求有至少10G内存

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