torchmetrics support
### Feature request

In eval loop the HF transformers collects and keeps in memory predictions and targets up to the end of eval and then computes metrics passed via callback.
When transformers is used to fine-tune model with big dataset and many labels (in my case up to 220k labels), predictions and targets take huge amount of RAM. It's especially noticable with DDP and many GPUs per node.
It would be great to add [torchmetrics](https://torchmetrics.readthedocs.io/en/stable/index.html) support where metrics can be computed for every eval step and then averaged at the end

With torchmetrics it's also possible to compute metrics on GPU in distibuted way. What makes eval significantly faster. 

### Motivation
With current metrics callback I can't run eval with > 120k labels.
I tried to sparsify and/or cut data. However, with growing number of labels and etc it anyway became inefficient.  
Eventually I had to update trainer to compute torchmetrics for every eval step on GPU what fully solved this issue in my case.

So, it would be great to have this feature out-of-the-box.

### Your contribution
I can create PR with appropriate changes if you also view this feature as useful.
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.<|||||>@sgugger, could you please share your opinion on above feature request ? ^^<|||||>At this stage we're not planning to add this no. You can always subclass the Trainer to put your own evaluation loop in it however.<|||||>> At this stage we're not planning to add this no. You can always subclass the Trainer to put your own evaluation loop in it however.

this is exactly what I did. I just thought that it could be useful for others because I saw some other reports in GH about OOM in eval.<|||||>Note that you can use `eval_accumulation_steps` to avoid taking too much space on the GPU. There is no need to use torchmetrics for that.