I have tested both "refactor_t5" and "major_t5_refactor" branches using "T5ForConditionalGeneration". I didn't re-convert the Tensorflow to Pytorch, since you already told me the conversion process is not the problem. Doesn't seem it solved our issue yet, but it gives different rubbish output. Maybe, it is a good step into the right direction. Thanks Patrick.