Instructions to use kernels-community/flash-attn2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use kernels-community/flash-attn2 with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("kernels-community/flash-attn2") - Notebooks
- Google Colab
- Kaggle
File size: 317 Bytes
97e63f9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | from kernels.benchmarks import (
FlashAttentionBenchmark,
FlashAttentionCausalBenchmark,
FlashAttentionVarlenBenchmark,
)
class FlashAttn(FlashAttentionBenchmark):
pass
class FlashAttnCausal(FlashAttentionCausalBenchmark):
pass
class FlashAttnVarlen(FlashAttentionVarlenBenchmark):
pass
|