[T5] Adding `model_parallel = False` to `T5ForTokenClassification` and `MT5ForTokenClassification`
Author: retarfi
Pull request: yes

# What does this PR do?

Added `self.model_parallel = False` in `T5ForTokenClassification` and `MT5ForTokenClassification`  (similar to #24684).
It resolves a problem caused by `model_parallel` not being set (similar to #24682).  

### For reproduction
```py
from transformers import AutoModelForTokenClassification, Trainer
model = AutoModelForTokenClassification.from_pretrained("google-t5/t5-small")
trainer = Trainer(model=model)
```
This produces the following error:
```py
AttributeError                            Traceback (most recent call last)
Cell In [1], line 3
      1 from transformers import AutoModelForTokenClassification, Trainer
      2 model = AutoModelForTokenClassification.from_pretrained("google-t5/t5-small")
----> 3 trainer = Trainer(model=model)

File ~/.pyenv/versions/3.9.14/lib/python3.9/site-packages/transformers/trainer.py:425, in Trainer.__init__(self, model, args, data_collator, train_dataset, eval_dataset, tokenizer, model_init, compute_metrics, callbacks, optimizers, preprocess_logits_for_metrics)
    417 if model.__class__.__name__ in MODEL_MAPPING_NAMES:
    418     raise ValueError(
    419         f"The model you have picked ({model.__class__.__name__}) cannot be used as is for training: it only "
    420         "computes hidden states and does not accept any labels. You should choose a model with a head "
    421         "suitable for your task like any of the `AutoModelForXxx` listed at "
    422         "https://huggingface.co/docs/transformers/model_doc/auto"
    423     )
--> 425 if hasattr(model, "is_parallelizable") and model.is_parallelizable and model.model_parallel:
    426     self.is_model_parallel = True
    427 else:

File ~/.pyenv/versions/3.9.14/lib/python3.9/site-packages/torch/nn/modules/module.py:1269, in Module.__getattr__(self, name)
   1267     if name in modules:
   1268         return modules[name]
-> 1269 raise AttributeError("'{}' object has no attribute '{}'".format(
   1270     type(self).__name__, name))

AttributeError: 'T5ForTokenClassification' object has no attribute 'model_parallel'
```
Similar error also happens in `MT5ForTokenClassification`.

## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?
@ArthurZucker and @younesbelkada



Comments:
Thank you for your comments and confirmation!  
I think your modification in trainer.py would be better since this can circumvent the error in the other models even if not explicitly setting `is_parallelizable` and/or `model_parallel`.

Perfect ! Would you be happy to change the PR accordingly ? I can also open a new PR, let me know !

I'd be happy to change the PR! I'll make the updates.

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_30763). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.