Download crates/blitz-kernels/src/cuda/ghost_ref.py from LevelUp2x/Nova-Prime-Kernels: direct link, hf CLI and curl.
- Browser
- Download file 298 Bytes
-
https://huggingface.co/LevelUp2x/Nova-Prime-Kernels/resolve/main/crates/blitz-kernels/src/cuda/ghost_ref.py
- Command line
-
hf download hf://LevelUp2x/Nova-Prime-Kernels/crates/blitz-kernels/src/cuda/ghost_ref.py
-
curl -L -o ghost_ref.py https://huggingface.co/LevelUp2x/Nova-Prime-Kernels/resolve/main/crates/blitz-kernels/src/cuda/ghost_ref.py
298 Bytes
| import torch | |
| import torch.nn as nn | |
| class Model(nn.Module): | |
| def __init__(self): super().__init__() | |
| def forward(self, x): | |
| return x.to(torch.float8_e4m3fn).view(torch.uint8).to(torch.float32) | |
| def get_inputs(): return [torch.randn(8192, device="cuda")] | |
| def get_init_inputs(): return [] | |