Instructions to use replicate/residual_rms_rocm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/residual_rms_rocm 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/residual_rms_rocm", version=1) - Notebooks
- Google Colab
- Kaggle
Download torch-ext/torch_binding.cpp from replicate/residual_rms_rocm: direct link, hf CLI and curl.
- Browser
- Download file 424 Bytes
-
https://huggingface.co/replicate/residual_rms_rocm/resolve/main/torch-ext/torch_binding.cpp
- Command line
-
hf download hf://replicate/residual_rms_rocm/torch-ext/torch_binding.cpp
-
curl -L -o torch_binding.cpp https://huggingface.co/replicate/residual_rms_rocm/resolve/main/torch-ext/torch_binding.cpp
424 Bytes
| TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) { | |
| ops.def("residual_rms(Tensor input, Tensor residual, Tensor weight, Tensor scale_tensor, float epsilon, Tensor! output, Tensor next_buffer, int num_threads, bool force_scalar) -> ()"); | |
| ops.impl("residual_rms", torch::kCUDA, &residual_rms); | |
| } | |
| REGISTER_EXTENSION(TORCH_EXTENSION_NAME) |