sgl-project/sglang · error · ValueError

Unsupported packing_format: {packing_format}, currently only

Error message

Unsupported packing_format: {packing_format}, currently only support  {self.SUPPORTED_FORMATS}

What it means

AutoRoundConfig validates the weight packing format string against SUPPORTED_FORMATS (e.g. 'auto', 'ipex', 'gptq', 'awq' style packs). An unknown packing_format raises during config parsing/loading.

Source

Thrown at python/sglang/srt/layers/quantization/auto_round.py:84

        dynamic: Optional[dict[str, dict[str, Union[int, bool]]]] = None,
        checkpoint_format: str = "",
        true_sequential: bool = False,
        static_groups: bool = False,
        gptq_defaulted_config_keys: Optional[tuple[str, ...]] = None,
    ) -> None:
        super().__init__()
        if weight_bits not in self.SUPPORTED_BITS:
            raise ValueError(
                f"Unsupported weight_bits: {weight_bits}, "
                f"currently only support  {self.SUPPORTED_BITS}"
            )
        if data_type not in self.SUPPORTED_DTYPES:
            raise ValueError(
                f"Unsupported data_type: {data_type},"
                f" currently only support  {self.SUPPORTED_DTYPES}"
            )
        if packing_format not in self.SUPPORTED_FORMATS:
            raise ValueError(
                f"Unsupported packing_format: {packing_format}, "
                f"currently only support  {self.SUPPORTED_FORMATS}"
            )
        if backend not in self.SUPPORTED_BACKENDS:
            raise ValueError(
                f"Unsupported backend: {backend},  "
                f"currently only support  {self.SUPPORTED_BACKENDS}"
            )

        self.weight_bits = weight_bits
        self.group_size = group_size
        self.sym = sym
        self.packing_format = packing_format
        self.block_name_to_quantize = (
            block_name_to_quantize.split(",")
            if isinstance(block_name_to_quantize, str)
            else block_name_to_quantize
        )

View on GitHub (pinned to 0132848349)

Solutions

  1. Set packing_format to 'auto' (or another listed format) in the checkpoint config or constructor
  2. Upgrade SGLang to a version supporting the new packing name
  3. Re-export the checkpoint with a standard packing

Example fix

// before
"quantization_config": {"packing_format": "custom_pack", ...}
// after
"quantization_config": {"packing_format": "auto", ...}
Defensive patterns

Strategy: validation

Validate before calling

fmt = quant_cfg.get("packing_format", "auto")
assert fmt in AutoRoundConfig.SUPPORTED_FORMATS or fmt == "auto"

Type guard

def is_supported_packing(fmt: str) -> bool:
    return fmt in AutoRoundConfig.SUPPORTED_FORMATS

Prevention

When it happens

Trigger: A checkpoint quantization_config carrying a packing format not in SUPPORTED_FORMATS, or explicitly passing packing_format when building AutoRoundConfig.

Common situations: Mixing exporters (AutoRound tool versions) that emit newer format names, or forcing a GPU packing format for a CPU deployment.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/9acb0a398209b567. Report an issue: GitHub.