Instructions to use drbh/test-activation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use drbh/test-activation with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("drbh/test-activation") - Notebooks
- Google Colab
- Kaggle
Uploaded using `kernel-builder`.
Browse files
README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: kernels
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
This is the repository card of kernels-community/activation 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/activation")
|
| 15 |
+
silu_and_mul = kernel_module.silu_and_mul
|
| 16 |
+
|
| 17 |
+
silu_and_mul(...)
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
## Available functions
|
| 21 |
+
- `silu_and_mul`
|
| 22 |
+
- `mul_and_silu`
|
| 23 |
+
- `gelu_and_mul`
|
| 24 |
+
- `gelu_tanh_and_mul`
|
| 25 |
+
- `fatrelu_and_mul`
|
| 26 |
+
- `gelu_fast`
|
| 27 |
+
- `gelu_new`
|
| 28 |
+
- `gelu_quick`
|
| 29 |
+
- `gelu_tanh`
|
| 30 |
+
- `silu`
|
| 31 |
+
- `gelu`
|
| 32 |
+
- `layers`
|
| 33 |
+
|
| 34 |
+
## Benchmarks
|
| 35 |
+
|
| 36 |
+
Benchmarking script is available for this kernel. Run `kernels benchmark kernels-community/activation`.
|