Benchmarking with T5 or T5-small fails
## Environment info

- `transformers` version: 4.10.3
- Platform: Linux-5.13.0-27-generic-x86_64-with-glibc2.29
- Python version: 3.8.10
- PyTorch version (GPU?): 1.10.0+cu102 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: No


Models:

- T5, T5-small: @patrickvonplaten

Library:

- Benchmarks: @patrickvonplaten

## Information

PyTorchBenchmarks fails to execute with the T5 or T5-small models. 

The problem arises when using:
* [] the official example scripts: (give details below)

## To reproduce

Steps to reproduce the behavior:

Execute benchmark for T5 or T5-small directly following the code from [link](https://huggingface.co/docs/transformers/benchmarks)

Traceback:


module transformers has no attribute T5WithLMHeadModel
module transformers has no attribute T5WithLMHeadModel

ValueError                                Traceback (most recent call last)
<ipython-input-25-870c51726ecc> in <module>
----> 1 results = benchmark.run()

~/environments/Tyflos/lib/python3.8/site-packages/transformers/benchmark/benchmark_utils.py in run(self)
    705                     if self.args.inference:
    706                         if self.args.memory:
--> 707                             memory, inference_summary = self.inference_memory(model_name, batch_size, sequence_length)
    708                             inference_result_memory[model_name]["result"][batch_size][sequence_length] = memory
    709                         if self.args.speed:

ValueError: too many values to unpack (expected 2)
Hey @pranaydeeps,

Could you please provide a reproducible code snippet?<|||||>```python
from transformers import PyTorchBenchmark, PyTorchBenchmarkArguments
args = PyTorchBenchmarkArguments(models=["t5-base"], batch_sizes=[8], training=True)
benchmark = PyTorchBenchmark(args)
results = benchmark.run()
```

This should be enough to reproduce. <|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.<|||||>Hey @pranaydeeps,

Sorry to answer only now. We've sadly deprecated the Benchmarking utilities as there are simply not accurate enough and it's really difficult to keep up with all the possible performance improvements that could be benchmarked (fp16,  bf16, onnx, ...). Could you try to use some other open-sourced benchmarking libraries instead? <|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.