{"record":{"id":"3b69ffa478c8eaf8","repo":"sgl-project/sglang","slug":"unsupported-attention-type-config-attention-type","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_linear.py","lineNumber":782,"sourceCode":"                    rope_theta=getattr(config, \"rope_theta\", 600000),\n                    rope_scaling=config.rope_scaling,\n                    max_position_embeddings=262144,\n                    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                )\n            else:\n                logger.debug(f\"layer {layer_id} use gqa\")\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 = self._is_layer_sparse(config, self.layer_id)\n        is_previous_moe_layer = self._is_layer_sparse(config, self.layer_id - 1)\n        is_next_layer_moe_layer = self._is_layer_sparse(config, self.layer_id + 1)\n        if self.expert_num == 1:\n            self.mlp = BailingMLP(\n                hidden_size=self.hidden_size,\n                intermediate_size=config.intermediate_size,\n                quant_config=quant_config,\n                prefix=add_prefix(\"mlp\", prefix),\n            )\n        else:\n            if is_nextn or self.layer_id >= config.first_k_dense_replace:\n                # MoE layer\n                self.mlp = BailingMoE(\n                    config,","sourceCodeStart":764,"sourceCodeEnd":800,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/models/bailing_moe_linear.py#L764-L800","documentation":"Each Bailing-MoE-linear layer dispatches attention construction on config.attention_type; only specific values (full attention and linear/GDN-style) are handled, and anything else hits the else branch raising ValueError.","triggerScenarios":"Loading a bailing_moe_linear config with an attention_type value not handled by the if/elif chain (e.g. a new or misspelled type string).","commonSituations":"New checkpoint revisions introducing an attention_type the installed SGLang version doesn't support; typo in config.json.","solutions":["Check config.json attention_type and set it to a supported value (e.g. \"full\" or the linear attention type used by this model family)","Upgrade SGLang to a version that supports the new attention_type"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"assert config.attention_type in {\"full\", \"linear\"}, f\"unsupported {config.attention_type}\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cross-check attention_type against the SGLang version's supported set"],"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"}