Instructions to use replicate/sage-attention with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/sage-attention with Kernels:
# !pip install kernels from kernels import get_kernel # a version (or an explicit revision) is required; see the "Files and versions" tab for the available ones kernel = get_kernel("replicate/sage-attention", version=1) - Notebooks
- Google Colab
- Kaggle
Uploaded using `kernel-builder`.
Browse files
README.md
CHANGED
|
@@ -3,12 +3,7 @@ library_name: kernels
|
|
| 3 |
license: apache-2.0
|
| 4 |
---
|
| 5 |
|
| 6 |
-
|
| 7 |
-
should probably proofread and complete it, then remove this comment. -->
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
This is the repository card of {repo_id} that has been pushed on the Hub. It was built to be used with the [`kernels` library](https://github.com/huggingface/kernels). This card was automatically generated.
|
| 11 |
-
|
| 12 |
|
| 13 |
## How to use
|
| 14 |
|
|
@@ -16,38 +11,20 @@ This is the repository card of {repo_id} that has been pushed on the Hub. It was
|
|
| 16 |
# make sure `kernels` is installed: `pip install -U kernels`
|
| 17 |
from kernels import get_kernel
|
| 18 |
|
| 19 |
-
kernel_module = get_kernel("kernels-community/sage-attention")
|
| 20 |
per_block_int8 = kernel_module.per_block_int8
|
| 21 |
|
| 22 |
per_block_int8(...)
|
| 23 |
```
|
| 24 |
|
| 25 |
## Available functions
|
| 26 |
-
|
| 27 |
- `per_block_int8`
|
| 28 |
- `per_warp_int8`
|
| 29 |
- `sub_mean`
|
| 30 |
- `per_channel_fp8`
|
| 31 |
- `sageattn`
|
| 32 |
-
|
| 33 |
-
## Supported backends
|
| 34 |
-
|
| 35 |
-
- cuda
|
| 36 |
-
|
| 37 |
-
## CUDA Capabilities
|
| 38 |
-
|
| 39 |
-
- 8.0
|
| 40 |
-
- 8.9
|
| 41 |
-
- 9.0a
|
| 42 |
|
| 43 |
## Benchmarks
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
## Source code
|
| 48 |
-
|
| 49 |
-
[TODO: provide original source code and other relevant citations if available]
|
| 50 |
-
|
| 51 |
-
## Notes
|
| 52 |
-
|
| 53 |
-
[TODO: provide additional notes about this kernel if needed]
|
|
|
|
| 3 |
license: apache-2.0
|
| 4 |
---
|
| 5 |
|
| 6 |
+
This is the repository card of kernels-community/sage-attention that has been pushed on the Hub. It was built to be used with the [`kernels` library](https://github.com/huggingface/kernels). This card was automatically generated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
## How to use
|
| 9 |
|
|
|
|
| 11 |
# make sure `kernels` is installed: `pip install -U kernels`
|
| 12 |
from kernels import get_kernel
|
| 13 |
|
| 14 |
+
kernel_module = get_kernel("kernels-community/sage-attention")
|
| 15 |
per_block_int8 = kernel_module.per_block_int8
|
| 16 |
|
| 17 |
per_block_int8(...)
|
| 18 |
```
|
| 19 |
|
| 20 |
## Available functions
|
|
|
|
| 21 |
- `per_block_int8`
|
| 22 |
- `per_warp_int8`
|
| 23 |
- `sub_mean`
|
| 24 |
- `per_channel_fp8`
|
| 25 |
- `sageattn`
|
| 26 |
+
- `sageattn3_blackwell`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
## Benchmarks
|
| 29 |
|
| 30 |
+
No benchmark available yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|