Instructions to use kernels-community/activation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use kernels-community/activation 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/activation", version=1) - Notebooks
- Google Colab
- Kaggle
Uploaded using `kernel-builder`.
Browse files
README.md
CHANGED
|
@@ -1,48 +1,36 @@
|
|
| 1 |
---
|
| 2 |
library_name: kernels
|
| 3 |
-
|
| 4 |
-
|
| 5 |
|
| 6 |
-
This is the repository card of
|
| 7 |
|
| 8 |
## How to use
|
| 9 |
-
{% if functions %}
|
| 10 |
|
| 11 |
```python
|
| 12 |
# make sure `kernels` is installed: `pip install -U kernels`
|
| 13 |
from kernels import get_kernel
|
| 14 |
|
| 15 |
-
kernel_module = get_kernel("
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
| 19 |
```
|
| 20 |
-
{% else %}
|
| 21 |
-
|
| 22 |
-
Usage example not available.
|
| 23 |
-
{% endif %}
|
| 24 |
|
| 25 |
## Available functions
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
- `
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
## Benchmarks
|
| 36 |
-
{% if has_benchmark %}
|
| 37 |
-
|
| 38 |
-
Benchmarking script is available for this kernel. Run `kernels benchmark {{ repo_id }}`.
|
| 39 |
-
{% else %}
|
| 40 |
-
|
| 41 |
-
No benchmark available yet.
|
| 42 |
-
{% endif %}
|
| 43 |
-
{% if upstream %}
|
| 44 |
-
|
| 45 |
-
## Source code
|
| 46 |
|
| 47 |
-
|
| 48 |
-
{% endif %}
|
|
|
|
| 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`.
|
|
|