sgl-project/sglang · error · ValueError

Intern-S2-Mobius baseline does not support pipeline parallel

Error message

Intern-S2-Mobius baseline does not support pipeline parallelism

What it means

The baseline InternS2MobiusModel explicitly refuses pipeline parallelism (pp world_size != 1). The baseline implementation has no inter-stage communication; the conditional-generation wrapper handles layer partitioning.

Source

Thrown at python/sglang/srt/models/interns2_mobius.py:700

            )
        return self._forward_after_attention(
            hidden_states, residual, forward_batch, meta_mlp
        )


class InternS2MobiusForCausalLM(Qwen3_5ForCausalLM):
    def __init__(
        self,
        config: InternS2MobiusTextConfig,
        quant_config: QuantizationConfig | None = None,
        prefix: str = "",
    ) -> None:
        nn.Module.__init__(self)
        self.config = config
        self.hidden_size = config.hidden_size
        self.pp_group = get_pp_group()
        if self.pp_group.world_size != 1:
            raise ValueError(
                "Intern-S2-Mobius baseline does not support pipeline parallelism"
            )

        alt_stream = get_stream("alt") if _is_cuda else None
        self.embed_tokens = VocabParallelEmbedding(
            config.vocab_size,
            config.hidden_size,
            org_num_embeddings=config.vocab_size,
            enable_tp=not is_dp_attention_enabled(),
        )

        bank_prefix = prefix.replace("model.language_model", "model")
        self.meta_mlp = nn.ModuleList(
            [
                InternS2MobiusRoutedExpertBank(
                    bank_id=bank_id,
                    config=config,
                    quant_config=quant_config,

View on GitHub (pinned to 0132848349)

Solutions

  1. Drop --pipeline-parallel-size / set it to 1 and scale with TP instead
  2. Load the model via the InternS2MobiusForConditionalGeneration wrapper rather than the baseline class
  3. If PP is required, extend the model with pp_group support upstream

Example fix

# before
--pp 2 --tp 4

# after
--pp 1 --tp 8
Defensive patterns

Strategy: validation

Validate before calling

from sglang.srt.distributed import get_parallel_state
assert get_parallel_state().get_pp_group().world_size == 1, "baseline model requires PP=1"

Prevention

When it happens

Trigger: Launching with --pipeline-parallel-size > 1 (or a PP env) while the runtime instantiates the baseline model class directly.

Common situations: Multi-node serving with PP, or copied launch scripts that set PP flags. Using InternS2MobiusForConditionalGeneration instead routes around this path.

Related errors


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