Are there any resources in huggingface on adding or removing layers in an already build model like bert or roberta.
I want to replace some layers in a transformer model for my project. for example changing the self attention layer to some other kind of attention
i also want to add my own layer inside the transformer as well.
The Transformers library is not really aimed for this use case. It’s not meant to be a modular toolbox but rather aimed at people who want to use and fine-tune pre-trained models.