Instructions to use marcsun13/ggml-norm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use marcsun13/ggml-norm 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("marcsun13/ggml-norm", version=1) - Notebooks
- Google Colab
- Kaggle
File size: 407 Bytes
9466896 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include <torch/library.h>
#include "registration.h"
#include "torch_binding.h"
TORCH_LIBRARY_EXPAND(TORCH_EXTENSION_NAME, ops) {
ops.def("rms_norm(Tensor x, Tensor weight, float eps) -> Tensor");
// The schema is the same for every backend; only the implementation differs.
#if defined(METAL_KERNEL)
ops.impl("rms_norm", torch::kMPS, &rms_norm);
#endif
}
REGISTER_EXTENSION(TORCH_EXTENSION_NAME)
|