Instructions to use replicate/rwkv with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/rwkv 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("replicate/rwkv", version=1) - Notebooks
- Google Colab
- Kaggle
Download build.toml from replicate/rwkv: direct link, hf CLI and curl.
- Browser
- Download file 450 Bytes
-
https://huggingface.co/replicate/rwkv/resolve/main/build.toml
- Command line
-
hf download hf://replicate/rwkv/build.toml
-
curl -L -o build.toml https://huggingface.co/replicate/rwkv/resolve/main/build.toml
450 Bytes
| [general] | |
| name = "rwkv" | |
| universal = false | |
| [torch] | |
| src = [ | |
| "torch-ext/torch_binding.cpp", | |
| ] | |
| [kernel.rwkv] | |
| depends = ["torch"] | |
| backend = "cuda" | |
| cuda-capabilities = [ | |
| "8.0", | |
| "8.9", | |
| "9.0", | |
| "10.0", | |
| "12.0", | |
| ] | |
| include = ["."] | |
| src = [ | |
| "rwkv/wkv_cuda.cu", | |
| "rwkv/wkv_cuda_bf16.cu", | |
| ] | |
| cuda-flags = [ | |
| "-res-usage", | |
| "--use_fast_math", | |
| "-O3", | |
| "--extra-device-vectorization", | |
| "-DTmax=1024", | |
| ] | |