How to modify the internal layers of BERT

The inputs_embeds parameter is only used to replace the nn.Embedding layer. The position and type embedding are still added to the input embeddings