def __init__(self,
                 size: int = 0,
                 ff_size: int = 0,
                 num_heads: int = 0,
                 dropout: float = 0.1):
        """
        A single Transformer layer.
        :param size:
        :param ff_size:
        :param num_heads:
        :param dropout:
        """
        super().__init__()

        self.layer_norm = nn.LayerNorm(size, eps=1e-6)
        self.src_src_att = MultiHeadedAttention(num_heads,
                                                size,
                                                dropout=dropout)
        self.feed_forward = PositionwiseFeedForward(size,
                                                    ff_size=ff_size,
                                                    dropout=dropout)
        self.dropout = nn.Dropout(dropout)
        self.size = size

        A single Transformer layer.
        :param size:
        :param ff_size:
        :param num_heads:
        :param dropout:
        
mGPT/archs/tools/transformer_layers.py