MCPcopy Create free account
hub / github.com/THUDM/GLM / forward

Method forward

mpu/transformer.py:380–388  ·  view source on GitHub ↗
(self, hidden_states)

Source from the content-addressed store, hash-verified

378 self.dropout = torch.nn.Dropout(output_dropout_prob)
379
380 def forward(self, hidden_states):
381 # [b, s, 4hp]
382 intermediate_parallel = self.dense_h_to_4h(hidden_states)
383 intermediate_parallel = gelu(intermediate_parallel)
384
385 # [b, s, h]
386 output = self.dense_4h_to_h(intermediate_parallel)
387 output = self.dropout(output)
388 return output
389
390
391class ParallelDecoderLayer(torch.nn.Module):

Callers

nothing calls this directly

Calls 1

geluFunction · 0.70

Tested by

no test coverage detected