Replies: 2 comments 5 replies
-
For text generation tasks, we don't have a built-in translator. We are working on it (@KexinFeng). You can consider use our python engine with djl-serving to serve it. You only need prepare a
And then start djl-serving docker container:
|
Beta Was this translation helpful? Give feedback.
4 replies
-
@jawaff |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently looking into text generation using a T5 Huggingface model (https://huggingface.co/tscholak/cxmefzzi). I have it loaded in using the TorchScript format. I have the tokenizer loaded in from the tokenizer.json file. I have a translator written that encodes the inputs and attempts to process the outputs. My problem is that the outputs for this model aren't what I expected and I'm starting to think that T5 models aren't supported or maybe the translation to the TorchScript format wasn't correct.
The shape of the output is (inputSize, vocabSize) and the values are floats (I'm interpreting the first item in the NDList to be the output since the other items are of shape (batchSize, inputSize, 128)). I figured I could just choose the most probable word translation for each input word. The problem is that each array of length vocabSize is almost identical. The output of the translation is always some repeated word.
Do I need to switch to a BERT model or is there something wrong here?
Beta Was this translation helpful? Give feedback.
All reactions