[FlashInfer v0.6.16] Support FlashInfer CuTe DSL NVFP4 MoE quantization (#28354)
This commit is contained in:
@@ -6670,9 +6670,9 @@ class ServerArgs:
|
||||
if view.moe_runner_backend == "flashinfer_cutedsl":
|
||||
# modelopt_mixed with non-NVFP4 MoE layers is rejected at load time.
|
||||
assert (
|
||||
view.quantization in ["modelopt_fp4", "modelopt_mixed"]
|
||||
view.quantization in ["modelopt_fp4", "modelopt_mixed", "nvfp4_online"]
|
||||
or self.get_model_config().nvfp4_moe_meta is not None
|
||||
), f"Invalid quantization '{view.quantization}'. \nFlashInfer CuteDSL MOE currently supports only: 'modelopt_fp4', 'modelopt_mixed' (with NVFP4 MoE layers), or hybrid NVFP4 models."
|
||||
), f"Invalid quantization '{view.quantization}'. \nFlashInfer CuteDSL MOE currently supports only: 'modelopt_fp4', 'modelopt_mixed' (with NVFP4 MoE layers), 'nvfp4_online', or hybrid NVFP4 models."
|
||||
assert view.ep_size in [
|
||||
1,
|
||||
self.tp_size,
|
||||
@@ -6685,6 +6685,14 @@ class ServerArgs:
|
||||
f"flashinfer_cutedsl supports moe_a2a_backend='none', 'deepep', or 'flashinfer', "
|
||||
f"got '{view.moe_a2a_backend}'."
|
||||
)
|
||||
if view.moe_a2a_backend == "deepep" and (
|
||||
view.quantization == "nvfp4_online"
|
||||
or envs.SGLANG_FLASHINFER_NVFP4_PER_TOKEN_ACTIVATION.get()
|
||||
):
|
||||
raise ValueError(
|
||||
"flashinfer_cutedsl per-token NVFP4 activation requires "
|
||||
"moe_a2a_backend='none' or 'flashinfer'."
|
||||
)
|
||||
|
||||
if view.moe_runner_backend in ["flashinfer_trtllm", "experimental_sgl_trtllm"]:
|
||||
assert view.quantization in [
|
||||
@@ -7983,6 +7991,8 @@ class ServerArgs:
|
||||
"1" if self.enable_deterministic_inference else "0"
|
||||
)
|
||||
self._handle_custom_all_reduce_v2_multinode()
|
||||
if self.enable_deterministic_inference:
|
||||
envs.SGLANG_FLASHINFER_MOE_FUSED_FINALIZE.set("0")
|
||||
if self.debug_cuda_graph:
|
||||
if not (is_cuda() or is_hip()):
|
||||
logger.warning(
|
||||
|
||||
Reference in New Issue
Block a user