src/transformers/models/imagegpt/modeling_imagegpt.py/ImageGPTLayerNorm/forward
class ImageGPTLayerNorm:    def forward(self, tensor: torch.Tensor) -> tuple:
        # input is not mean centered
        return (
            tensor
            / torch.sqrt(torch.mean(torch.square(tensor), axis=-1, keepdim=True) + self.eps)
            * self.weight.data[..., :]
        )