MCPcopy Create free account
hub / github.com/Tele-AI/Telechat / forward

Method forward

models/12B/modeling_telechat.py:502–505  ·  view source on GitHub ↗
(self, hidden_states: torch.Tensor, residual: torch.Tensor)

Source from the content-addressed store, hash-verified

500 self.hidden_dropout = config.hidden_dropout
501
502 def forward(self, hidden_states: torch.Tensor, residual: torch.Tensor) -> torch.Tensor:
503 intermediate_output = self.down_proj(F.silu(self.gate_proj(hidden_states)) * self.up_proj(hidden_states))
504 output = dropout_add(intermediate_output, residual, self.hidden_dropout, self.training)
505 return output
506
507
508class TelechatBlock(nn.Module):

Callers

nothing calls this directly

Calls 1

dropout_addFunction · 0.70

Tested by

no test coverage detected