bytedance / lightseq

LightSeq: A High Performance Library for Sequence Processing and Generation
Other
3.17k stars 328 forks source link

where is the lightseq.inference Transformer class file? #195

Open VincentChen95 opened 2 years ago

VincentChen95 commented 2 years ago

hello team, I am following the tutorial to load a transformer model with a PB format file. Code:

import lightseq.inference as lsi
import sys

file_name = sys.argv[1]
model = lsi.Transformer(file_name, 8)
output = model.infer([[1, 2, 3], [4, 5, 6]])

I am trying to understand what parameters we should pass to the "Transformer" class. However, I cannot find the "Transformer" class in lightseq.inference could you please tell me where can I find that class? thank you

Taka152 commented 2 years ago

You can check here https://github.com/bytedance/lightseq/blob/4d370305656fe602f8628fc3bc8aa7b81464075b/lightseq/inference/pywrapper/transformer.cc.cu#L39

On Fri, Oct 1, 2021 at 7:10 AM Vincent Chen @.***> wrote:

hello team, I am following the tutorial to load a transformer model with a PB format file. Code:

import lightseq.inference as lsi import sys

file_name = sys.argv[1] model = lsi.Transformer(file_name, 8) output = model.infer([[1, 2, 3], [4, 5, 6]])

I am trying to understand what parameters we should pass to the "Transformer" class. However, I cannot find the "Transformer" class in lightseq.inference could you please tell me where can I find that class? thank you

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bytedance/lightseq/issues/195, or unsubscribe https://github.com/notifications/unsubscribe-auth/AELIZAL6RBGBC4TUBQSRRWLUETU7LANCNFSM5FDM3T2Q .