src/transformers/models/megatron_bert/modeling_megatron_bert.py/MegatronBertForMaskedLM/__init__
class MegatronBertForMaskedLM:    def __init__(self, config):
        super().__init__(config)

        if config.is_decoder:
            logger.warning(
                "If you want to use `MegatronBertForMaskedLM` make sure `config.is_decoder=False` for "
                "bi-directional self-attention."
            )

        self.bert = MegatronBertModel(config, add_pooling_layer=False)
        self.cls = MegatronBertOnlyMLMHead(config)

        self.init_weights()