Instructions to use replicate/residual_rms with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use replicate/residual_rms 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", version=1) - Notebooks
- Google Colab
- Kaggle
File size: 426 Bytes
79aac9d | 1 2 3 4 5 6 7 8 9 10 11 12 13 | #include <torch/library.h>
#include "registration.h"
#include "torch_binding.h"
TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) {
// Compute the residual root mean square.
ops.def("residual_rms(Tensor input, Tensor residual, Tensor weight, Tensor output, float epsilon, float scale, int mode, int num_threads) -> ()");
ops.impl("residual_rms", torch::kCUDA, &residual_rms);
}
REGISTER_EXTENSION(TORCH_EXTENSION_NAME)
|