Hello to all,
I’m following this tutorial: https://huggingface.co/blog/how-to-generate 79
which says: " Auto-regressive language generation is now available for  GPT2 ,  XLNet ,  OpenAi-GPT ,  CTRL ,  TransfoXL ,  XLM ,  Bart ,  T5  in both PyTorch and Tensorflow >= 2.0!"
so I wanted to try to do the same, they just change the model to T5. However even though the model runs, the output is very strange. This is the code:
!pip install transformers
import tensorflow as tf
from transformers import TFT5ForConditionalGeneration, T5Tokenizer

tokenizer = T5Tokenizer.from_pretrained("t5-small")
model = TFT5ForConditionalGeneration.from_pretrained("t5-small", pad_token_id=tokenizer.eos_token_id)
input_ids = tokenizer.encode('Hello, my dog is cute', return_tensors='tf')
greedy_output = model.generate(input_ids, max_length=50)
print("Output:\n" + 100 * '-')

print(tokenizer.decode(greedy_output[0], skip_special_tokens=True))

I get this output:
Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello Hello
Because of this, and taking into account that I have not found many text-generation examples with t5, I would like to ask if this is possible? if so, why my output is so strange?