def METHOD_NAME(self, num_hidden_layers=6):
    crossattention_config = deepcopy(self.config)
    crossattention_config.num_hidden_layers = num_hidden_layers
    self.config.num_hidden_layers -= num_hidden_layers
    self.crossattention = BertEncoder(crossattention_config)
    self.crossattention.layer = self.plm.encoder.layer[self.config.
                                                       num_hidden_layers:]
    self.plm.encoder.layer = self.plm.encoder.layer[:self.config.
                                                    num_hidden_layers]