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

Example/Support of converting Fairseq Model to run in LightSeq #35

Closed
pttzty opened this issue Apr 28, 2021 · 6 comments
Closed

Example/Support of converting Fairseq Model to run in LightSeq #35

pttzty opened this issue Apr 28, 2021 · 6 comments

Comments

@pttzty
Copy link

pttzty commented Apr 28, 2021

I am curious of trying LightSeq to speed up my inference for a vanilla Transformer Encoder-Decoder (Vasawani 17) model. My original model was trained with FairSeq (or OpenNMT-py). Is there any example or places that you can refer to help me convert my transformer model to the format compatible of running LightSeq?

@Taka152
Copy link
Contributor

Taka152 commented Apr 28, 2021

@pttzty you could modify this file to export weight from FairSeq or OpenNMT, and pass the weight file to python API easily. Also, we will consider updating more examples for different training toolkit

@pttzty
Copy link
Author

pttzty commented Apr 28, 2021

@Taka152 Thanks, I will see if there is a straight forward mapping that I can convert

@q2044757581
Copy link

@Taka152 i can't find an example with topk sampling, and don't know how to set the parameters, can you help?

@Taka152
Copy link
Contributor

Taka152 commented Apr 30, 2021

@q2044757581 check here to use top-k sampling, generation_method="topk" and topk=4 means top-4 sampling on huggingface bart model. In detail, this parameter is stored here that will be passed to LightSeq c++ backend

@Taka152 Taka152 closed this as completed May 8, 2021
@q2044757581
Copy link

@Taka152 does lightseq support T5 model?

@Taka152
Copy link
Contributor

Taka152 commented May 13, 2021

@Taka152 does lightseq support T5 model?

#42

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

3 participants