{"record":{"id":"7a68c92c0e66f640","repo":"sgl-project/sglang","slug":"unsupported-attention-type-config-attention-type-7a68c9","errorCode":null,"errorMessage":"Unsupported attention type: {config.attention_type}","messagePattern":"Unsupported attention type: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"python/sglang/srt/models/bailing_moe_v3.py","lineNumber":972,"sourceCode":"                    quant_config=quant_config,\n                    layer_id=layer_id,\n                    reduce_results=False,\n                    prefix=add_prefix(\"attention\", prefix),\n                    alt_stream=alt_stream,\n                    skip_rope=(\n                        getattr(config, \"use_mla_nope\", False)\n                        or config.qk_rope_head_dim == 0\n                    ),\n                )\n            else:\n                self.attention = BailingMoEAttention(\n                    config,\n                    quant_config=quant_config,\n                    layer_id=self.layer_id,\n                    prefix=prefix + \".attention\",\n                )\n        else:\n            raise ValueError(f\"Unsupported attention type: {config.attention_type}\")\n\n        self.expert_num = config.num_experts\n        self.hidden_size = config.hidden_size\n        is_moe_layer = is_nextn or (\n            not (self.expert_num == 1)\n            and (self.layer_id >= config.first_k_dense_replace)\n        )\n        self.is_layer_sparse = is_moe_layer\n        is_previous_moe_layer = not (self.expert_num == 1) and (\n            self.layer_id - 1 >= config.first_k_dense_replace\n        )\n        is_next_layer_sparse = not (self.expert_num == 1) and (\n            self.layer_id + 1 >= config.first_k_dense_replace\n        )\n        if enable_moe_dense_fully_dp():\n            mlp_tp_rank, mlp_tp_size = 0, 1\n        else:\n            mlp_tp_rank, mlp_tp_size = None, None","sourceCodeStart":954,"sourceCodeEnd":990,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/models/bailing_moe_v3.py#L954-L990","documentation":"Bailing v3 layer construction dispatches on config.attention_type; unrecognized values (neither full nor the supported linear attention type) raise this error before the MoE layout is built.","triggerScenarios":"Loading a bailing_moe_v3 config whose attention_type is unsupported by the installed SGLang version.","commonSituations":"Newer checkpoint revision with a new attention flavor; typo in attention_type; downgrade of SGLang.","solutions":["Upgrade SGLang to a release supporting this attention_type","Fix attention_type in config.json to a supported value (\"full\" or the model's linear attention type)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"assert config.attention_type in {\"full\", \"linear\"}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Upgrade SGLang when adopting new Bailing checkpoints"],"tags":["attention","config-validation","bailing","hybrid-model"],"backgroundTag":"unsupported-config-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}