[FlashInfer v0.6.11] [RL] Support FlashInfer per-token NVFP4 MoE (#22918)

This commit is contained in:
Ziang Li
2026-05-19 01:04:48 -07:00
committed by GitHub
parent fbfddfd5c7
commit 78cb38ed5e
6 changed files with 42 additions and 23 deletions
@@ -157,6 +157,7 @@ class FlashinferTrtllmGenMoeBackendMXFP8Base:
class FlashinferTrtllmGenMoeBackendNVFP4Base:
backend = None
extra_env = {}
@classmethod
def setUpClass(cls):
@@ -166,7 +167,7 @@ class FlashinferTrtllmGenMoeBackendNVFP4Base:
cls.model,
cls.base_url,
timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
env={**os.environ, "SGLANG_ENABLE_JIT_DEEPGEMM": "False"},
env={**os.environ, **cls.extra_env, "SGLANG_ENABLE_JIT_DEEPGEMM": "False"},
other_args=[
"--moe-runner-backend",
cls.backend,
@@ -204,30 +205,12 @@ class TestFlashinferTrtllmGenMoeBackendFP8(
backend = "flashinfer_trtllm"
class TestFlashinferTrtllmGenMoeBackendMXFP8(
FlashinferTrtllmGenMoeBackendMXFP8Base, CustomTestCase
):
backend = "flashinfer_trtllm"
class TestFlashinferTrtllmGenMoeBackendBF16(
FlashinferTrtllmGenMoeBackendBF16Base, CustomTestCase
):
backend = "flashinfer_trtllm"
class TestFlashinferTrtllmGenMoeBackendNVFP4(
FlashinferTrtllmGenMoeBackendNVFP4Base, CustomTestCase
):
backend = "flashinfer_trtllm"
class TestFlashinferTrtllmGenMoeBackendFP8Routed(
FlashinferTrtllmGenMoeBackendFP8Base, CustomTestCase
):
backend = "flashinfer_trtllm_routed"
class TestFlashinferTrtllmGenMoeBackendMXFP8Routed(
FlashinferTrtllmGenMoeBackendMXFP8Base, CustomTestCase
):
@@ -240,9 +223,10 @@ class TestFlashinferTrtllmGenMoeBackendBF16Routed(
backend = "flashinfer_trtllm_routed"
class TestFlashinferTrtllmGenMoeBackendNVFP4Routed(
class TestFlashinferTrtllmGenMoeBackendPerTokenNVFP4Routed(
FlashinferTrtllmGenMoeBackendNVFP4Base, CustomTestCase
):
extra_env = {"SGLANG_FLASHINFER_NVFP4_PER_TOKEN_ACTIVATION": "1"}
backend = "flashinfer_trtllm_routed"