{"record":{"id":"82428acc48d299d6","repo":"sgl-project/sglang","slug":"unsupported-data-type-data-type-currently-only","errorCode":null,"errorMessage":"Unsupported data_type: {data_type}, currently only support  {self.SUPPORTED_DTYPES}","messagePattern":"Unsupported data_type: (.+?), currently only support  (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/layers/quantization/auto_round.py","lineNumber":79,"sourceCode":"        extra_config: Optional[dict[str, Any]] = None,\n        data_type: str = \"int\",\n        backend: str = \"auto\",\n        lm_head_quantized: bool = False,\n        desc_act: bool = False,\n        dynamic: Optional[dict[str, dict[str, Union[int, bool]]]] = None,\n        checkpoint_format: str = \"\",\n        true_sequential: bool = False,\n        static_groups: bool = False,\n        gptq_defaulted_config_keys: Optional[tuple[str, ...]] = None,\n    ) -> None:\n        super().__init__()\n        if weight_bits not in self.SUPPORTED_BITS:\n            raise ValueError(\n                f\"Unsupported weight_bits: {weight_bits}, \"\n                f\"currently only support  {self.SUPPORTED_BITS}\"\n            )\n        if data_type not in self.SUPPORTED_DTYPES:\n            raise ValueError(\n                f\"Unsupported data_type: {data_type},\"\n                f\" currently only support  {self.SUPPORTED_DTYPES}\"\n            )\n        if packing_format not in self.SUPPORTED_FORMATS:\n            raise ValueError(\n                f\"Unsupported packing_format: {packing_format}, \"\n                f\"currently only support  {self.SUPPORTED_FORMATS}\"\n            )\n        if backend not in self.SUPPORTED_BACKENDS:\n            raise ValueError(\n                f\"Unsupported backend: {backend},  \"\n                f\"currently only support  {self.SUPPORTED_BACKENDS}\"\n            )\n\n        self.weight_bits = weight_bits\n        self.group_size = group_size\n        self.sym = sym\n        self.packing_format = packing_format","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/quantization/auto_round.py#L61-L97","documentation":"AutoRoundConfig validates the data_type used for activations/weights against SUPPORTED_DTYPES (e.g. 'int'/'float' variants). An unrecognized or unsupported data_type string raises at config construction/load time.","triggerScenarios":"Loading an AutoRound checkpoint whose quantization_config data_type is not in SUPPORTED_DTYPES, or constructing AutoRoundConfig(data_type='bf16')-style values the loader cannot map.","commonSituations":"Checkpoints exported by newer AutoRound versions introducing new data types, or manually editing quantization_config.","solutions":["Re-export the model with a supported data_type (check AutoRoundConfig.SUPPORTED_DTYPES in auto_round.py)","Upgrade SGLang if a newer version added the data type","Use the checkpoint's native quant method (awq/gptq) instead of auto_round if the dtype is only valid there"],"exampleFix":"// before\n\"quantization_config\": {\"data_type\": \"bf16\", ...}\n// after\n\"quantization_config\": {\"data_type\": \"int\", ...}","handlingStrategy":"validation","validationCode":"dt = quant_cfg.get(\"data_type\")\nassert dt is None or dt in AutoRoundConfig.SUPPORTED_DTYPES, f\"bad data_type {dt}\"","typeGuard":"def is_supported_dtype(dt: str) -> bool:\n    return dt in AutoRoundConfig.SUPPORTED_DTYPES","tryCatchPattern":null,"preventionTips":["Re-export with default 'int' data_type","Keep AutoRound exporter and SGLang versions in sync"],"tags":["quantization","auto-round","data-type"],"backgroundTag":"invalid-configuration-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}