---
id: pr-sglang-22204
repo: sgl-project/sglang
pr: 22204
title: '[RL] Refactor NVFP4 shuffling/swizzling to in-place replacement'
author: zianglih
date: '2026-04-13'
url: https://github.com/sgl-project/sglang/pull/22204
source_category: upstream-code
architectures:
- sm100
tags:
- fp4
- moe
- nvfp4
- quantization
- swizzling
techniques:
- swizzling
hardware_features:
- fp4
- nvfp4
kernel_types:
- moe
- quantization
languages:
- python
captured_at: '2026-04-17'
status: merged
merge_sha: 55935399426690573ad2e8fe040cb61dde837d82
inclusion_reason: kernel file changes
changed_paths:
- python/sglang/srt/layers/moe/moe_runner/flashinfer_trtllm.py
- python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4_moe.py
- python/sglang/srt/layers/quantization/modelopt_quant.py
- python/sglang/srt/server_args.py
- test/registered/backends/test_flashinfer_trtllm_gen_moe_backend.py
- test/registered/rl/test_update_weights_from_disk_blackwell.py
head_ref_oid: 20b69cf734c3260e6b2177b57e5b8f933933a1ec
artifact_dir: evidence/pull-bundles/sglang/gh-22204
---
# [RL] Refactor NVFP4 shuffling/swizzling to in-place replacement

- Repository: `sgl-project/sglang`
- PR: [22204](https://github.com/sgl-project/sglang/pull/22204)
- Decision: `kernel file changes`
- Reason: kernel file changes

## Changed Paths

- `python/sglang/srt/layers/moe/moe_runner/flashinfer_trtllm.py`
- `python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w4a4_nvfp4_moe.py`
- `python/sglang/srt/layers/quantization/modelopt_quant.py`
- `python/sglang/srt/server_args.py`
- `test/registered/backends/test_flashinfer_trtllm_gen_moe_backend.py`
- `test/registered/rl/test_update_weights_from_disk_blackwell.py`

## Evidence Bundle

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