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

help:无法加载本地模型 #38

Open
nuo-o opened this issue Mar 31, 2023 · 1 comment
Open

help:无法加载本地模型 #38

nuo-o opened this issue Mar 31, 2023 · 1 comment

Comments

@nuo-o
Copy link

nuo-o commented Mar 31, 2023

考虑到服务器不能连接外网,需要加载已经下载好的本地模型。执行以下代码的时候,会报错:TypeError: not a string

from transformers import AutoTokenizer, AutoModel from transformers import T5Tokenizer, T5ForConditionalGeneration import os model_dir="./model/ChatYuan-large-v2/" tokenizer = T5Tokenizer.from_pretrained(model_dir)

@joytianya
Copy link
Collaborator

可能是环境问题,换一个机器试试看

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