From 14d6e1d3b134ac484d94f5756a1a12581c8b0722 Mon Sep 17 00:00:00 2001 From: Zhihao Wang <101526713+xiuhu17@users.noreply.github.com> Date: Fri, 24 Jul 2026 16:01:54 -0700 Subject: [PATCH] [RL] Support FlashInfer TRT-LLM NVFP4 MoE in the RL weight checker (#31085) Signed-off-by: zhihaow6 --- python/sglang/srt/utils/weight_checker_comparator.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/utils/weight_checker_comparator.py b/python/sglang/srt/utils/weight_checker_comparator.py index 0dd65674e..11d387e41 100644 --- a/python/sglang/srt/utils/weight_checker_comparator.py +++ b/python/sglang/srt/utils/weight_checker_comparator.py @@ -161,7 +161,13 @@ def select_comparable_weight(quant_method) -> Optional[type]: and not quant_method.use_mxfp8 ): return Fp8BlockComparable - if isinstance(quant_method, (ModelOptFp4LinearMethod, ModelOptNvFp4FusedMoEMethod)): + if isinstance(quant_method, ModelOptNvFp4FusedMoEMethod): + if getattr(quant_method, "enable_flashinfer_trtllm_moe", False): + return None + raise NotImplementedError( + f"weight checker has no ComparableWeight for {type(quant_method).__name__}" + ) + if isinstance(quant_method, ModelOptFp4LinearMethod): raise NotImplementedError( f"weight checker has no ComparableWeight for {type(quant_method).__name__}" )