-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Plato2推理比参数量接近的DialoGPT慢10倍 #1743
Comments
请问您的dialogpt模型是paddlenlp中的么。plato2在生成回复后会再过一个模型用于回复筛选,可能是会慢一些。由于plato2系统特殊性目前也没有将它接入paddlenlp.transformers中。暂时没有更多加速手段,十分抱歉 |
dialogpt用的是transformers库里面的。了解了 |
@nonstopfor 你好,目前PLATO2由于需要生成候选和候选排序两个阶段,暂时未接入预训练模型库中,我们也在考虑将生成阶段模型接入其中,参见 #1735 。 对于对话预训练模型模型,paddlenlp.transformers中已经集成了PLATO-mini(100M,中文)和PLATO-xl(11B,英文,首个开源百亿参数对话模型),也可以按需要尝试。 对于已经接入paddlenlp.transformers的生成模型,PaddleNLP通过生成API集成了高性能加速能力, 345M 的参数量下(gpt-medium-en模型)预期能较 transformers 有8~9倍的性能提升 ,欢迎使用体验,dialogpt 这样更多的模型也欢迎参考paddlenlp.transformers中的GPT进行贡献~ 另外我们近期也在做对 transformers 的模型兼容,对于一些头部模型,预期可以直接加载 transformers的模型权重,敬请期待~ |
This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。 |
This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。 |
我使用https://github.com/PaddlePaddle/PaddleNLP/tree/f079f91c48f17a1b9382076e89ce7050de83ea1d/examples/dialogue/plato-2 这里的plato2例子,用的是24层的模型(参数量310M),在同样的gpu和同样的输入情况下,推理速度比medium 版本的dialogpt(参数量345M)慢10倍左右,想问下这是正常的现象吗,或者有什么办法对plato2的推理做加速吗?我尝试了设置with paddle.no_grad()和设置latent_type_size=1,但好像速度都没有明显加快。谢谢!
环境:
Linux python 3.8
paddlepaddle-gpu=2.2.2
The text was updated successfully, but these errors were encountered: