{"record":{"id":"5de0c49a4527a006","repo":"sgl-project/sglang","slug":"unsupported-activation-self-activation-5de0c4","errorCode":null,"errorMessage":"Unsupported activation: {self.activation}","messagePattern":"Unsupported activation: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/layers/moe/moe_runner/humming.py","lineNumber":406,"sourceCode":"            out_2d = outputs.view(-1, outputs.shape[-1])\n            act_and_mul_triton(\n                gateup_output=in_2d,\n                down_input=out_2d,\n                config={},\n                activation=\"silu\",\n                swiglu_limit=float(self.swiglu_limit),\n            )\n            return\n        if self.activation == \"silu\":\n            from sgl_kernel import silu_and_mul\n\n            silu_and_mul(inputs, outputs)\n        elif self.activation == \"gelu\":\n            from sgl_kernel import gelu_and_mul\n\n            gelu_and_mul(inputs, outputs)\n        else:\n            raise ValueError(f\"Unsupported activation: {self.activation}\")\n\n    def _grouped_masked_act_quant(\n        self,\n        gate_up: torch.Tensor,\n        expert_num_tokens: torch.Tensor,\n        buffers: dict[str, torch.Tensor],\n    ) -> tuple[torch.Tensor, torch.Tensor | None]:\n        num_experts, max_tokens, two_i = gate_up.shape\n        intermediate = two_i // 2\n        w2_meta = self.layer.humming_metas[\"w2\"]\n        groups = intermediate // 128\n        num_threads = intermediate // 8\n        use_fused_masked_act_quant = (\n            w2_meta.a_dtype == dtypes.float8e4m3\n            and w2_meta.input_scale_group_size == 128\n            and self.activation == \"silu\"\n            and gate_up.dtype == torch.bfloat16\n            and intermediate % 256 == 0","sourceCodeStart":388,"sourceCodeEnd":424,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/moe/moe_runner/humming.py#L388-L424","documentation":"HummingRunnerCore.apply_activation only supports activation 'silu' (silu_and_mul) and 'gelu' (gelu_and_mul); any other self.activation string raises ValueError.","triggerScenarios":"Instantiating HummingRunnerCore with a MoERunnerConfig whose activation is anything other than 'silu' or 'gelu' (e.g. 'gelu_tanh', 'swiglu', or a model-specific activation string), then running a GEMM path that calls apply_activation.","commonSituations":"Loading a MoE model with a non-standard hidden activation with --moe-runner-backend humming; model configs that specify gelu_tanh or relu activations.","solutions":["Use a model whose MoE activation is silu or gelu with the humming backend","Switch to triton runner which supports more activations","Add a branch for the needed activation in apply_activation (contributor fix)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"assert config.activation in ('silu', 'gelu'), (\n    f'humming backend only supports silu/gelu, got {config.activation}')","typeGuard":"def humming_supported(activation: str) -> bool:\n    return activation in ('silu', 'gelu')","tryCatchPattern":null,"preventionTips":["Validate activation at config-load time, not mid-forward","Add a startup self-check for model config vs backend capabilities"],"tags":["sglang","moe","humming","activation","config-validation"],"backgroundTag":"unsupported-activation-function","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}