-
Notifications
You must be signed in to change notification settings - Fork 194
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
bert的输出为什么没有把hidden作为输出? #9
Comments
这里只返回了seq_pool之后的结果,确实跟huggingface/transformers里面的返回结果不一样,我们内部讨论一下是否要做出一致的,稍后答复。 一个临时的解决方案是您那边将hidden_cache放到返回值列表中(这里的hidden_cache是encoder的最后一层的state,维度为[batch, seq_len, hidden_size]):
另外,如果您的代码中同时用到了
|
@chengduoZH 赞!测试了下,在我的机器上,cpu环境下速度提升了4倍。另外问一下,会不会提供GPU的版本? |
已经有GPU版本了呀,另外你要要hidden_state就给加一下也不麻烦 |
更正下,是因为线程数设置了4;如果线程数为1,速度提升没那么明显,10%左右吧 |
@feifeibear 什么时候提供conda的安装方式呢 |
已经加了你的hidden_state返回需求到master,什么情况下必须一个conda包进行部署?gpu的wheel包满足不了需求么? |
Hidden需求已经满足了。 使用 #19 这个issue来跟踪conda 安装包的开发进度。 |
TurboTransformers/turbo_transformers/python/turbo_transformers/layers/modeling_bert.py
Lines 376 to 385 in 7137d75
基于工作需求,要对hidden做进一步的处理
The text was updated successfully, but these errors were encountered: