Kernels:
Trusted publisher
Uploaded using `kernel-builder`.
Browse files
README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: kernels
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
This is the repository card of kernels-community/paged-attention 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/paged-attention", version=1)
|
| 15 |
+
convert_fp8 = kernel_module.convert_fp8
|
| 16 |
+
|
| 17 |
+
convert_fp8(...)
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
## Available functions
|
| 21 |
+
- `convert_fp8`
|
| 22 |
+
- `copy_blocks`
|
| 23 |
+
- `ops`
|
| 24 |
+
- `paged_attention_v1`
|
| 25 |
+
- `paged_attention_v2`
|
| 26 |
+
- `reshape_and_cache`
|
| 27 |
+
- `reshape_and_cache_flash`
|
| 28 |
+
- `swap_blocks`
|
| 29 |
+
|
| 30 |
+
## Benchmarks
|
| 31 |
+
|
| 32 |
+
Benchmarking script is available for this kernel. Run `kernels benchmark kernels-community/paged-attention --version 1`.
|