(self, x)
| 30 | return x * torch.rsqrt(x.pow(2).mean(-1, keepdim=True) + self.eps) |
| 31 | |
| 32 | def forward(self, x): |
| 33 | output = torch.empty_like(x) |
| 34 | awq_inference_engine.layernorm_forward_cuda(x, self.weight, output, self.eps) |
| 35 | return output |
| 36 | |
| 37 | |
| 38 | def precompute_freqs_cis(dim: int, end: int, theta: float = 10000.0): |