

TITLE
Allow the user to input positional embeddings

COMMENTS
3

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
# 🚀 Feature request

Hi, 

I think that allowing the user to input positional embeddings in the same way that `inputs_embeds` can be fed directly to the Transformer would be greatly appreciated. (If this is already possible, please let me know :) ).

## Motivation

This is important for multimodal approaches, such as **VisualBERT** (https://arxiv.org/pdf/1908.03557.pdf), where each modality requires a separate positional embedding. The user could then use a `torch.nn.Embedding` per modality and concatenate the positional embeddings and feed this to the Transformer along with the concatenated input embeddings of the modalities.

This would also resolve other related issues:

https://github.com/huggingface/transformers/issues/5095
https://github.com/huggingface/transformers/issues/3395

## Your contribution

I can help in any form. 
