Instructions to use replicate/flash-attn2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/flash-attn2 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-attn2", version=1) - Notebooks
- Google Colab
- Kaggle
Build uploaded using `kernels`.
Browse files- build/torch210-cxx11-cpu-x86_64-linux/{_flash_attn2_cpu_cbe520f.abi3.so → _flash_attn2_cpu_cf323a2.abi3.so} +1 -1
- build/torch210-cxx11-cpu-x86_64-linux/_ops.py +3 -3
- build/torch210-cxx11-cu126-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so} +1 -1
- build/torch210-cxx11-cu126-x86_64-linux/_ops.py +3 -3
- build/torch210-cxx11-cu128-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so} +1 -1
- build/torch210-cxx11-cu128-x86_64-linux/_ops.py +3 -3
- build/torch210-cxx11-cu130-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so} +1 -1
- build/torch210-cxx11-cu130-x86_64-linux/_ops.py +3 -3
- build/{torch211-cxx11-xpu20253-x86_64-linux/_flash_attn2_xpu_cbe520f.abi3.so → torch210-cxx11-xpu20253-x86_64-linux/_flash_attn2_xpu_cf323a2.abi3.so} +2 -2
- build/torch210-cxx11-xpu20253-x86_64-linux/_ops.py +3 -3
- build/torch211-cxx11-cpu-x86_64-linux/{_flash_attn2_cpu_cbe520f.abi3.so → _flash_attn2_cpu_cf323a2.abi3.so} +1 -1
- build/torch211-cxx11-cpu-x86_64-linux/_ops.py +3 -3
- build/torch211-cxx11-cu126-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so} +1 -1
- build/torch211-cxx11-cu126-x86_64-linux/_ops.py +3 -3
- build/torch211-cxx11-cu128-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so} +1 -1
- build/torch211-cxx11-cu128-x86_64-linux/_ops.py +3 -3
- build/torch211-cxx11-cu130-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so} +1 -1
- build/torch211-cxx11-cu130-x86_64-linux/_ops.py +3 -3
- build/{torch210-cxx11-xpu20253-x86_64-linux/_flash_attn2_xpu_cbe520f.abi3.so → torch211-cxx11-xpu20253-x86_64-linux/_flash_attn2_xpu_cf323a2.abi3.so} +2 -2
- build/torch211-cxx11-xpu20253-x86_64-linux/_ops.py +3 -3
- build/torch29-cxx11-cu129-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so} +1 -1
- build/torch29-cxx11-cu129-x86_64-linux/_ops.py +3 -3
build/torch210-cxx11-cpu-x86_64-linux/{_flash_attn2_cpu_cbe520f.abi3.so → _flash_attn2_cpu_cf323a2.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1942496
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:917cce036be12194bbc9d832021d2de136665d4d878b503e486cad869eb1591e
|
| 3 |
size 1942496
|
build/torch210-cxx11-cpu-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _flash_attn2_cpu_cf323a2
|
| 3 |
+
ops = torch.ops._flash_attn2_cpu_cf323a2
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_flash_attn2_cpu_cf323a2::{op_name}"
|
build/torch210-cxx11-cu126-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 448709016
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:48ca91811a6a8b7c99e40b8f912af5b5d5dfe8ea7268cf139b2b24cfff944e66
|
| 3 |
size 448709016
|
build/torch210-cxx11-cu126-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _flash_attn2_cuda_cf323a2
|
| 3 |
+
ops = torch.ops._flash_attn2_cuda_cf323a2
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_flash_attn2_cuda_cf323a2::{op_name}"
|
build/torch210-cxx11-cu128-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1037803408
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a7c37d176fcc8b05c5cc2cfb5fdb078535777826972ad20df9567234fbda46a6
|
| 3 |
size 1037803408
|
build/torch210-cxx11-cu128-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _flash_attn2_cuda_cf323a2
|
| 3 |
+
ops = torch.ops._flash_attn2_cuda_cf323a2
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_flash_attn2_cuda_cf323a2::{op_name}"
|
build/torch210-cxx11-cu130-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1009055088
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf31f7666af3a48c3d4f4d15a11380f0643c02c619d05ad382ba50716ded45b4
|
| 3 |
size 1009055088
|
build/torch210-cxx11-cu130-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _flash_attn2_cuda_cf323a2
|
| 3 |
+
ops = torch.ops._flash_attn2_cuda_cf323a2
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_flash_attn2_cuda_cf323a2::{op_name}"
|
build/{torch211-cxx11-xpu20253-x86_64-linux/_flash_attn2_xpu_cbe520f.abi3.so → torch210-cxx11-xpu20253-x86_64-linux/_flash_attn2_xpu_cf323a2.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:18d46588b4aef9cef5ff36e74b4984aeb04bf00a4eb695fa979b9225b4fcc5be
|
| 3 |
+
size 17668088
|
build/torch210-cxx11-xpu20253-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _flash_attn2_xpu_cf323a2
|
| 3 |
+
ops = torch.ops._flash_attn2_xpu_cf323a2
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_flash_attn2_xpu_cf323a2::{op_name}"
|
build/torch211-cxx11-cpu-x86_64-linux/{_flash_attn2_cpu_cbe520f.abi3.so → _flash_attn2_cpu_cf323a2.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1942496
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:252ad0d0d4c5163348a4216968519b9de393026ad4307e8f305bc42f853fe775
|
| 3 |
size 1942496
|
build/torch211-cxx11-cpu-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _flash_attn2_cpu_cf323a2
|
| 3 |
+
ops = torch.ops._flash_attn2_cpu_cf323a2
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_flash_attn2_cpu_cf323a2::{op_name}"
|
build/torch211-cxx11-cu126-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 448702016
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:14a9dd127d4fc02189877b4cf2c158c4a8a2e4356b9b251987c3bffa11d56c68
|
| 3 |
size 448702016
|
build/torch211-cxx11-cu126-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _flash_attn2_cuda_cf323a2
|
| 3 |
+
ops = torch.ops._flash_attn2_cuda_cf323a2
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_flash_attn2_cuda_cf323a2::{op_name}"
|
build/torch211-cxx11-cu128-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1037788208
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b2c63a5d07c3f6188690d37a22e76801309337f472257b7c2463831ff94213c8
|
| 3 |
size 1037788208
|
build/torch211-cxx11-cu128-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _flash_attn2_cuda_cf323a2
|
| 3 |
+
ops = torch.ops._flash_attn2_cuda_cf323a2
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_flash_attn2_cuda_cf323a2::{op_name}"
|
build/torch211-cxx11-cu130-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1009048080
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:66365d9913090aa9486ebae89e1ed7eabba1de23b6417b9c3a3d2a624520fffb
|
| 3 |
size 1009048080
|
build/torch211-cxx11-cu130-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _flash_attn2_cuda_cf323a2
|
| 3 |
+
ops = torch.ops._flash_attn2_cuda_cf323a2
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_flash_attn2_cuda_cf323a2::{op_name}"
|
build/{torch210-cxx11-xpu20253-x86_64-linux/_flash_attn2_xpu_cbe520f.abi3.so → torch211-cxx11-xpu20253-x86_64-linux/_flash_attn2_xpu_cf323a2.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9294ec725a5bb1290f3ec8e3375647dc63c95aaf1e09fd0ec4b6d4a578ee062a
|
| 3 |
+
size 17668088
|
build/torch211-cxx11-xpu20253-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _flash_attn2_xpu_cf323a2
|
| 3 |
+
ops = torch.ops._flash_attn2_xpu_cf323a2
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_flash_attn2_xpu_cf323a2::{op_name}"
|
build/torch29-cxx11-cu129-x86_64-linux/{_flash_attn2_cuda_cbe520f.abi3.so → _flash_attn2_cuda_cf323a2.abi3.so}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1042948264
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6233725460d8f96cbfda48ecc7ea7f9d4fe3100d30ecae612fc206f8cdca774d
|
| 3 |
size 1042948264
|
build/torch29-cxx11-cu129-x86_64-linux/_ops.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
import torch
|
| 2 |
-
from . import
|
| 3 |
-
ops = torch.ops.
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
-
return f"
|
|
|
|
| 1 |
import torch
|
| 2 |
+
from . import _flash_attn2_cuda_cf323a2
|
| 3 |
+
ops = torch.ops._flash_attn2_cuda_cf323a2
|
| 4 |
|
| 5 |
def add_op_namespace_prefix(op_name: str):
|
| 6 |
"""
|
| 7 |
Prefix op by namespace.
|
| 8 |
"""
|
| 9 |
+
return f"_flash_attn2_cuda_cf323a2::{op_name}"
|