-
Notifications
You must be signed in to change notification settings - Fork 199
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
Transformers版本不一致 #254
Comments
训练和推理应该没什么影响。huggingface它的新版本4.x.x和旧版本3.x.x的接口不一致了,所以我升级一下,都是4.x.x应该无所谓吧。 |
@feifeibear 我基于huggingface预训练模型进行finetuning,出来的模型用turbo作为后端运行,会报下面的错误,后来调试发现模型中其实没有pooler这一层的,TurboTransformer的代码里为什么会特地加入pooler呢? |
我这边用的预训练模型是bert-base-chinese |
因为bert-base-uncased都有一个pooler层吧。你的模型如果没有可以去掉。 |
嗯,的确,我用的是BertForTokenClassification,这个里面没有用到pooler,那是不是意味着我用的话,需要改下turbotransformers底层的代码呢? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@feifeibear
您好,我看到TurboTransformers最新版本中已经要求transformers版本为4.11.1了,对于我们之前使用transformers4.6.1版本训练出来的模型想要使用TurboTransformers来加速,需要怎么做呢?还是说训练模型的Transformers版本必须和TurboTransformers保持一致呢?
The text was updated successfully, but these errors were encountered: