MCPcopy Create free account
hub / github.com/OpenMOSS/MOSS / forward

Method forward

models/modeling_moss.py:241–246  ·  view source on GitHub ↗
(self, hidden_states: Optional[torch.FloatTensor])

Source from the content-addressed store, hash-verified

239 self.dropout = nn.Dropout(config.resid_pdrop)
240
241 def forward(self, hidden_states: Optional[torch.FloatTensor]) -> torch.FloatTensor:
242 hidden_states = self.fc_in(hidden_states)
243 hidden_states = self.act(hidden_states)
244 hidden_states = self.fc_out(hidden_states)
245 hidden_states = self.dropout(hidden_states)
246 return hidden_states
247
248
249# Copied from transformers.models.gptj.modeling_gptj.GPTJBlock with GPTJ->Moss

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected