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

UER格式的Google预训练模型与原始格式(transformers库的from_pretrained输入的格式)之间如何相互转换? #349

Open
dr-GitHub-account opened this issue Nov 29, 2022 · 1 comment

Comments

@dr-GitHub-account
Copy link

README文件中有这么一段:

“……下载Google中文预训练模型google_zh_model.bin(此文件为UER支持的格式,原始模型来自于这里)……”。

希望请教一下,如果我希望拿UER工具箱内预训练好的UER格式的模型,在所需预训练模型格式为Google原始格式(transformers库的from_pretrained输入的格式,权重文件名为pytorch_model.bin)的下游任务上做微调,应该如何操作呢?

@BiaoLiu2017
Copy link

刚好遇到这个问题,答一波。scripts目录下有convert_xxx_from_huggingface_to_uer.py和convert_xxx_from_huggingface_to_uer.py脚本,用于uer和hf模型的转换,如果转换报错,可能是python环境各包的依赖有问题

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