Hi @latent
this won’t work since it changes the module structure, you can init BartForConditionalGeneration inside BartExp by calling from_pretrained, or you can create a class like BartForConditionalGeneration and your custom layers inside that class. You can see how BartForConditionalGeneration is implemented here 3
You could modify that class easily.