{"record":{"id":"a57328d33a8e9b31","repo":"sgl-project/sglang","slug":"component-name-r-checkpoint-declares-quantizatio","errorCode":null,"errorMessage":"{component_name!r} checkpoint declares quantization metadata in {quant_spec.source} (quant_method={method!r}), which its current plain state-dict materializer cannot restore.","messagePattern":"(.+?) checkpoint declares quantization metadata in (.+?) \\(quant_method=(.+?)\\), which its current plain state-dict materializer cannot restore\\.","errorType":"validation","errorClass":"ComponentCheckpointUnsupportedError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/loader/component_loaders/component_loader.py","lineNumber":526,"sourceCode":"\n\nclass PlainStateDictComponentLoader(ComponentLoader):\n    \"\"\"Base for native loaders whose current materializer expects plain weights.\"\"\"\n\n    @staticmethod\n    def ensure_plain_state_dict_checkpoint(config: object, component_name: str) -> None:\n        try:\n            quant_spec = resolve_checkpoint_quant_spec(config)\n        except (TypeError, ValueError) as error:\n            raise ComponentCheckpointUnsupportedError(\n                f\"Cannot parse checkpoint quantization metadata for \"\n                f\"{component_name!r}: {error}\"\n            ) from error\n        if quant_spec is None:\n            return\n\n        method = quant_spec.declared_method or \"unspecified\"\n        raise ComponentCheckpointUnsupportedError(\n            f\"{component_name!r} checkpoint declares quantization metadata in \"\n            f\"{quant_spec.source} (quant_method={method!r}), which its current \"\n            \"plain state-dict materializer cannot restore.\"\n        )\n\n    def load_component_config(\n        self, component_model_path: str, component_name: str\n    ) -> dict[str, Any]:\n        config = get_diffusers_component_config(component_path=component_model_path)\n        self.ensure_plain_state_dict_checkpoint(config, component_name)\n        return config\n\n    def resolve_component_weights_path(\n        self,\n        component_model_path: str,\n        server_args: ServerArgs,\n        component_name: str,\n    ) -> str:","sourceCodeStart":508,"sourceCodeEnd":544,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/loader/component_loaders/component_loader.py#L508-L544","documentation":"For components materialized from a plain state dict (no quantization support), any non-None quant spec is rejected: even an unspecified quant_method in any source field raises ComponentCheckpointUnsupportedError, failing closed rather than silently loading quantized weights as fp16.","triggerScenarios":"A component checkpoint that declares quantization metadata anywhere (top-level quantization_config, hf_quantifier, or other sources) is loaded through a loader whose materializer is a plain state-dict loader (no quant restore support).","commonSituations":"Downloading an fp8/bnb-quantized variant of a component while the code path only supports plain fp16/bf16 state dicts; serving a mixed checkpoint repo where one component is quantized; version skew where a component became quantized upstream.","solutions":["Download the unquantized (fp16/bf16) variant of that component","Use a loader that supports the declared quantization format for that component","If the metadata is spurious (checkpoint is actually plain), remove the quantization fields from its config.json"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"qc = {k: v for k, v in config.items() if 'quant' in k.lower()}\nassert not qc, f\"plain state-dict loader cannot restore quantized metadata: {qc}\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match checkpoint quantization variant to the loader capability","Prefer unquantized component variants unless the whole path supports quant restore"],"tags":["quantization","model-loading","fail-closed","state-dict"],"backgroundTag":"quantized-checkpoint-unsupported","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}