---
id: pr-sglang-22931
repo: sgl-project/sglang
pr: 22931
title: '[Fix/Kernel] Add JIT rmsnorm_hf kernel to fix transformers backend MMLU accuracy regression '
author: Jiminator
date: '2026-04-23'
url: https://github.com/sgl-project/sglang/pull/22931
source_category: upstream-code
architectures:
- sm90
tags:
- PDL
- compiler_runtime
- csrc kernel
- hopper
- jit_kernel
- norm_elementwise
techniques: []
hardware_features:
- hopper
- pdl
kernel_types:
- compiler
- norm
languages:
- cuda-cpp
captured_at: '2026-05-16'
status: merged
merge_sha: 68a8ed9b116047d4f52077be4ee9bca87f14e38a
inclusion_reason: Look for fusion, vectorization, dtype conversion, and store-traffic reductions before changing math.
changed_paths:
- python/sglang/jit_kernel/csrc/elementwise/rmsnorm_hf.cuh
- python/sglang/jit_kernel/rmsnorm_hf.py
- python/sglang/jit_kernel/tests/test_rmsnorm_hf.py
- python/sglang/srt/layers/layernorm.py
- python/sglang/srt/models/transformers.py
artifact_dir: evidence/pull-bundles/sglang/gh-22931
head_ref_oid: 022c42f577ae4f62d1af818f35b11c4a350ffbe7
---
# [Fix/Kernel] Add JIT rmsnorm_hf kernel to fix transformers backend MMLU accuracy regression 

- Repository: `sgl-project/sglang`
- PR: [22931](https://github.com/sgl-project/sglang/pull/22931)
- Decision: `Look for fusion, vectorization, dtype conversion, and store-traffic reductions before changing math.`
- Reason: Look for fusion, vectorization, dtype conversion, and store-traffic reductions before changing math.

## Changed Paths

- `python/sglang/jit_kernel/csrc/elementwise/rmsnorm_hf.cuh`
- `python/sglang/jit_kernel/rmsnorm_hf.py`
- `python/sglang/jit_kernel/tests/test_rmsnorm_hf.py`
- `python/sglang/srt/layers/layernorm.py`
- `python/sglang/srt/models/transformers.py`

## Evidence Bundle

`evidence/pull-bundles/sglang/gh-22931`
