src/transformers/models/rembert/modeling_rembert.py/RemBertLayer/__init__
class RemBertLayer:    def __init__(self, config):
        super().__init__()
        self.chunk_size_feed_forward = config.chunk_size_feed_forward
        self.seq_len_dim = 1
        self.attention = RemBertAttention(config)
        self.is_decoder = config.is_decoder
        self.add_cross_attention = config.add_cross_attention
        if self.add_cross_attention:
            assert self.is_decoder, f"{self} should be used as a decoder model if cross attention is added"
            self.crossattention = RemBertAttention(config)
        self.intermediate = RemBertIntermediate(config)
        self.output = RemBertOutput(config)