MCPcopy Index your code
hub / github.com/deepspeedai/DeepSpeedExamples / __init__

Method __init__

bing_bert/nvidia/modeling.py:958–962  ·  view source on GitHub ↗
(self, config)

Source from the content-addressed store, hash-verified

956 ```
957 """
958 def __init__(self, config):
959 super(BertForMaskedLM, self).__init__(config)
960 self.bert = BertModel(config)
961 self.cls = BertOnlyMLMHead(config, self.bert.embeddings.word_embeddings.weight)
962 self.apply(self.init_bert_weights)
963
964 def forward(self, input_ids, token_type_ids=None, attention_mask=None, masked_lm_labels=None, checkpoint_activations=False):
965 sequence_output, _ = self.bert(input_ids, token_type_ids, attention_mask,

Callers

nothing calls this directly

Calls 4

applyMethod · 0.80
BertModelClass · 0.70
BertOnlyMLMHeadClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected