{"record":{"id":"dab97f10bb5cc4a4","repo":"sgl-project/sglang","slug":"requantization-in-quarkw4a4mxfp4moe-from-self-deq","errorCode":null,"errorMessage":"Requantization in QuarkW4A4MXFp4MoE from {self.dequantization_config.__class__.__name__} is not supported.","messagePattern":"Requantization in QuarkW4A4MXFp4MoE from (.+?) is not supported\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/layers/quantization/quark/schemes/quark_w4a4_mxfp4_moe.py","lineNumber":174,"sourceCode":"                # Create FP8 MoE weight parameters on meta device to avoid device memory overhead during weight loading, as the resulting model uses MXFP4 using less device memory.\n                # The weight loader handles progressive FP8 weight materialization on device.\n                with torch.device(\"meta\"):\n                    Fp8MoEMethod.create_fp8_moe_weight_(\n                        layer=layer,\n                        num_experts=num_experts,\n                        hidden_size=hidden_size,\n                        intermediate_size_per_partition=intermediate_size_per_partition,\n                        block_quant=block_quant,\n                        quant_config=self.dequantization_config,\n                        use_mxfp8=False,\n                        is_checkpoint_fp8_serialized=True,\n                        is_fp4_expert=False,\n                        params_dtype=params_dtype,\n                        with_bias=with_bias,\n                        **extra_weight_attrs,\n                    )\n            else:\n                raise NotImplementedError(\n                    f\"Requantization in QuarkW4A4MXFp4MoE from {self.dequantization_config.__class__.__name__} is not supported.\"\n                )\n            return\n\n        w13_up_dim, w2_down_dim, weight_padded = get_moe_weight_sizes(\n            intermediate_size_per_partition,\n            is_aiter_moe=_use_aiter,\n            is_concat=True,\n            is_packed=True,\n        )\n\n        # Add the quantization method used (per tensor/grouped/channel)\n        # to ensure the weight scales are loaded in properly\n        extra_weight_attrs.update(\n            {\n                \"quant_method\": FusedMoeWeightScaleSupported.BLOCK.value,\n                \"weight_padded\": weight_padded,\n            },","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/quantization/quark/schemes/quark_w4a4_mxfp4_moe.py#L156-L192","documentation":"QuarkW4A4MXFp4MoE.create_weights only knows how to requantize from specific dequantization configs (e.g. Fp8Config). It hit an unrecognized dequantization_config class, so no requantization path exists.","triggerScenarios":"Quark config where dequantization_config is some class other than the supported FP8 configs while weights are not MXFP4-serialized.","commonSituations":"New quark export formats (int8, int4, mxfp8) pointed at the W4A4 MXFP4 MoE scheme; version skew between checkpoint format and sglang.","solutions":["Use an MXFP4-serialized checkpoint so the requantization branch is skipped","Re-export checkpoint with a supported dequantization config (plain block FP8)","Upgrade sglang to a version supporting this dequantization_config class"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from sglang.srt.layers.quantization.quark.schemes.quark_w4a4_mxfp4_moe import *\nsupported = type(quant_config.dequantization_config).__name__ in ('Fp8Config',)\nassert supported or quant_config.is_checkpoint_mxfp4_serialized","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer MXFP4-serialized checkpoints","Keep quark exporter and sglang versions in lockstep"],"tags":["quantization","quark","unsupported-format","moe"],"backgroundTag":"unsupported-checkpoint-format","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}