How to export mT5 model to onnx/torchscript and use it?
I have fine tuned a model named “tzq0301/mT5-news-title-generation” on the hub based on “csebuetnlp/mT5_multilingual_XLSum”.I can generate my “summarization” usingmodel.generate(...)but I don’t knowhow to generate “summarization” usingmodel(...)ormodel.__call__(...)after exporting my model as onnx or torchscript.I can getinput_idsandattention_maskusingtokenizer(...).image2396×866 168 KBAnd I can getSeq2SeqLMOutputusingmodel(...), which contains:loss=None,logits=tensor(...)past_key_values=tuple(tuple(tensor(...)))decoder_hidden_states=Nonedecoder_attentions=Nonecross_attentions=Noneencoder_last_hidden_state=tensor(...)encoder_hidden_states=Noneencoder_attentions=NoneI don’t know how to use and which to use for my “summarization” generation.