Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/kyegomez/BitNet
/ forward
Method
forward
bitnet/bit_transformer.py:35–36 ·
view source on GitHub ↗
(self, x)
Source
from the content-addressed store, hash-verified
33
self.gamma = nn.Parameter(torch.ones(dim))
if
affine
else
1.0
34
35
def
forward(self, x):
36
return
l2norm(x) * self.gamma * self.scale
37
38
39
class
Transformer(nn.Module):
Callers
nothing calls this directly
Calls
1
l2norm
Function · 0.85
Tested by
no test coverage detected