MCPcopy Create free account
hub / github.com/Pints-AI/1.5-Pints / __init__

Method __init__

lit_gpt/rmsnorm.py:828–832  ·  view source on GitHub ↗
(self, size: int, dim: int = -1, eps: float = 1e-5)

Source from the content-addressed store, hash-verified

826 """
827
828 def __init__(self, size: int, dim: int = -1, eps: float = 1e-5) -> None:
829 super().__init__()
830 self.weight = torch.nn.Parameter(torch.ones(size))
831 self.eps = eps
832 self.dim = dim
833
834 def forward(self, x: torch.Tensor) -> torch.Tensor:
835 # NOTE: the original RMSNorm paper implementation is not equivalent

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected