---
id: pr-flashinfer-3027
repo: flashinfer-ai/flashinfer
pr: 3027
title: '[feat] Trtllm-gen Per-token Nvfp4 MoE'
author: IwakuraRein
date: '2026-05-01'
url: https://github.com/flashinfer-ai/flashinfer/pull/3027
source_category: upstream-code
architectures:
- sm100
tags:
- cuda kernel
- fp4
- fused moe
- gemm_quant
- moe_routing
- nvfp4
- sm100
techniques:
- fine-grained-quantization
- kernel-fusion
- vectorized-loads
- warp-specialization
hardware_features:
- blackwell
- fp4
- nvfp4
kernel_types:
- gemm
- moe
languages:
- cuda-cpp
- cute-dsl
captured_at: '2026-05-16'
status: merged
merge_sha: 537a3b560dd2d5d9605ab27a9cf3276e8dc3b95b
inclusion_reason: Inspect scale layout, accumulator type, tile/schedule choice, epilogue fusion, and partial-tile guards before deriving a candidate.
changed_paths:
- csrc/fused_moe/cutlass_backend/cutlass_fused_moe_kernels.cuh
- csrc/nv_internal/cpp/kernels/quantization.cu
- csrc/nv_internal/tensorrt_llm/kernels/quantization.cuh
- csrc/nv_internal/tensorrt_llm/kernels/quantization.h
- csrc/nv_internal/tensorrt_llm/kernels/quantization_utils.cuh
- csrc/nv_internal/tensorrt_llm/thop/fp4Quantize.cpp
- csrc/nv_internal/tensorrt_llm/thop/fp4Quantize.h
- csrc/trtllm_batched_gemm_runner.cu
- csrc/trtllm_fused_moe_kernel_launcher.cu
- csrc/trtllm_fused_moe_runner.cu
- flashinfer/artifacts.py
- flashinfer/fused_moe/core.py
- flashinfer/jit/fused_moe.py
- flashinfer/quantization/fp4_quantization.py
- flashinfer/tllm_enums.py
- include/flashinfer/trtllm/batched_gemm/KernelRunner.h
- include/flashinfer/trtllm/fused_moe/runner.h
- tests/moe/test_trtllm_gen_per_token_moe.py
- tests/test_helpers/utils_fp4.py
- tests/utils/test_fp4_quantize.py
artifact_dir: evidence/pull-bundles/flashinfer/gh-3027
head_ref_oid: 6295fa10d5d18e5137bf5c60b7c7be514d0b6cb4
---
# [feat] Trtllm-gen Per-token Nvfp4 MoE

- Repository: `flashinfer-ai/flashinfer`
- PR: [3027](https://github.com/flashinfer-ai/flashinfer/pull/3027)
- Decision: `Inspect scale layout, accumulator type, tile/schedule choice, epilogue fusion, and partial-tile guards before deriving a candidate.`
- Reason: Inspect scale layout, accumulator type, tile/schedule choice, epilogue fusion, and partial-tile guards before deriving a candidate.

## Changed Paths

- `csrc/fused_moe/cutlass_backend/cutlass_fused_moe_kernels.cuh`
- `csrc/nv_internal/cpp/kernels/quantization.cu`
- `csrc/nv_internal/tensorrt_llm/kernels/quantization.cuh`
- `csrc/nv_internal/tensorrt_llm/kernels/quantization.h`
- `csrc/nv_internal/tensorrt_llm/kernels/quantization_utils.cuh`
- `csrc/nv_internal/tensorrt_llm/thop/fp4Quantize.cpp`
- `csrc/nv_internal/tensorrt_llm/thop/fp4Quantize.h`
- `csrc/trtllm_batched_gemm_runner.cu`
- `csrc/trtllm_fused_moe_kernel_launcher.cu`
- `csrc/trtllm_fused_moe_runner.cu`
- `flashinfer/artifacts.py`
- `flashinfer/fused_moe/core.py`
- `flashinfer/jit/fused_moe.py`
- `flashinfer/quantization/fp4_quantization.py`
- `flashinfer/tllm_enums.py`
- `include/flashinfer/trtllm/batched_gemm/KernelRunner.h`
- `include/flashinfer/trtllm/fused_moe/runner.h`
- `tests/moe/test_trtllm_gen_per_token_moe.py`
- `tests/test_helpers/utils_fp4.py`
- `tests/utils/test_fp4_quantize.py`

## Evidence Bundle

`evidence/pull-bundles/flashinfer/gh-3027`
