{"record":{"id":"02d1dc577c70c9bb","repo":"sgl-project/sglang","slug":"h3-conditioning-projection-tap-tap-is-outside-th","errorCode":null,"errorMessage":"H3 conditioning projection tap {tap} is outside the selected encoder's {int(arch.checkpoint_num_hidden_layers)} layers","messagePattern":"H3 conditioning projection tap (.+?) is outside the selected encoder's (.+?) layers","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"python/sglang/multimodal_gen/runtime/models/encoders/minimax_h3_qwen3vl.py","lineNumber":250,"sourceCode":"                )\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        )\n\n    def __init__(self, config: MiniMaxH3Qwen3VLConfig) -> None:\n        super().__init__(config)\n        arch = config.arch_config\n        selected_layer = int(arch.text_config.num_hidden_layers)","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/models/encoders/minimax_h3_qwen3vl.py#L232-L268","documentation":"The projection checkpoint records a 'tap' layer index (which encoder layer to read conditioning features from), and it must lie in [1, checkpoint_num_hidden_layers] of the selected encoder. An out-of-range tap means the encoder has fewer layers than the projection expects.","triggerScenarios":"configure_component_paths where inspect()'s tap value is <= 0 or > arch.checkpoint_num_hidden_layers.","commonSituations":"Pairing a projection built for a deeper encoder with a shallower one; truncated encoder checkpoint with fewer layers.","solutions":["Use a projection whose tap layer exists in the selected encoder (tap <= num layers)","Serve the full-depth encoder the projection was exported from"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"tap, _, _ = MiniMaxH3ConditioningProjection.inspect(path)\nassert 0 < tap <= arch.checkpoint_num_hidden_layers","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify encoder layer count covers the projection's tap layer","Log tap and layer counts at startup for auditability"],"tags":["minimax-h3","conditioning-projection","layer-index","out-of-range"],"backgroundTag":"config-validation-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}