Pushing T5ForConditionalGeneration to hub
### System Info

- `transformers` version: 4.25.1
- Platform: Linux-5.10.147+-x86_64-with-glibc2.27
- Python version: 3.8.16
- Huggingface_hub version: 0.11.1
- PyTorch version (GPU?): 1.13.0+cu116 (True)
- Tensorflow version (GPU?): 2.9.2 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: no
- Using distributed or parallel set-up in script?: no

### Who can help?

@Narsil

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

`trained_model.model.push_to_hub("model")`

```AttributeError                            Traceback (most recent call last)
[<ipython-input-21-b193d55bd628>](https://localhost:8080/#) in <module>
----> 1 trained_model.model.push_to_hub("model")

[/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py](https://localhost:8080/#) in __getattr__(self, name)
   1263             if name in modules:
   1264                 return modules[name]
-> 1265         raise AttributeError("'{}' object has no attribute '{}'".format(
   1266             type(self).__name__, name))
   1267 

AttributeError: 'T5ForConditionalGeneration' object has no attribute 'push_to_hub'
```

### Expected behavior

I want to push T5ForConditionalGeneration to te hub, it doesn't work, I don't know if you need more info
It will be very hard to help you without a reproducible example. `T5ForConditionalGeneration` is a `PreTrainedModel` and so does have a `push_to_hub` method.<|||||>Oh, I’m sorry, @sgugger, here is my code
https://colab.research.google.com/drive/1a59B4e8AooTFkUeMOs5Zsa0DIBWGM3k6?usp=sharing

the relevant part is at the bottom<|||||>during making a minimal example, the code started working, sorry for wasting your time, have a great day!