Instructions to use kernels-community/flash-attn3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use kernels-community/flash-attn3 with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("kernels-community/flash-attn3") - Notebooks
- Google Colab
- Kaggle
Benchmarks uploaded using `kernels`.
Browse files- benchmarks/benchmark.py +17 -0
benchmarks/benchmark.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from kernels.benchmarks import (
|
| 2 |
+
FlashAttentionBenchmark,
|
| 3 |
+
FlashAttentionCausalBenchmark,
|
| 4 |
+
FlashAttentionVarlenBenchmark,
|
| 5 |
+
)
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class FlashAttn(FlashAttentionBenchmark):
|
| 9 |
+
pass
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class FlashAttnCausal(FlashAttentionCausalBenchmark):
|
| 13 |
+
pass
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class FlashAttnVarlen(FlashAttentionVarlenBenchmark):
|
| 17 |
+
pass
|