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

新人求助,能提供bert,pythonAPI推理部署示例嘛,我该如何做前处理和后处理。 #10526

Open
Piterang opened this issue Jun 14, 2024 · 2 comments
Assignees

Comments

@Piterang
Copy link

Piterang commented Jun 14, 2024

新人求助,能提供bert,pythonAPI推理部署示例嘛,我该如何做前处理和后处理。

@Piterang Piterang changed the title 新人求助,能提供bert,pythonAPI推理部署示例嘛,我该适合设置输如。 新人求助,能提供bert,pythonAPI推理部署示例嘛,我该如何做前处理和后处理。 Jun 14, 2024
@hong19860320
Copy link
Collaborator

hong19860320 commented Jun 17, 2024

  1. 如果是口语理解(Spoken Language Understanding,SLU)任务可以参考 https://github.com/PaddlePaddle/PaddleNLP/blob/develop/model_zoo/ernie-3.0-tiny/deploy/cpp/infer_demo.cc
    https://github.com/hong19860320/PaddleLite-generic-demo/blob/55c8f7936e6e1c40231c5c9472c5251891a9ae01/spoken_language_understanding_demo/shell/demo.cc#L344 ,需要注意的是 tokenizer 使用了 PaddleNLP 的 fast_tokenizer 加速库 https://github.com/PaddlePaddle/PaddleNLP/tree/develop/fast_tokenizer
  2. 不同任务前、后处理差异都比较大,可以参考 PaddleNLP repo 相关示例 https://github.com/PaddlePaddle/PaddleNLP/tree/develop/model_zoo 自行编写代码。

@Piterang
Copy link
Author

  1. 如果是口语理解(Spoken Language Understanding,SLU)任务可以参考 https://github.com/PaddlePaddle/PaddleNLP/blob/develop/model_zoo/ernie-3.0-tiny/deploy/cpp/infer_demo.cc
    https://github.com/hong19860320/PaddleLite-generic-demo/blob/55c8f7936e6e1c40231c5c9472c5251891a9ae01/spoken_language_understanding_demo/shell/demo.cc#L344 ,需要注意的是 tokenizer 使用了 PaddleNLP 的 fast_tokenizer 加速库 https://github.com/PaddlePaddle/PaddleNLP/tree/develop/fast_tokenizer
  2. 不同任务前、后处理差异都比较大,可以参考 PaddleNLP repo 相关示例 https://github.com/PaddlePaddle/PaddleNLP/tree/develop/model_zoo 自行编写代码。

感谢!

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