MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / forward

Method forward

DeepSpeedExample/megatron/model/bert_model.py:93–101  ·  view source on GitHub ↗
(self, hidden_states, word_embeddings_weight)

Source from the content-addressed store, hash-verified

91 self.gelu = erf_gelu
92
93 def forward(self, hidden_states, word_embeddings_weight):
94 hidden_states = self.dense(hidden_states)
95 hidden_states = self.gelu(hidden_states)
96 hidden_states = self.layernorm(hidden_states)
97 output = parallel_lm_logits(hidden_states,
98 word_embeddings_weight,
99 self.parallel_output,
100 bias=self.bias)
101 return output
102
103
104class BertModel(MegatronModule):

Callers

nothing calls this directly

Calls 2

parallel_lm_logitsFunction · 0.90
layernormMethod · 0.45

Tested by

no test coverage detected