{"record":{"id":"a459e2b3cb2638b7","repo":"sgl-project/sglang","slug":"h3-conditioning-projection-must-output-width-mini","errorCode":null,"errorMessage":"H3 conditioning projection must output width {MINIMAX_H3_QWEN3VL_HIDDEN_DIM}, got {output_dim}","messagePattern":"H3 conditioning projection must output width (.+?), got (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"python/sglang/multimodal_gen/runtime/models/encoders/minimax_h3_qwen3vl.py","lineNumber":245,"sourceCode":"                < MINIMAX_H3_QWEN3VL_SELECTED_LM_LAYER\n            ):\n                raise ValueError(\n                    \"MiniMax H3 Qwen3-VL encoders smaller than 32B require \"\n                    \"--component-paths.conditioning_projection\"\n                )\n            return\n\n        projection_path = materialize_weight(resolve_weight(source))\n        tap, input_dim, output_dim = MiniMaxH3ConditioningProjection.inspect(\n            projection_path\n        )\n        if input_dim != int(arch.hidden_size):\n            raise ValueError(\n                f\"H3 conditioning projection expects encoder width {input_dim}, \"\n                f\"but the selected text encoder has width {int(arch.hidden_size)}\"\n            )\n        if output_dim != MINIMAX_H3_QWEN3VL_HIDDEN_DIM:\n            raise ValueError(\n                f\"H3 conditioning projection must output width \"\n                f\"{MINIMAX_H3_QWEN3VL_HIDDEN_DIM}, got {output_dim}\"\n            )\n        if tap <= 0 or tap > int(arch.checkpoint_num_hidden_layers):\n            raise ValueError(\n                f\"H3 conditioning projection tap {tap} is outside the selected \"\n                f\"encoder's {int(arch.checkpoint_num_hidden_layers)} layers\"\n            )\n        arch.conditioning_projection_path = projection_path\n        arch.num_hidden_layers = tap\n        arch.text_config.num_hidden_layers = tap\n\n    def should_materialize_checkpoint_weight(self, name: str) -> bool:\n        name = _map_checkpoint_name(name)\n        return (\n            \"rotary_emb.inv_freq\" not in name\n            and not _is_unconsumed_checkpoint_weight(name, self.selected_lm_layer)\n        )","sourceCodeStart":227,"sourceCodeEnd":263,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/encoders/minimax_h3_qwen3vl.py#L227-L263","documentation":"The conditioning projection's output width must be exactly MINIMAX_H3_QWEN3VL_HIDDEN_DIM (the target model's hidden size). A different output width means the projected conditioning cannot be consumed downstream.","triggerScenarios":"configure_component_paths with a projection whose inspect() output_dim != MINIMAX_H3_QWEN3VL_HIDDEN_DIM.","commonSituations":"Projection checkpoint taken from a non-H3 or differently-sized model; truncated or wrong file passed as conditioning_projection.","solutions":["Supply the official projection checkpoint for the MiniMax H3 Qwen3-VL model being served","Verify output_dim by loading the last weight and checking its shape[0] against the model hidden size"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"_, _, out_dim = MiniMaxH3ConditioningProjection.inspect(path)\nassert out_dim == MINIMAX_H3_QWEN3VL_HIDDEN_DIM","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use officially distributed projection checkpoints","Smoke-test inspect() on new checkpoint files before deploying"],"tags":["minimax-h3","conditioning-projection","width-mismatch","config-validation"],"backgroundTag":"model-dimension-mismatch","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}