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

Class FTLlamaRMSNorm

inference/modules/fused_norm.py:7–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6
7class FTLlamaRMSNorm(nn.Module):
8 def __init__(self, weight, eps=1e-6):
9 """
10 LlamaRMSNorm is equivalent to T5LayerNorm
11 """
12 super().__init__()
13 self.weight = weight
14 self.variance_epsilon = eps
15
16 def forward(self, x):
17 output = torch.empty_like(x)
18 awq_inference_engine.layernorm_forward_cuda(
19 x, self.weight, output, self.variance_epsilon
20 )
21 return output
22
23
24def make_quant_norm(model):

Callers 1

make_quant_normFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected