{"record":{"id":"97ed2d265758a18c","repo":"sgl-project/sglang","slug":"unsupported-activation-hidden-act-only-silu-is-97ed2d","errorCode":null,"errorMessage":"Unsupported activation: {hidden_act}. Only silu is supported.","messagePattern":"Unsupported activation: (.+?)\\. Only silu is supported\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/models/laguna.py","lineNumber":77,"sourceCode":"\nlogger = logging.getLogger(__name__)\n\n\nclass LagunaMLP(nn.Module):\n    def __init__(\n        self,\n        hidden_size: int,\n        intermediate_size: int,\n        hidden_act: str,\n        quant_config: Optional[QuantizationConfig] = None,\n        reduce_results: bool = True,\n        prefix: str = \"\",\n        tp_rank: Optional[int] = None,\n        tp_size: Optional[int] = None,\n    ) -> None:\n        super().__init__()\n        if hidden_act != \"silu\":\n            raise ValueError(\n                f\"Unsupported activation: {hidden_act}. Only silu is supported.\"\n            )\n        self.gate_up_proj = MergedColumnParallelLinear(\n            hidden_size,\n            [intermediate_size] * 2,\n            bias=False,\n            quant_config=quant_config,\n            prefix=add_prefix(\"gate_up_proj\", prefix),\n            tp_rank=tp_rank,\n            tp_size=tp_size,\n        )\n        self.down_proj = RowParallelLinear(\n            intermediate_size,\n            hidden_size,\n            bias=False,\n            quant_config=quant_config,\n            reduce_results=reduce_results,\n            prefix=add_prefix(\"down_proj\", prefix),","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/models/laguna.py#L59-L95","documentation":"Laguna's MLP uses a SiLU-gated gate_up projection (MergedColumnParallelLinear) and only supports hidden_act == \"silu\" (laguna.py:77). The fused gate/up kernels and activation are compiled assuming SiLU, so other activation strings fail fast at layer init.","triggerScenarios":"Loading a Laguna checkpoint whose config hidden_act is not \"silu\".","commonSituations":"Finetuned or converted checkpoints that changed MLP activation; config mixing between model families.","solutions":["Use a checkpoint with hidden_act=silu (the architecture's design)","If genuinely needed, extend the gated-MLP to support the new activation and adjust fused kernels","Verify config.json integrity / re-download weights"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"assert hidden_act == \"silu\", hidden_act","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate config invariants in a pre-launch script for every new checkpoint"],"tags":["laguna","activation","config-validation"],"backgroundTag":"unsupported-config-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}