MCPcopy Create free account
hub / github.com/MiniMax-AI/VTP / __init__

Method __init__

vtp/models/layers/normalization.py:9–12  ·  view source on GitHub ↗
(self, dim: int, eps: float = 1e-5)

Source from the content-addressed store, hash-verified

7 """Root Mean Square Layer Normalization."""
8
9 def __init__(self, dim: int, eps: float = 1e-5):
10 super().__init__()
11 self.weight = nn.Parameter(torch.ones(dim))
12 self.eps = eps
13
14 def reset_parameters(self) -> None:
15 nn.init.constant_(self.weight, 1)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected