Instructions to use kernels-community/flash-attn4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use kernels-community/flash-attn4 with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("kernels-community/flash-attn4") - Notebooks
- Google Colab
- Kaggle
| import torch | |
| ops = torch.ops._flash_attn4_06b9ab8 | |
| def add_op_namespace_prefix(op_name: str): | |
| """ | |
| Prefix op by namespace. | |
| """ | |
| return f"_flash_attn4_06b9ab8::{op_name}" |