sgl-project/sglang · error · ValueError
The hpc_ops MoE runner backend does not support fused shared
Error message
The hpc_ops MoE runner backend does not support fused shared experts.
What it means
The hpc_ops MoE runner backend in SGLang does not implement fused shared experts (num_fused_shared_experts). The _check_runner_config_supported validation raises this ValueError when the runner config requests fused shared experts while --moe-runner-backend hpc_ops is selected.
Source
Thrown at python/sglang/srt/layers/moe/moe_runner/hpc_ops.py:103
w13_weight_scale_inv: Optional[torch.Tensor] = None
w2_weight_scale_inv: Optional[torch.Tensor] = None
block_shape: Optional[List[int]] = None
# Per-tensor path
gate_up_alphas: Optional[torch.Tensor] = None
down_alphas: Optional[torch.Tensor] = None
w13_input_scale: Optional[torch.Tensor] = None
w2_input_scale: Optional[torch.Tensor] = None
def _check_runner_config_supported(runner_config: MoeRunnerConfig) -> None:
if runner_config.activation != "silu" or not runner_config.is_gated:
raise ValueError(
"The hpc_ops MoE runner backend only supports the gated silu "
f"activation, got activation={runner_config.activation}, "
f"is_gated={runner_config.is_gated}."
)
if runner_config.num_fused_shared_experts != 0:
raise ValueError(
"The hpc_ops MoE runner backend does not support fused shared experts."
)
if runner_config.apply_router_weight_on_input:
raise ValueError(
"The hpc_ops MoE runner backend does not support "
"apply_router_weight_on_input."
)
if runner_config.no_combine:
raise ValueError(
"The hpc_ops MoE runner backend does not support no_combine "
"(the fused kernel always reduces over top-k experts)."
)
if (
runner_config.gemm1_alpha is not None
or runner_config.gemm1_clamp_limit is not None
or runner_config.swiglu_limit is not None
):
raise ValueError(View on GitHub (pinned to 0132848349)
Solutions
- Switch back to the default/triton MoE runner backend (remove --moe-runner-backend hpc_ops)
- Disable shared-expert fusion so num_fused_shared_experts == 0 for this model
- Use a model without fused shared experts with hpc_ops
Example fix
# before python -m sglang.launch_server --model deepseek-ai/DeepSeek-V3 --moe-runner-backend hpc_ops # after python -m sglang.launch_server --model deepseek-ai/DeepSeek-V3 --moe-runner-backend triton
Defensive patterns
Strategy: validation
Validate before calling
from sglang.srt.layers.moe.utils import MoeRunnerBackend
backend = server_args.moe_runner_backend
if backend == MoeRunnerBackend.HPC_OPS and model_config.num_fused_shared_experts != 0:
raise SystemExit("hpc_ops does not support fused shared experts; use triton") Prevention
- Check model config for num_fused_shared_experts before selecting hpc_ops
- Keep per-model server-arg presets instead of reusing one script across model families
When it happens
Trigger: Running a model whose MoE layer sets num_fused_shared_experts != 0 (e.g. DeepSeek-V3-style models with fused shared expert projection) together with --moe-runner-backend hpc_ops; the fused_experts_none_to_hpc_ops fused-func path runs the config check on first MoE invocation.
Common situations: Switching a shared-expert-fused checkpoint (DeepSeek V2/V3 family) to the hpc_ops backend; enabling shared-expert fusion flags or a server args preset that turns on num_fused_shared_experts.
Related errors
- The hpc_ops MoE runner backend does not support apply_router
- The hpc_ops MoE runner backend does not support no_combine (
- The hpc_ops MoE runner backend runs a plain SiLU-and-mul; it
- The hpc_ops MoE runner backend only supports FP8-quantized M
- Unsupported activation: {self.activation}
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/b020648e131a94a5.
Report an issue: GitHub.