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

Issue of the path #11

Open
blink7-lab opened this issue Nov 20, 2020 · 5 comments
Open

Issue of the path #11

blink7-lab opened this issue Nov 20, 2020 · 5 comments

Comments

@blink7-lab
Copy link

你好请问下--model_type和--model_name_or_path的对应路径是什么呢?(我修改后一直报错OSERROR:can't load.....,特来向您请教。)

@liuyukid
Copy link
Owner

如果你用的是英文的BERT的话,可以这么写:
MODEL_TYPE='bert'
MODEL_NAME_OR_PATH='../pretrained_models/bert_base_cased'

其中MODEL_TYPE 对应的是用的什么transformer预训练模型,例如bert,albert,roberta
MODEL_NAME_OR_PATH对应的是这个预训练模型的权重文件的存放地址

@blink7-lab
Copy link
Author

好的十分感谢!还有一个小问题如果我想使用electra的话electra-base-discriminator和electra-base-generator是需要都放在pretrained_models中使用吗

@liuyukid
Copy link
Owner

这个不用的,只要MODEL_NAME_OR_PATH的路径写对了就行,例如/pretrained_models/electra/electra-base-discriminator,而不应该是/pretrained_models/electra/, MODEL_NAME_OR_PATH这个目录下应该要有pytorch_model.bin这个文件的

@blink7-lab
Copy link
Author

ok我明白了,谢谢!!!

@bubbleqi
Copy link

为什么我的路径按照这个写了还是一直加载不进来呢 一直是这个错误OSError: Can't load 'pretrained_models/bert-base-uncased/,'

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

3 participants