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

Method forward

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

Source from the content-addressed store, hash-verified

239 # self.post_attention_layernorm = nn.LayerNorm(args.dim, eps=args.norm_eps)
240
241 def forward(
242 self,
243 x: torch.Tensor,
244 start_pos: int,
245 mask: Optional[torch.Tensor],
246 ):
247 layernorm_output = self.input_layernorm(x)
248 h_attn = x + self.self_attention.forward(layernorm_output, start_pos, mask)
249 h_mlp = self.mlp(layernorm_output)
250 out = h_attn + h_mlp
251 return out
252
253
254class Transformer(nn.Module):

Callers

nothing calls this directly

Calls 1

forwardMethod · 0.45

Tested by

no test coverage detected