sgl-project/sglang · error · ComponentCheckpointUnsupportedError

Cannot parse checkpoint quantization for {component_name!r}:

Error message

Cannot parse checkpoint quantization for {component_name!r}: {quantization_error}

What it means

ComponentCheckpointUnsupportedError raised in _resolve_and_configure_encoder_quantization when _get_encoder_quant_config throws any exception while parsing the checkpoint's quantization. Unlike 1342 this is the outer resolution path (after architecture resolution failed to yield a native class), wrapping arbitrary exceptions with the component name and original error.

Source

Thrown at python/sglang/multimodal_gen/runtime/loader/component_loaders/text_encoder_loader.py:341

    explicit_quantization: str | None = None,
    ignored_layers: list[str] | None = None,
) -> type[nn.Module]:
    architectures = getattr(model_config, "architectures", [])
    try:
        model_cls, _ = ModelRegistry.resolve_model_cls(architectures)
    except Exception as resolution_error:
        _delegate_standard_bnb4_to_transformers(
            component_config,
            component_name,
        )
        try:
            quant_config = _get_encoder_quant_config(
                component_config,
                component_model_path,
                component_weights_path,
            )
        except Exception as quantization_error:
            raise ComponentCheckpointUnsupportedError(
                f"Cannot parse checkpoint quantization for {component_name!r}: "
                f"{quantization_error}"
            ) from quantization_error
        if explicit_quantization is not None and quant_config is None:
            raise ComponentCheckpointUnsupportedError(
                f"Online quantization for {component_name!r} requires an in-tree "
                f"native encoder; unsupported architectures: {architectures}"
            ) from resolution_error
        if quant_config is None:
            raise
        raise ComponentCheckpointUnsupportedError(
            f"A quantized {component_name!r} checkpoint requires an in-tree "
            f"native encoder; unsupported architectures: {architectures}"
        ) from resolution_error

    _configure_encoder_quantization(
        model_config,
        model_cls,

View on GitHub (pinned to 0132848349)

Solutions

  1. Inspect the chained {quantization_error} message for the root cause and fix that specific issue
  2. Verify checkpoint integrity (re-download; check file sizes/hash) especially for GGUF files
  3. Fix or complete the quantization_config section of the component's config.json
  4. Convert the checkpoint to a supported format or load unquantized weights

Example fix

// before
{"quantization_config": {"quant_method": "fp8"}}  // missing required sub-fields

// after
{"quantization_config": {"quant_method": "fp8", "fmt": "e4m3", "weight_block_size": [128, 128]}}
Defensive patterns

Strategy: try-catch

Validate before calling

from pathlib import Path
p = Path(weights_path)
if p.suffix == ".gguf" and not p.stat().st_size > 1024:
    raise SystemExit("GGUF file looks truncated")

Try / catch

try:
    load_customized(...)
except ComponentCheckpointUnsupportedError as e:
    if "Cannot parse checkpoint quantization" in str(e) and e.__cause__:
        logger.error("root cause: %r", e.__cause__)
    raise

Prevention

When it happens

Trigger: load_customized on a component whose weights/config trigger an unexpected exception in GGUF metadata reading, quant config parsing, or transformers quantization_config interpretation — e.g. malformed GGUF header, missing quantization_config keys, unsupported quant_method string.

Common situations: Corrupted or partially downloaded .gguf/.safetensors files; checkpoints from incompatible tool versions; config.json quantization_config entries with missing required fields.

Related errors


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