Instructions to use replicate/metal-flash-sdpa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/metal-flash-sdpa 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/metal-flash-sdpa", version=1) - Notebooks
- Google Colab
- Kaggle
Clean
Browse files- build/torch27-metal-aarch64-darwin/metal_flash_sdpa/__init__.py +0 -11
- build/torch27-metal-aarch64-darwin/metal_flash_sdpa/__pycache__/__init__.cpython-312.pyc +0 -0
- build/torch27-metal-aarch64-darwin/metal_flash_sdpa/__pycache__/_custom_ops.cpython-312.pyc +0 -0
- build/torch27-metal-aarch64-darwin/metal_flash_sdpa/__pycache__/_ops.cpython-312.pyc +0 -0
- sdpa-metal/scaled_dot_product_attention.metal +0 -2
build/torch27-metal-aarch64-darwin/metal_flash_sdpa/__init__.py
DELETED
|
@@ -1,11 +0,0 @@
|
|
| 1 |
-
from ._custom_ops import (
|
| 2 |
-
flash_attention_varlen,
|
| 3 |
-
flash_attn_varlen_func,
|
| 4 |
-
)
|
| 5 |
-
from ._ops import ops
|
| 6 |
-
|
| 7 |
-
__all__ = [
|
| 8 |
-
"flash_attention_varlen",
|
| 9 |
-
"flash_attn_varlen_func",
|
| 10 |
-
"ops",
|
| 11 |
-
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build/torch27-metal-aarch64-darwin/metal_flash_sdpa/__pycache__/__init__.cpython-312.pyc
DELETED
|
Binary file (400 Bytes)
|
|
|
build/torch27-metal-aarch64-darwin/metal_flash_sdpa/__pycache__/_custom_ops.cpython-312.pyc
DELETED
|
Binary file (3.99 kB)
|
|
|
build/torch27-metal-aarch64-darwin/metal_flash_sdpa/__pycache__/_ops.cpython-312.pyc
DELETED
|
Binary file (595 Bytes)
|
|
|
sdpa-metal/scaled_dot_product_attention.metal
CHANGED
|
@@ -1,5 +1,3 @@
|
|
| 1 |
-
// Updated from MLX commit has f70764a
|
| 2 |
-
|
| 3 |
#include <metal_stdlib>
|
| 4 |
#include <metal_simdgroup>
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 1 |
#include <metal_stdlib>
|
| 2 |
#include <metal_simdgroup>
|
| 3 |
|