{"record":{"id":"5b1ad423221e4e6a","repo":"sgl-project/sglang","slug":"unknown-quantization-strategy-self-strategy-5b1ad4","errorCode":null,"errorMessage":"Unknown quantization strategy {self.strategy}","messagePattern":"Unknown quantization strategy (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py","lineNumber":126,"sourceCode":"                weight=layer.weight,\n                weight_scale=layer.weight_scale,\n                logical_widths=layer.logical_widths,\n            )\n\n            layer.weight = Parameter(weight.t(), requires_grad=False)\n            layer.weight_scale = Parameter(max_w_scale, requires_grad=False)\n\n        # If channelwise, scales are already lined up, so just transpose.\n        elif self.strategy == QuantizationStrategy.CHANNEL:\n            weight = layer.weight\n            weight_scale = layer.weight_scale.data\n\n            layer.weight = Parameter(weight.t(), requires_grad=False)\n            # required by torch.compile to be torch.nn.Parameter\n            layer.weight_scale = Parameter(weight_scale, requires_grad=False)\n\n        else:\n            raise ValueError(f\"Unknown quantization strategy {self.strategy}\")\n\n        # INPUT SCALE\n        if self.is_static_input_scheme and hasattr(layer, \"input_scale\"):\n            if self.input_symmetric:\n                layer.input_scale = Parameter(\n                    layer.input_scale.max(), requires_grad=False\n                )\n            else:\n                input_scale = layer.input_scale\n                input_zero_point = layer.input_zero_point\n\n                # reconstruct the ranges\n                int8_traits = torch.iinfo(torch.int8)\n                azps = input_zero_point.to(dtype=torch.int32)\n                range_max = (input_scale * (int8_traits.max - azps)).max()\n                range_min = (input_scale * (int8_traits.min - azps)).min()\n\n                scale = (range_max - range_min) / (int8_traits.max - int8_traits.min)","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/quantization/compressed_tensors/schemes/compressed_tensors_w8a8_int8.py#L108-L144","documentation":"The W8A8 INT8 scheme's post-load path handles only per-tensor and per-channel/token weight strategies; an unrecognized strategy falls through to this raise instead of silently producing wrong weights.","triggerScenarios":"A compressed-tensors INT8 checkpoint with a weight strategy other than TENSOR/CHANNEL reaching process_weights_after_loading in compressed_tensors_w8a8_int8.py.","commonSituations":"Group-wise INT8 quant configs unsupported by this scheme; version skew between checkpoint producer and runtime.","solutions":["Re-quantize with channelwise or per-tensor INT8 weights","Upgrade SGLang if a newer INT8 strategy should be supported","Verify quantization_config weights strategy string"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"assert cfg[\"quantization_config\"][\"weights\"][\"strategy\"] in (\"tensor\", \"channel\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep quant recipe and runtime versions in lockstep"],"tags":["quantization","int8","strategy","w8a8"],"backgroundTag":"unsupported-quantization-strategy","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}