sgl-project/sglang · error · ComponentCheckpointUnsupportedError
Cannot configure checkpoint quantization for {component_name
Error message
Cannot configure checkpoint quantization for {component_name!r}: {error} What it means
Wrapper error: the underlying checkpoint-quantization parser (get_quantization_config path) raised KeyError/NotImplementedError/TypeError/ValueError while deriving a quant config for the component, and it is re-raised as ComponentCheckpointUnsupportedError with the component name and original error chained. The root cause is in {error}.
Source
Thrown at python/sglang/multimodal_gen/runtime/loader/component_loaders/text_encoder_loader.py:283
)
# Preserve model-owned formats such as Ideogram's bitsandbytes state.
# Those models parse metadata, construct layers, and attach quant states
# themselves; running the generic lifecycle as well would process twice.
return
_delegate_standard_bnb4_to_transformers(
component_config,
component_name,
)
try:
quant_config = _get_encoder_quant_config(
component_config,
component_model_path,
component_weights_path,
model_cls,
)
except (KeyError, NotImplementedError, TypeError, ValueError) as error:
raise ComponentCheckpointUnsupportedError(
f"Cannot configure checkpoint quantization for {component_name!r}: {error}"
) from error
model_config.quant_config = quant_config
if explicit_quantization is not None:
if quant_config is not None:
raise ComponentCheckpointUnsupportedError(
f"{component_name!r} already declares checkpoint quantization; "
"drop the explicit online quantization override"
)
if explicit_quantization not in _ONLINE_ENCODER_QUANTIZATIONS:
raise ComponentCheckpointUnsupportedError(
f"Online quantization {explicit_quantization!r} is not supported "
f"for native encoders; choose one of "
f"{sorted(_ONLINE_ENCODER_QUANTIZATIONS)}"
)
from sglang.multimodal_gen.runtime.layers.quantization import (
get_quantization_config,
)View on GitHub (pinned to 0132848349)
Solutions
- Read the chained {error} text to identify the underlying exception and fix that (e.g. correct the quantization_config field)
- Regenerate or re-download the checkpoint config so the quantization_config matches a supported format
- If the format is genuinely unsupported, convert/dequantize the checkpoint or use a supported quantization variant
- As a last resort remove quantization_config to load unquantized weights
Example fix
// before
{"quantization_config": {"quant_method": "my_custom_fmt"}}
// after
{"quantization_config": {"quant_method": "fp8", "fmt": "e4m3"}} Defensive patterns
Strategy: try-catch
Validate before calling
import json
cfg = json.loads((model_path / "config.json").read_text())
qc = cfg.get("quantization_config")
assert qc is None or qc.get("quant_method") in SUPPORTED_METHODS, f"unsupported: {qc}" Try / catch
try:
_configure_encoder_quantization(...)
except ComponentCheckpointUnsupportedError as e:
if "Cannot configure checkpoint quantization" in str(e):
logger.error("bad quant metadata: %s", e.__cause__)
raise
Prevention
- Validate quantization_config schema before loading
- Keep checkpoints from tool versions compatible with your sglang version
When it happens
Trigger: Loading a component whose config/weights metadata is malformed or uses an unrecognized quantization format: missing keys in quantization_config (KeyError), unknown quant method (NotImplementedError), wrong config types (TypeError), or invalid values (ValueError) inside _configure_encoder_quantization.
Common situations: Checkpoint saved by a newer/older library version with a quantization_config schema this loader can't parse; hand-edited config.json; exotic quant formats (e.g. compressed-tensors variants) not registered; truncated weight-file metadata.
Related errors
- Cannot parse checkpoint quantization for {component_name!r}:
- The SRT encoder checkpoint adapter supports only serialized
- Serialized quantized component weights cannot use a stacked
- A GGUF encoder checkpoint cannot be combined with a second q
- {component_name!r} manages its own checkpoint quantization a
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/76050f6c7695b6e6.
Report an issue: GitHub.