MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / forward

Method forward

inference/models/mpt.py:246–254  ·  view source on GitHub ↗
(
        self,
        x: torch.Tensor,
        start_pos: int,
        mask: Optional[torch.Tensor],
    )

Source from the content-addressed store, hash-verified

244 self.norm_2 = LPLayerNorm(args.d_model, eps=1e-6)
245
246 def forward(
247 self,
248 x: torch.Tensor,
249 start_pos: int,
250 mask: Optional[torch.Tensor],
251 ):
252 h = x + self.attn.forward(self.norm_1(x), start_pos, mask)
253 out = h + self.ffn.forward(self.norm_2(h))
254 return out
255
256
257class Transformer(nn.Module):

Callers

nothing calls this directly

Calls 1

forwardMethod · 0.45

Tested by

no test coverage detected