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

Method forward

bitnet/bit_mamba.py:20–25  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

18 self.weight = nn.Parameter(torch.ones(dim))
19
20 def forward(self, x):
21 output = (
22 x * torch.rsqrt(x.pow(2).mean(-1, keepdim=True) + self.eps) * self.weight
23 )
24
25 return output
26
27
28class PScan(torch.autograd.Function):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected