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

Method forward

train/patch/modeling_chatglm.py:406–412  ·  view source on GitHub ↗
(self, hidden_states)

Source from the content-addressed store, hash-verified

404 )
405
406 def forward(self, hidden_states):
407 # [s, b, 4hp]
408 intermediate_parallel = self.dense_h_to_4h(hidden_states)
409 intermediate_parallel = self.activation_func(intermediate_parallel)
410 # [s, b, h]
411 output = self.dense_4h_to_h(intermediate_parallel)
412 return output
413
414
415class GLMBlock(torch.nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected