{"record":{"id":"4c811ba5093ece15","repo":"sgl-project/sglang","slug":"unsupported-activation-config-hidden-act-only","errorCode":null,"errorMessage":"Unsupported activation: {config.hidden_act}. Only silu is supported for now.","messagePattern":"Unsupported activation: (.+?)\\. Only silu is supported for now\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"python/sglang/srt/models/bailing_moe.py","lineNumber":192,"sourceCode":"        layer_id: int,\n        config: PretrainedConfig,\n        quant_config: Optional[QuantizationConfig] = None,\n        alt_stream: Optional[torch.cuda.Stream] = None,\n        prefix: str = \"\",\n    ):\n        super().__init__()\n        self.layer_id = layer_id\n        self.alt_stream = alt_stream\n        self.tp_size = get_parallel().tp_size\n        self.top_k = config.num_experts_per_tok\n        self.norm_topk_prob = config.norm_topk_prob\n        self.hidden_size = config.hidden_size\n        self.num_shared_experts = config.num_shared_experts\n        self.routed_scaling_factor = getattr(config, \"routed_scaling_factor\", 1.0)\n        self.score_function = getattr(config, \"score_function\", None)\n\n        if config.hidden_act != \"silu\":\n            raise ValueError(\n                f\"Unsupported activation: {config.hidden_act}. \"\n                \"Only silu is supported for now.\"\n            )\n\n        # Gate always runs at half / full precision for now.\n        router_dtype = getattr(config, \"router_dtype\", None)\n        if router_dtype is None:\n            self.router_dtype = None\n        elif router_dtype == \"fp32\":\n            self.router_dtype = torch.float32\n        else:\n            self.router_dtype = torch.bfloat16\n\n        # TODO global_server_args.ep_num_redundant_experts is used for eplb, not supported now\n        assert get_exec().moe.ep_num_redundant_experts == 0\n        # check group topk\n        self.num_expert_group = getattr(config, \"n_group\", 0)\n        self.topk_group = getattr(config, \"topk_group\", 0)","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/models/bailing_moe.py#L174-L210","documentation":"The Bailing MoE expert MLP also enforces silu activation (separate check from the dense MLP). It reads config.hidden_act during MoE block construction.","triggerScenarios":"Loading a bailing_moe config where hidden_act != \"silu\"; the error surfaces from the experts module even if the dense MLP check passed because both read the same field.","commonSituations":"Same root cause as 5147: edited configs or nonstandard Bailing variants.","solutions":["Set \"hidden_act\": \"silu\" in config.json","Use the official checkpoint unchanged"],"exampleFix":"// before\n\"hidden_act\": \"gelu\"\n// after\n\"hidden_act\": \"silu\"","handlingStrategy":"validation","validationCode":"assert config.hidden_act == \"silu\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate activation before model load"],"tags":["activation","config-validation","bailing-moe","moe"],"backgroundTag":"unsupported-activation-function","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}