Instructions to use replicate/flash-attn3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/flash-attn3 with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("replicate/flash-attn3") - Notebooks
- Google Colab
- Kaggle
Download benchmarks/benchmark.py from replicate/flash-attn3: direct link, hf CLI and curl.
- Browser
- Download file 317 Bytes
-
https://huggingface.co/replicate/flash-attn3/resolve/main/benchmarks/benchmark.py
- Command line
-
hf download hf://replicate/flash-attn3/benchmarks/benchmark.py
-
curl -L -o benchmark.py https://huggingface.co/replicate/flash-attn3/resolve/main/benchmarks/benchmark.py
317 Bytes
| from kernels.benchmarks import ( | |
| FlashAttentionBenchmark, | |
| FlashAttentionCausalBenchmark, | |
| FlashAttentionVarlenBenchmark, | |
| ) | |
| class FlashAttn(FlashAttentionBenchmark): | |
| pass | |
| class FlashAttnCausal(FlashAttentionCausalBenchmark): | |
| pass | |
| class FlashAttnVarlen(FlashAttentionVarlenBenchmark): | |
| pass | |