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

Method forward

bitnet/bit_ffn.py:53–55  ·  view source on GitHub ↗
(self, x: Tensor)

Source from the content-addressed store, hash-verified

51 self.mult_bias = nn.Parameter(torch.ones(dim_out)) if mult_bias else 1.0
52
53 def forward(self, x: Tensor):
54 x, gate = self.proj(x).chunk(2, dim=-1)
55 return x * self.activation(gate) * self.mult_bias
56
57
58# [FEATURE] Add type hints to the forward method

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected