Faster TrOCR (in particular) and faster batch text generation (in general)
### Feature request

Text generation in auto-regressive decoders can be optimized by not computing next token logits for sentences that already reached `eos` or `pad`. This is a [notebook](https://github.com/IlyasMoutawwakil/Faster-TrOCR/blob/main/Faster_TrOCR_with_ONNX%2BAutoRegressive_Hack.ipynb) where I did my experiments on performances. The last part contains a modified `forward` method of the `VisionEncoderDecoder` class. One important thing to note is that it should only be used in inference (eval) and not training phase.

### Motivation

I have been using TrOCR for a while and was trying to make it faster. I tried ONNXizing it but unfortunately that only made it slower (ONNX communication bottleneck ?). I digged deeper in the source code and noticed that when generating text, it computes the next token logits of the whole batch (I had batches of different length text lines because I was using it on extracted text lines from documents) which is not necessary and only makes sense in the case of a batch of a fixed text length.

### Your contribution

I made a class where I overrode the `forward` function of the `VisionEncoderDecoder` class and it worked (half the compute time).

This is the performance of the native implementation on a 17 text line document:
```python
%timeit preprocessor.tokenizer.batch_decode( \
                                            cuda_hf_model.generate( \
                                                                   pixel_values.to('cuda'), \
                                                                   max_length=96 \
                                                                   ), \
                                            skip_special_tokens=True \
                                            )
# 1.68 s ± 2.98 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
```
This is the performance of the modified implementation:
```python
%timeit preprocessor.tokenizer.batch_decode( \
                                            modified_cuda_hf_trocr.generate( \
                                                                          pixel_values.to('cuda'), \
                                                                          max_length=96, \
                                                                          ), \
                                            skip_special_tokens=True)
# 894 ms ± 1.21 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
```
I tried it on both CUDA and CPU and the gain is even greater on CPU.
cc @NielsRogge <|||||>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.