About the evaluation_loop function of trainer
### Feature request

It is recommended to feed the logits of each batch into the compute_metrics function, and then aggregate the results of each batch.

### Motivation

When I use the evaluate function of the trainer, the evaluation_loop function concatenates all the logits and labels on the validation set and sends them to the compute_metrics function for evaluation. The preds_host and labels_host are of torch.tensor type, so it is easy to exceed the gpu memory.

### Your contribution

pass
Hello, thanks for opening an issue! We try to keep the github issues for bugs/feature requests.
Could you ask your question on the [forum](https://discuss.huggingface.co) instead?

Thanks!<|||||>You can set `eval_accumulation_steps=100`(or even a smaller number) in TraningArgs to avoid GPU memory exceeding.

However, I also think it is a bad design that the default `eval_accumulation_steps`  is infinity actually, also.<|||||>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.