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

请问怎么用tensorflow加载bert呢? #251

Open
qiuxia-alone opened this issue Oct 20, 2021 · 1 comment
Open

请问怎么用tensorflow加载bert呢? #251

qiuxia-alone opened this issue Oct 20, 2021 · 1 comment

Comments

@qiuxia-alone
Copy link

你好,请问用tensorflow加载bert,是先将bert权重转成npz格式,再用from_npz 加载么?from_torchfrom_pretrained应该都都是加载的pytorch模型,不知道我理解得对不对?另外,请问gpt2现在还只能用onnx加速么?

@feifeibear
Copy link
Collaborator

  1. 你理解没错,tf需要转化为npz加载,torch则可以直接加载。
  2. gpt2只能用onnxrt加速

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