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

Method __init__

inference/models/llama.py:24–27  ·  view source on GitHub ↗
(self, dim: int, eps: float = 1e-6)

Source from the content-addressed store, hash-verified

22
23class RMSNorm(torch.nn.Module):
24 def __init__(self, dim: int, eps: float = 1e-6):
25 super().__init__()
26 self.eps = eps
27 self.weight = nn.Parameter(torch.ones(dim))
28
29 def _norm(self, x):
30 return x * torch.rsqrt(x.pow(2).mean(-1, keepdim=True) + self.eps)

Callers 5

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected