T5 
    the code is here
    tokenizer = T5Tokenizer.from_pretrained('t5-small')
    model = T5WithLMHeadModel.from_pretrained('t5-small')
    input_ids = torch.tensor(tokenizer.encode("Hello, my dog is cute")).unsqueeze(0)  # Batch size 1
    print(tokenizer._tokenize("Hello, my dog is cute"))
    print(input_ids)
    print(input_ids.shape)
    outputs = model(input_ids=input_ids,attention_mask=torch.tensor([5.]))
    print(outputs[0].shape)
  

and the error is
extended_attention_mask = extended_attention_mask.to(dtype=next(self.parameters()).dtype)  # fp16 compatibility
UnboundLocalError: local variable 'extended_attention_mask' referenced before assignment

Your attention_mask should be torch.tensor([[1,1,1,1,1,1]]<|||||>This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
