Instructions to use Efficient-Large-Model/Sol-Attn-Kernel-Source with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use Efficient-Large-Model/Sol-Attn-Kernel-Source with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("Efficient-Large-Model/Sol-Attn-Kernel-Source") - Notebooks
- Google Colab
- Kaggle
File size: 1,287 Bytes
8e9f35a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | ---
license: apache-2.0
tags:
- kernels
- cuda
- attention
- triton
- cute-dsl
---
# Sol-Attn Kernel Builder Source
This repository contains the Hugging Face Kernel Builder packaging for
[Sol-Attn](https://github.com/NVlabs/Sana/tree/sol-engine/techniques/sparse_backends/sol_attn).
The kernel implementation is pinned to NVIDIA's `NVlabs/Sana` commit
[`8a26fb0`](https://github.com/NVlabs/Sana/commit/8a26fb0ec9e353125ead798cb2e312d5ce48cded).
The packaged Python sources preserve that implementation. The only source
relocation required by Kernel Hub is converting internal `sol_attn.*` imports
to package-relative imports, so the kernel remains loadable under the
version-isolated module name assigned by `kernels.get_kernel(...)`.
Published builds are loaded from
[`Efficient-Large-Model/Sol-Attn`](https://huggingface.co/Efficient-Large-Model/Sol-Attn):
```python
from kernels import get_kernel
kernel = get_kernel("Efficient-Large-Model/Sol-Attn", version=1)
out = kernel.sol_attn(
q, # Contiguous BF16 CUDA tensor [batch, tokens, heads, 128].
k, # Same shape, dtype, layout, and device as q.
v, # Same shape, dtype, layout, and device as q.
tau=1.0,
thresh_type="exact",
)
```
See [SOURCE.md](SOURCE.md) for provenance and the verification command.
|