Ernie-M for pretraining multilingual models
### Feature request

Two things that might help in that regard: 

- To train TSDAE, one needs support as class ErnieMForPreTraining, just as for Ernie
https://huggingface.co/docs/transformers/model_doc/ernie#transformers.ErnieForPreTraining

- To train cross-encoders with contrastive loss, a bit like SimCSE, one needs standard support for getting the 'attention_mask' out of the tokenizer sbert uses. Sbert just expects those. Tried to hack it in into sbert, but failed. 

### Motivation

Suspect getting Ernie-M-large for pretraining multilingual sentence embeddings will yield close to sota results.  
According to mSimCSE, we can get top multilingual embeddings just on training on their 300k dataset of english pairs, alone (worked better than cross-lingual training). 
With a stronger base model (they used xlm-roberta), sota embeddings might just lie on the streets.  
https://github.com/yaushian/mSimCSE

### Your contribution

Can't do it alone, plz help. 
Hi @KnutJaegersberg, thanks for making this suggestion! 

Would you like to try and open a PR to add the model? We have guidance written on adding [models here](https://huggingface.co/docs/transformers/v4.27.2/en/add_new_model). As the modeling file already exists - adding this component is even easier than a whole new model. For example, see [this PR](https://github.com/huggingface/transformers/pull/21754) for adding `WhisperForAudioClassification`.<|||||>Currently in the middle of something, will try to look at it later! <|||||>I'd love to try this out! <|||||>Seems like this will require more than simply copy-pasting the BertForPretraining code, but actually implementing cross-attention Masked Language Modeling and Back-translation Masked Language Modeling. 