src/transformers/models/qdqbert/modeling_qdqbert.py/QDQBertLayer/__init__
class QDQBertLayer:    def __init__(self, config):
        super().__init__()
        self.seq_len_dim = 1
        self.attention = QDQBertAttention(config)
        self.is_decoder = config.is_decoder
        self.add_cross_attention = config.add_cross_attention
        if self.add_cross_attention:
            if not self.is_decoder:
                raise ValueError(f"{self} should be used as a decoder model if cross attention is added")
            self.crossattention = QDQBertAttention(config)
        self.intermediate = QDQBertIntermediate(config)
        self.output = QDQBertOutput(config)