Instructions to use replicate/flash-attn4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/flash-attn4 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/flash-attn4", version=1) - Notebooks
- Google Colab
- Kaggle
File size: 183 Bytes
70b4af3 | 1 2 3 4 5 6 7 8 | 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}" |