sgl-project/sglang · error · ComponentCheckpointUnsupportedError
{component_name!r} already declares checkpoint quantization;
Error message
{component_name!r} already declares checkpoint quantization; drop the explicit online quantization override What it means
ComponentCheckpointUnsupportedError raised when an explicit online quantization override is supplied AND the checkpoint already carries a serialized quantization config. Applying online quantization on top of an already-quantized checkpoint is contradictory, so the loader asks you to drop the override.
Source
Thrown at python/sglang/multimodal_gen/runtime/loader/component_loaders/text_encoder_loader.py:289
_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,
)
model_config.quant_config = get_quantization_config(explicit_quantization)(
ignored_layers=ignored_layers
)
quant_config = model_config.quant_config
if quant_config is None:View on GitHub (pinned to 0132848349)
Solutions
- Remove the explicit online quantization argument/flag for this component — the checkpoint's serialized config wins
- If you intended online quantization, switch to an unquantized (BF16/FP16) checkpoint of the encoder
- Exclude self-quantized components from global quantization flag propagation
Example fix
# before load_customized(..., explicit_quantization="fp8") # checkpoint is already fp8 # after load_customized(..., explicit_quantization=None)
Defensive patterns
Strategy: validation
Validate before calling
if explicit_quantization is not None and checkpoint_declares_quant(model_path):
explicit_quantization = None # checkpoint wins Prevention
- Don't combine --quantization flags with pre-quantized checkpoints
- Test loader config against both serialized and unquantized checkpoints
When it happens
Trigger: Calling load_customized with explicit_quantization="fp8" (etc.) for a component whose config.json/weights already declare quantization, so _get_encoder_quant_config returned a non-None quant_config.
Common situations: Server started with a global --quantization fp8 flag while loading an already-FP8-serialized CLIP encoder; mixing PD/D deployment flags with pre-quantized component checkpoints.
Related errors
- {component_name!r} manages its own checkpoint quantization a
- Online quantization {explicit_quantization!r} is not support
- Online quantization for {component_name!r} requires an in-tr
- The SRT encoder checkpoint adapter supports only serialized
- Serialized quantized component weights cannot use a stacked
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/af8cde52840085b1.
Report an issue: GitHub.