{"record":{"id":"8877d2efb70de159","repo":"sgl-project/sglang","slug":"type-self-model-does-not-support-pipeline-paral","errorCode":null,"errorMessage":"{type(self.model)} does not support pipeline parallel yet!","messagePattern":"(.+?) does not support pipeline parallel yet!","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"python/sglang/srt/models/transformers.py","lineNumber":851,"sourceCode":"        except AttributeError:\n            return None\n\n    def _set_submodule(self, name: str, module: nn.Module):\n        if \".\" in name:\n            parent_name, child_name = name.rsplit(\".\", 1)\n            parent_module = self.model.get_submodule(parent_name)\n        else:\n            parent_module = self.model\n            child_name = name\n        setattr(parent_module, child_name, module)\n\n    def pipeline_parallel(self):\n        if self.pp_group.world_size <= 1:\n            return\n\n        pp_plan = self._get_model_pp_plan()\n        if not pp_plan:\n            raise ValueError(\n                f\"{type(self.model)} does not support pipeline parallel yet!\"\n            )\n\n        pp_keys = [re.sub(r\"^model\\.\", \"\", name) for name in pp_plan.keys()]\n        module_list_idx = None\n        module_list_name = None\n        for idx, name in enumerate(pp_keys):\n            if isinstance(self._get_submodule_or_none(name), nn.ModuleList):\n                if module_list_idx is not None:\n                    raise ValueError(\n                        \"Pipeline parallel with multiple ModuleList blocks is not supported.\"\n                    )\n                module_list_idx = idx\n                module_list_name = name\n\n        if module_list_idx is None or module_list_name is None:\n            raise ValueError(f\"Could not find ModuleList in {type(self.model)}.\")\n","sourceCodeStart":833,"sourceCodeEnd":869,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/models/transformers.py#L833-L869","documentation":"Pipeline parallel in the Transformers backend requires an explicit pp plan on the model class; with pp world_size>1 and no plan, pipeline_parallel raises because layer splitting points are unknown.","triggerScenarios":"Launching with --pipeline-parallel-size >1 a model lacking a pp plan (_pp_plan/base_model_pp_plan).","commonSituations":"Trying PP on architectures only validated for TP; using the generic backend where only specific models define pipeline points.","solutions":["Run with pp-size 1","Use a natively supported sglang architecture for pipeline parallelism","Define a pp plan on the model class marking the decoder ModuleList boundary"],"exampleFix":"# before\n--pp 2 on model without pp plan\n# after\n--pp 1 (or use architecture with defined pp plan)","handlingStrategy":"validation","validationCode":"pp = get_args().pipeline_parallel_size\nplan = getattr(HFModelCls, '_pp_plan', None)\nassert pp == 1 or plan, 'no pp plan; run with pp=1'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate pp plan presence before PP launches","Prefer TP for generic-backend models"],"tags":["pipeline-parallel","transformers-backend"],"backgroundTag":"no-pp-plan-for-model","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}