{"record":{"id":"91001c3f91e58aee","repo":"sgl-project/sglang","slug":"serialized-w4a8-layer-prefix-r-must-set-convrot","errorCode":null,"errorMessage":"Serialized W4A8 layer {prefix!r} must set convrot=true","messagePattern":"Serialized W4A8 layer (.+?) must set convrot=true","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"python/sglang/multimodal_gen/runtime/layers/quantization/configs/kitchen_w4a8_config.py","lineNumber":62,"sourceCode":"                    f\"{capability.to_int() / 10:.1f}\"\n                )\n        self.layer_markers = layer_markers\n        self.checkpoint_uses_native_qkv_layout = True\n        self.selected: list[str] = []\n\n        for prefix, marker in layer_markers.items():\n            marker_format = marker.get(\"format\")\n            if marker_format == \"int8_tensorwise\" and marker.get(\n                \"_is_tensorwise_scalar\"\n            ):\n                continue\n            if marker_format != \"asym_w4a8_int8\":\n                raise ValueError(\n                    f\"Unsupported Comfy W4A8 format for {prefix!r}: \"\n                    f\"{marker_format!r}\"\n                )\n            if marker.get(\"convrot\") is not True:\n                raise ValueError(\n                    f\"Serialized W4A8 layer {prefix!r} must set convrot=true\"\n                )\n\n    @classmethod\n    def get_name(cls) -> str:\n        return \"kitchen_w4a8\"\n\n    @classmethod\n    def get_supported_act_dtypes(cls) -> list[torch.dtype]:\n        return [torch.bfloat16, torch.float16]\n\n    @classmethod\n    def get_min_capability(cls) -> int:\n        return 80\n\n    @classmethod\n    def get_config_filenames(cls) -> list[str]:\n        return []","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/layers/quantization/configs/kitchen_w4a8_config.py#L44-L80","documentation":"Every asym_w4a8_int8 marker must explicitly set convrot=true; the W4A8 kernel assumes ConvRot-transformed weights and cannot run otherwise. Missing/false convrot aborts config construction.","triggerScenarios":"A W4A8 marker where 'convrot' is absent, False, or not exactly True.","commonSituations":"Older exporter versions omitting the flag; manually constructed marker dicts.","solutions":["Add \"convrot\": true to every asym_w4a8_int8 marker","Re-export with a current exporter"],"exampleFix":"// before\n{\"format\": \"asym_w4a8_int8\"}\n// after\n{\"format\": \"asym_w4a8_int8\", \"convrot\": true}","handlingStrategy":"validation","validationCode":"for prefix, m in layer_markers.items():\n    if m.get(\"format\") == \"asym_w4a8_int8\":\n        assert m.get(\"convrot\") is True, prefix","typeGuard":"def w4a8_marker_complete(m: dict) -> bool:\n    return m.get(\"format\") == \"asym_w4a8_int8\" and m.get(\"convrot\") is True","tryCatchPattern":null,"preventionTips":["Use the exporter's serializer to write markers; never assemble them by hand"],"tags":["quantization","convrot","checkpoint","w4a8"],"backgroundTag":"unsupported-quantization-config","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}