{"record":{"id":"278e5ae2169e375c","repo":"sgl-project/sglang","slug":"pd-disagg-heterogeneous-tp-not-supported-for-mini-278e5a","errorCode":null,"errorMessage":"PD disagg: heterogeneous TP not supported for MiniMax sparse index yet.","messagePattern":"PD disagg: heterogeneous TP not supported for MiniMax sparse index yet\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/disaggregation/mori/conn.py","lineNumber":1383,"sourceCode":"        state_type: str,\n    ) -> List[TransferStatus]:\n        # TP mismatch check for non-MLA SWA\n        if (\n            state_type == \"swa\"\n            and not self.is_mla_backend\n            and peer_info.decode_tp_size != self.attn_tp_size\n        ):\n            raise RuntimeError(\n                f\"PD state transfer does not support TP-mismatched non-MLA SWA models \"\n                f\"(prefill_tp_size={self.attn_tp_size}, decode_tp_size={peer_info.decode_tp_size})\"\n            )\n        if state_type == \"minimax_index_k\":\n            if self.pp_size is not None and self.pp_size > 1:\n                raise RuntimeError(\n                    \"PD disagg: PP>1 not supported for MiniMax sparse index yet.\"\n                )\n            if peer_info.decode_tp_size != self.attn_tp_size:\n                raise RuntimeError(\n                    \"PD disagg: heterogeneous TP not supported for MiniMax sparse index yet.\"\n                )\n\n        common_len = min(src_state_indices.size, dst_state_indices.size)\n        if (\n            state_type == \"c128_state\"\n            and common_len == 0\n            and src_state_indices.size == 0\n            and dst_state_indices.size == 0\n        ):\n            return []\n        if common_len == 0 and max(src_state_indices.size, dst_state_indices.size) > 0:\n            raise RuntimeError(\n                f\"No overlapping state indices for state_type={state_type}\"\n            )\n        if src_state_indices.size != dst_state_indices.size:\n            # These components are position- or request-indexed: truncating\n            # silently misaligns rows and corrupts KV. Paged swa/dsa tolerate","sourceCodeStart":1365,"sourceCodeEnd":1401,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/disaggregation/mori/conn.py#L1365-L1401","documentation":"MiniMax sparse index (minimax_index_k) state transfer requires prefill and decode to use the same TP size; if peer_info.decode_tp_size differs from the local attention TP size the transfer aborts. The sparse index layout is TP-sharded and has no re-sharding logic in the transfer path.","triggerScenarios":"send_state with state_type=='minimax_index_k' where the decode instance was launched with a different --tp than the prefill instance (e.g. prefill tp=8, decode tp=4).","commonSituations":"Heterogeneous PD deployments sized independently for prefill and decode throughput; supported for some KV layouts but not for MiniMax sparse index state.","solutions":["Launch prefill and decode with identical TP sizes for MiniMax models","Re-plan capacity using equal TP (scale ranks per node, not TP degree) until heterogeneous TP support lands","Verify with --tp printed on both server logs that the degrees actually match"],"exampleFix":"# before\n--disaggregation-prefill --tp 8   /   --disaggregation-decode --tp 4\n\n# after\n--disaggregation-prefill --tp 8   /   --disaggregation-decode --tp 8","handlingStrategy":"validation","validationCode":"if \"minimax_index_k\" in (kv_args.state_types or []):\n    assert peer_info.decode_tp_size == conn.attn_tp_size, (\n        \"MiniMax sparse index requires identical TP on prefill and decode\"\n    )\n","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use identical --tp on prefill and decode for MiniMax models","Add a deployment manifest check that asserts TP parity before startup"],"tags":["disaggregation","minimax","tensor-parallel","heterogeneous-tp","sparse-attention"],"backgroundTag":"unsupported-parallel-config","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}