sgl-project/sglang · error · NotImplementedError

DeepEP MoE is not supported yet in Step3 model.

Error message

DeepEP MoE is not supported yet in Step3 model.

What it means

The Step3 MoE gate path explicitly does not implement the DeepEP all-to-all backend; if the server was launched with --moe-a2a-backend deepep, init raises NotImplementedError rather than silently producing wrong routing.

Source

Thrown at python/sglang/srt/models/step3_vl.py:153

            num_experts=config.moe_num_experts,
            top_k=config.moe_top_k,
            hidden_size=config.hidden_size,
            intermediate_size=config.moe_intermediate_size,
            layer_id=layer_id,
            quant_config=quant_config,
            prefix=add_prefix("experts", prefix),
        )

        self.gate = ReplicatedLinear(
            config.hidden_size,
            output_size=config.moe_num_experts,
            bias=False,
            quant_config=None,
            prefix=add_prefix("gate", prefix),
        )

        if get_moe_a2a_backend().is_deepep():
            raise NotImplementedError("DeepEP MoE is not supported yet in Step3 model.")

    def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
        num_tokens, hidden_dim = hidden_states.shape
        hidden_states = hidden_states.view(-1, hidden_dim)

        router_logits, _ = self.gate(hidden_states)
        topk_output = self.topk(hidden_states, router_logits)
        final_hidden_states = self.experts(
            hidden_states=hidden_states, topk_output=topk_output
        )

        if self.tp_size > 1:
            final_hidden_states = tensor_model_parallel_all_reduce(final_hidden_states)
        return final_hidden_states.view(num_tokens, hidden_dim)


class Step3TextAttention(nn.Module):
    def __init__(

View on GitHub (pinned to 0132848349)

Solutions

  1. Remove --moe-a2a-backend deepep (use default or none) for step3-vl
  2. Unset env vars like SGLANG_MOE_A2A_BACKEND before launch
  3. Watch upstream for DeepEP support and update when available

Example fix

# before
--moe-a2a-backend deepep --model step3-vl
# after
--model step3-vl
Defensive patterns

Strategy: fallback

Validate before calling

import os
assert os.environ.get("SGLANG_MOE_A2A_BACKEND", "").lower() != "deepep", "step3-vl lacks DeepEP"

Prevention

When it happens

Trigger: Launching step3/step3-vl with --moe-a2a-backend deepep (get_moe_a2a_backend().is_deepep() true at python/sglang/srt/models/step3_vl.py:153).

Common situations: EP scripts copied from DeepSeek deployments that default to DeepEP; enabling deepep via SGLANG_* env vars globally and then launching step3-vl.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/541df1b38230a43d. Report an issue: GitHub.