# New Layer in BERT

**URL:** <https://discuss.huggingface.co/t/new-layer-in-bert/23590>\
**Category:** 🤗Transformers\
**Created:** [September 25, 2022, 12:31pm UTC](https://discuss.huggingface.co/t/new-layer-in-bert/23590 "2022-09-25T12:31:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShivaniSri](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@ShivaniSri](https://discuss.huggingface.co/u/ShivaniSri)\
**Post date:** [September 25, 2022, 12:31pm UTC](https://discuss.huggingface.co/t/new-layer-in-bert/23590/1 "2022-09-25T12:31:27Z")

</div>

I would like to have a new layer in the middle of BERT-BASE i.e.,BERT-BASE has 12 encoder layers, I would like to place a new layer after 6 encoder layers and the output of custom layer need to be input for 7th encoder layer of bert.

How can I implement this in pretrained bert models.

Thanks in Advance
