Instructions to use hellmans/metal-flash-sdpa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use hellmans/metal-flash-sdpa with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("hellmans/metal-flash-sdpa") - Notebooks
- Google Colab
- Kaggle
| [general] | |
| name = "metal_flash_sdpa" | |
| universal = false | |
| [torch] | |
| src = [ | |
| "torch-ext/torch_binding.cpp", | |
| "torch-ext/torch_binding.h", | |
| ] | |
| [kernel.sdpa_metal] | |
| backend = "metal" | |
| src = [ | |
| "sdpa-metal/scaled_dot_product_attention.mm", | |
| "sdpa-metal/scaled_dot_product_attention.metal", | |
| "sdpa-metal/common.h", | |
| ] | |
| depends = [ "torch" ] | |