{"record":{"id":"319794c7a151b7e7","repo":"sgl-project/sglang","slug":"online-quantization-for-component-name-r-require","errorCode":null,"errorMessage":"Online quantization for {component_name!r} requires an in-tree native encoder; unsupported architectures: {architectures}","messagePattern":"Online quantization for (.+?) requires an in-tree native encoder; unsupported architectures: (.+?)","errorType":"validation","errorClass":"ComponentCheckpointUnsupportedError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/loader/component_loaders/text_encoder_loader.py","lineNumber":346,"sourceCode":"        model_cls, _ = ModelRegistry.resolve_model_cls(architectures)\n    except Exception as resolution_error:\n        _delegate_standard_bnb4_to_transformers(\n            component_config,\n            component_name,\n        )\n        try:\n            quant_config = _get_encoder_quant_config(\n                component_config,\n                component_model_path,\n                component_weights_path,\n            )\n        except Exception as quantization_error:\n            raise ComponentCheckpointUnsupportedError(\n                f\"Cannot parse checkpoint quantization for {component_name!r}: \"\n                f\"{quantization_error}\"\n            ) from quantization_error\n        if explicit_quantization is not None and quant_config is None:\n            raise ComponentCheckpointUnsupportedError(\n                f\"Online quantization for {component_name!r} requires an in-tree \"\n                f\"native encoder; unsupported architectures: {architectures}\"\n            ) from resolution_error\n        if quant_config is None:\n            raise\n        raise ComponentCheckpointUnsupportedError(\n            f\"A quantized {component_name!r} checkpoint requires an in-tree \"\n            f\"native encoder; unsupported architectures: {architectures}\"\n        ) from resolution_error\n\n    _configure_encoder_quantization(\n        model_config,\n        model_cls,\n        component_config,\n        component_model_path,\n        component_weights_path,\n        component_name,\n        explicit_quantization,","sourceCodeStart":328,"sourceCodeEnd":364,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/loader/component_loaders/text_encoder_loader.py#L328-L364","documentation":"ComponentCheckpointUnsupportedError raised when explicit online quantization was requested, no serialized quant_config exists, AND the checkpoint's architectures do not resolve to an in-tree native encoder class (resolution_error is chained). Online quantization hooks (quantized linear construction, process_weights_after_loading) only exist for native implementations.","triggerScenarios":"load_customized(explicit_quantization=\"fp8\") where architectures in config.json map to no registered native encoder — e.g. a transformers-only encoder — so model resolution failed (resolution_error) and quant_config is None.","commonSituations":"Applying an online quantization flag to a multimodal model whose text encoder has no native sglang implementation; newly added encoder architectures before native support landed; misnamed architecture strings in config.json.","solutions":["Remove the online quantization override for this component and load it unquantized","Use a checkpoint/architecture with an in-tree native encoder implementation","Fix the architectures field in config.json if it's a naming mismatch against registered native classes","Contribute a native encoder implementation to enable online quantization"],"exampleFix":"# before\nload_customized(..., explicit_quantization=\"fp8\")  # arch has no native impl\n\n# after\nload_customized(..., explicit_quantization=None)","handlingStrategy":"validation","validationCode":"native = resolve_native_encoder_class(architectures)  # returns None if absent\nif explicit_quantization is not None and native is None:\n    explicit_quantization = None  # skip online quant for delegated encoders","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only request online quantization for architectures with native in-tree support","Gate pipeline-wide quantization flags per component capability"],"tags":["quantization","online-quantization","architecture-unsupported","text-encoder"],"backgroundTag":"unsupported-model-architecture","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}