(self, config)
| 893 | ) |
| 894 | class BertLMHeadModel(BertPreTrainedModel): |
| 895 | def __init__(self, config): |
| 896 | super().__init__(config) |
| 897 | assert config.is_decoder, "If you want to use `BertLMHeadModel` as a standalone, add `is_decoder=True`." |
| 898 | |
| 899 | self.bert = BertModel(config) |
| 900 | self.cls = BertOnlyMLMHead(config) |
| 901 | |
| 902 | self.init_weights() |
| 903 | |
| 904 | def get_output_embeddings(self): |
| 905 | return self.cls.predictions.decoder |
nothing calls this directly
no test coverage detected