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 kernel = get_kernel("kernels-community/flash-mla") - Notebooks
- Google Colab
- Kaggle
Uploaded using `kernel-builder`.
Browse files
README.md
CHANGED
|
@@ -1,24 +1,32 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
- flash-mla
|
| 5 |
-
- deepseek
|
| 6 |
-
- kernel-builder
|
| 7 |
---
|
| 8 |
|
| 9 |
-
|
| 10 |
|
| 11 |
-
##
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
nix develop -L
|
| 18 |
-
pytest -vv tests/
|
| 19 |
-
```
|
| 20 |
|
| 21 |
-
|
| 22 |
-
```bash
|
| 23 |
-
nix build .#bundle -L
|
| 24 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: kernels
|
| 3 |
+
license: mit
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
+
This is the repository card of kernels-community/flash-mla that has been pushed on the Hub. It was built to be used with the [`kernels` library](https://github.com/huggingface/kernels). This card was automatically generated.
|
| 7 |
|
| 8 |
+
## How to use
|
| 9 |
|
| 10 |
+
```python
|
| 11 |
+
# make sure `kernels` is installed: `pip install -U kernels`
|
| 12 |
+
from kernels import get_kernel
|
| 13 |
|
| 14 |
+
kernel_module = get_kernel("kernels-community/flash-mla")
|
| 15 |
+
__version__ = kernel_module.__version__
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
+
__version__(...)
|
|
|
|
|
|
|
| 18 |
```
|
| 19 |
+
|
| 20 |
+
## Available functions
|
| 21 |
+
- `__version__`
|
| 22 |
+
- `FlashMLASchedMeta`
|
| 23 |
+
- `get_mla_metadata`
|
| 24 |
+
- `flash_mla_with_kvcache`
|
| 25 |
+
- `flash_attn_varlen_func`
|
| 26 |
+
- `flash_attn_varlen_qkvpacked_func`
|
| 27 |
+
- `flash_attn_varlen_kvpacked_func`
|
| 28 |
+
- `flash_mla_sparse_fwd`
|
| 29 |
+
|
| 30 |
+
## Benchmarks
|
| 31 |
+
|
| 32 |
+
Benchmarking script is available for this kernel. Run `kernels benchmark kernels-community/flash-mla`.
|