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

What should I do to run bert with lightseq? #12

Closed
itsucks opened this issue Oct 30, 2020 · 1 comment
Closed

What should I do to run bert with lightseq? #12

itsucks opened this issue Oct 30, 2020 · 1 comment

Comments

@itsucks
Copy link

itsucks commented Oct 30, 2020

No description provided.

@itsucks itsucks changed the title What should I do to run bertforclassification model with light seq? What should I do to run bertforclassification model with lightseq? Oct 30, 2020
@Taka152
Copy link
Contributor

Taka152 commented Oct 30, 2020

@itsucks We have implemented BERT in the model/encoder.cu.cc, but because of the diversity of downstream tasks, we didn't provide a full example. However, it can be done by the following procedures.

  1. Write an encoder server based on server/transformer_server.cu.cc to get the last layer's output.
  2. Use the output to compute the final result for your task.

This can be fast enough because most computing time is in Transformer blocks if your downstream task is not too heavy(like two FFN layers).

And also we are implementing a python wrapper to replace TRTIS, which provides flexibility to use LightSeq in your deployment code, it will be released as soon as possible.

@Taka152 Taka152 closed this as completed Nov 2, 2020
@Taka152 Taka152 changed the title What should I do to run bertforclassification model with lightseq? What should I do to run bert with lightseq? Nov 2, 2020
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