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