HF models use deprecated pytorch function invocations
Masks are frequently created in `uint8` type, see e.g. here https://github.com/huggingface/transformers/blob/8fb4d0e4b46282d96386c229b9fb18bf7c80c25a/src/transformers/models/gpt_neox_japanese/modeling_gpt_neox_japanese.py#L186 or here https://github.com/huggingface/transformers/blame/52dd2b61bff8af5b6409fdd5ec92a9b3114f3636/src/transformers/models/codegen/modeling_codegen.py#L101, and then used in `torch.where`. Use of `uint8` masks in `torch.where` has been deprecated for couple years, and though it still works in pytorch eager (with a warning), support for this has been removed in `torch.compile`. It would be good to audit places where uint8 masks are used and replace them with bool masks. 
Thanks a lot for flagging @ngimel !

cc @ArthurZucker and @ydshieh 
<|||||>Could use of `torch.where` be the cause of these `torch.compile()` errors in `AutoModelForSeq2SeqLM` models?

```text
  File "/home/kastanday/utils/mambaforge3/envs/torch2.0/lib/python3.10/site-packages/transformers/models/t5/modeling_t5.py", line 949, in <graph break in forward>
    raise ValueError(f"You have to specify either {err_msg_prefix}input_ids or {err_msg_prefix}inputs_embeds")
ValueError: You have to specify either input_ids or inputs_embeds
```
Unsupported `ConstantVariable(str)`:
```
  File "/home/kastanday/utils/mambaforge3/envs/torch2.0/lib/python3.10/site-packages/torch/_dynamo/exc.py", line 71, in unimplemented
    raise Unsupported(msg)
torch._dynamo.exc.Unsupported: call_function BuiltinVariable(ValueError) [ConstantVariable(str)] {}
```


Minimal reproduction:
```python
import torch
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

model_name = "google/flan-t5-base"
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

model = torch.compile(model) # PyTorch 2.0

from torch import _dynamo
_dynamo.config.verbose = True
_dynamo.explain(model)
```

Thanks for any guidance. <|||||>Should be fixed on monday the PR is ready 😉 