Download overlay/kernels/cuda/hash_kernel.cu from GAInTech/feather-a10g-large-runtime: direct link, hf CLI and curl.
- Browser
- Download file 422 Bytes
-
https://huggingface.co/spaces/GAInTech/feather-a10g-large-runtime/resolve/main/overlay/kernels/cuda/hash_kernel.cu
- Command line
-
hf download hf://spaces/GAInTech/feather-a10g-large-runtime/overlay/kernels/cuda/hash_kernel.cu
-
curl -L -o hash_kernel.cu https://huggingface.co/spaces/GAInTech/feather-a10g-large-runtime/resolve/main/overlay/kernels/cuda/hash_kernel.cu
422 Bytes
| /* | |
| * Engram CUDA hash kernel for O(1) N-gram context lookup. | |
| * | |
| * Phase 2: Custom CUDA kernel for batched hash computation. | |
| * Phase 1: Uses Python-level hashing in EngramModule._hash_context(). | |
| * | |
| * Hash function: h = token[t] ^ (token[t-1] * prime_1) ^ (token[t-2] * prime_2) | |
| * Output: h % n_columns (table index) | |
| * | |
| * This kernel parallelizes over (batch, sequence) dimensions. | |
| */ | |
| // Stub: Phase 2 implementation | |