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
| void flash_attention_varlen( | |
| torch::Tensor &out, | |
| torch::Tensor &query, | |
| torch::Tensor &key, | |
| torch::Tensor &value, | |
| torch::Tensor &cu_seqlens_q, | |
| torch::Tensor &cu_seqlens_k, | |
| int64_t max_seqlen_q, | |
| int64_t max_seqlen_k, | |
| bool do_causal, | |
| double scale, | |
| double softcapping); | |