Instructions to use kernels-community/flash-mla with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use kernels-community/flash-mla 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("kernels-community/flash-mla", version=1) - Notebooks
- Google Colab
- Kaggle
Download build/torch26-cxx11-cu124-x86_64-linux/flash_mla/_ops.py from kernels-community/flash-mla: direct link, hf CLI and curl.
- Browser
- Download file 212 Bytes
-
https://huggingface.co/kernels-community/flash-mla/resolve/main/build/torch26-cxx11-cu124-x86_64-linux/flash_mla/_ops.py
- Command line
-
hf download hf://kernels-community/flash-mla/build/torch26-cxx11-cu124-x86_64-linux/flash_mla/_ops.py
-
curl -L -o _ops.py https://huggingface.co/kernels-community/flash-mla/resolve/main/build/torch26-cxx11-cu124-x86_64-linux/flash_mla/_ops.py
212 Bytes
| import torch | |
| from . import _flash_mla_d4f4195 | |
| ops = torch.ops._flash_mla_d4f4195 | |
| def add_op_namespace_prefix(op_name: str): | |
| """ | |
| Prefix op by namespace. | |
| """ | |
| return f"_flash_mla_d4f4195::{op_name}" |