{"record":{"id":"570f49088ba31789","repo":"sgl-project/sglang","slug":"autoround-fused-module-target-r-has-inconsistent","errorCode":null,"errorMessage":"AutoRound fused module {target!r} has inconsistent shard configs.","messagePattern":"AutoRound fused module (.+?) has inconsistent shard configs\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/layers/quantization/auto_round.py","lineNumber":59,"sourceCode":"    @classmethod\n    def from_config(cls, config: dict) -> \"AutoRoundConfig\":\n        srt_config = SRTConfig.from_config(config)\n        if \"gptq\" not in srt_config.packing_format:\n            raise ValueError(\n                \"SGLang diffusion currently supports AutoRound auto_gptq \"\n                f\"checkpoints, but got {srt_config.packing_format!r}.\"\n            )\n        return cls(srt_config)\n\n    def remap_checkpoint_prefixes(self, param_names_mapping: dict) -> None:\n        mapping = get_param_names_mapping(param_names_mapping)\n        remapped: dict[str, dict] = {}\n        for prefix, layer_config in (self.srt_config.extra_config or {}).items():\n            target, _, _ = mapping(f\"{prefix}.weight\")\n            target = target.removesuffix(\".weight\")\n            previous = remapped.setdefault(target, layer_config)\n            if previous != layer_config:\n                raise ValueError(\n                    f\"AutoRound fused module {target!r} has inconsistent shard configs.\"\n                )\n\n        self.srt_config.extra_config = remapped\n        self.srt_config.block_name_to_quantize = None\n        self.srt_config.packed_modules_mapping = self.packed_modules_mapping\n\n    def get_quant_method(self, layer: torch.nn.Module, prefix: str):\n        if not isinstance(layer, LinearBase):\n            return None\n\n        weight_bits, _, _ = self.srt_config.get_layer_config(layer, prefix)\n        if not self.srt_config.check_quantized(weight_bits):\n            return UnquantizedLinearMethod()\n\n        return self.srt_config.apply_gptq_quant_layer(\n            layer,\n            prefix,","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/layers/quantization/auto_round.py#L41-L77","documentation":"When remapping checkpoint prefixes, fused modules (multiple prefixes mapping to one target) must carry identical layer configs in extra_config. If two prefixes that fuse into the same target have different configs, the fusion is ambiguous and this error is raised.","triggerScenarios":"An AutoRound checkpoint where extra_config assigns different shard configs to prefixes that both map to the same fused target module after weight-name mapping.","commonSituations":"Hand-edited quant config json; checkpoints produced by an AutoRound version that emits per-shard differing configs for fused layers.","solutions":["Inspect srt_config.extra_config for the offending prefix pair and make their configs identical","Re-export the checkpoint with consistent fused-layer settings","Report upstream if a stock AutoRound export triggers this"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"targets = {}\nfor prefix, layer_cfg in extra_config.items():\n    t = map_prefix(prefix)\n    if t in targets and targets[t] != layer_cfg:\n        raise SystemExit(f\"inconsistent shard configs for fused target {t}\")\n    targets[t] = layer_cfg","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep fused-layer extra_config entries identical when authoring checkpoints","Don't hand-edit per-prefix quant configs for fused modules"],"tags":["quantization","auto-round","fused-modules","checkpoint"],"backgroundTag":"inconsistent-checkpoint-config","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}