Run this model with HF Jobs
Run kernels-community/layer_norm on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/kernels-community/layer_norm. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/kernels-community/layer_norm on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use kernels-community/layer_norm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use kernels-community/layer_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("kernels-community/layer_norm", version=1) - Notebooks
- Google Colab
- Kaggle
rm bindings
Browse files824 unmodified lines825826827828829830831832833834835836837838839840841842843844845846847848849850824 unmodified linesreturn result;}////////////////////////////////////////////////////////////////////////////////////////////////////PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {m.doc() = "CUDA DropoutAddLayerNorm";m.def("dropout_add_ln_fwd", &dropout_add_ln_fwd, "Run Dropout + Add + LayerNorm forward kernel",py::arg("x0"), py::arg("residual"), py::arg("gamma"), py::arg("beta_"),py::arg("rowscale_"), py::arg("colscale_"), py::arg("x0_subset_"), py::arg("z_subset_"),py::arg("dropout_p"), py::arg("epsilon"), py::arg("rowscale_const"), py::arg("z_numrows"),py::arg("gen_"), py::arg("residual_in_fp32")=false, py::arg("is_rms_norm")=false);m.def("dropout_add_ln_bwd", &dropout_add_ln_bwd, "Run Dropout + Add + LayerNorm backward kernel",py::arg("dz"), py::arg("dx_"), py::arg("x"), py::arg("x0_"), py::arg("dmask_"), py::arg("mu"),py::arg("rsigma"), py::arg("gamma"), py::arg("rowscale_"), py::arg("colscale_"),py::arg("x0_subset_"), py::arg("z_subset_"), py::arg("dropout_p"), py::arg("rowscale_const"),py::arg("x0_numrows"), py::arg("has_residual"), py::arg("is_rms_norm")=false);m.def("dropout_add_ln_parallel_residual_fwd", &dropout_add_ln_parallel_residual_fwd, "Run Dropout + Add + LayerNorm parallel residual forward kernel",py::arg("x0"), py::arg("x1_"), py::arg("residual"), py::arg("gamma0"), py::arg("beta0_"),py::arg("gamma1_"), py::arg("beta1_"), py::arg("dropout_p"), py::arg("epsilon"),py::arg("gen_"), py::arg("residual_in_fp32")=false, py::arg("is_rms_norm")=false);m.def("dropout_add_ln_parallel_residual_bwd", &dropout_add_ln_parallel_residual_bwd, "Run Dropout + Add + LayerNorm parallel residual backward kernel",py::arg("dz0"), py::arg("dz1_"), py::arg("dx_"), py::arg("x"), py::arg("dmask0_"),py::arg("dmask1_"), py::arg("mu"), py::arg("rsigma"), py::arg("gamma0"), py::arg("gamma1_"),py::arg("dropout_p"), py::arg("has_x1"), py::arg("has_residual"), py::arg("is_rms_norm")=false);}824 unmodified lines825826827828824 unmodified linesreturn result;}////////////////////////////////////////////////////////////////////////////////////////////////////
layer-norm/ln_api.cpp+1-23