MCPcopy Create free account
hub / github.com/microsoft/BitNet / forward

Method forward

gpu/model.py:192–197  ·  view source on GitHub ↗
(self, x: torch.Tensor)

Source from the content-addressed store, hash-verified

190 self.ffn_sub_norm = RMSNorm(hidden_dim, norm_eps)
191
192 def forward(self, x: torch.Tensor) -> torch.Tensor:
193 x13 = self.w13(x)
194 x1, x3 = x13.chunk(2, -1)
195 inner = self.ffn_sub_norm(squared_relu(x1) * x3)
196 output = self.w2(inner)
197 return output
198
199
200class TransformerBlock(nn.Module):

Callers

nothing calls this directly

Calls 1

squared_reluFunction · 0.85

Tested by

no test coverage detected