There should partial forward in pretrained BERT and RoBERTa models
### Feature request

There should be a way to to send inputs to specific encoder layers and finish the forward partially. 

For example, there should be a way to send input hidden states to the fourth encoder layer, and get all hidden states after that through forward computation.



### Motivation

This kind of thing is required in causal intervention.


### Your contribution

I can submit a PR to this effect.
Each of those models is defined in its own modeling file that you can modify to suit your needs. This is why we have a one file per model policy in Transformers :-)<|||||>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.