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

如何加载本地模型 #298

Open
yfangZhang opened this issue Oct 16, 2023 · 1 comment
Open

如何加载本地模型 #298

yfangZhang opened this issue Oct 16, 2023 · 1 comment

Comments

@yfangZhang
Copy link

step 2

from openprompt.plms import load_plm
plm, tokenizer, model_config, WrapperClass = load_plm("bert", "bert-base-cased")
如何修改代码,加载本地模型

@peterpaniff
Copy link

step 2

from openprompt.plms import load_plm plm, tokenizer, model_config, WrapperClass = load_plm("bert", "bert-base-cased") 如何修改代码,加载本地模型
huggingface上搜索关键字bert-base-cased,进入https://huggingface.co/bert-base-cased/tree/main,将文件保存下来保存到某个目录,比如你保存到/home/123/bert_model/,这个路径根据你的需要进行修改,然后将这个路径替换掉"bert-base-cased"即可。

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