{"record":{"id":"7d62f21bcc623cb4","repo":"sgl-project/sglang","slug":"only-2d-tile-tag-is-supported-currently-got-sel-7d62f2","errorCode":null,"errorMessage":"Only 2D tile_tag is supported currently, got: {self.tile_tag}","messagePattern":"Only 2D tile_tag is supported currently, got: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/models/unlimited_ocr.py","lineNumber":71,"sourceCode":"        \"\"\"Initialize UnlimitedOCRForCausalLM with vision encoders, projector, and LM.\"\"\"\n        super().__init__()\n\n        self.config = config\n        self.vision_config = config.vision_config\n        self.projector_config = config.projector_config\n        self.text_config = config.text_config\n\n        n_embed = getattr(self.projector_config, \"n_embed\", 1280)\n\n        self.tile_tag = config.tile_tag\n        self.global_view_pos = config.global_view_pos\n\n        embed_std = 1 / torch.sqrt(torch.tensor(n_embed, dtype=torch.float32))\n        if self.tile_tag == \"2D\":\n            self.view_seperator = nn.Parameter(torch.randn(n_embed) * embed_std)\n            self.image_newline = nn.Parameter(torch.randn(n_embed) * embed_std)\n        else:\n            raise ValueError(\n                f\"Only 2D tile_tag is supported currently, got: {self.tile_tag}\"\n            )\n\n        self.model = DeepseekForCausalLM(\n            config=config.text_config,\n            quant_config=quant_config,\n            prefix=maybe_prefix(prefix, \"language\"),\n        )\n\n        self.sam_model = build_sam_vit_b()\n        self.vision_model = build_clip_l()\n\n        self.projector = MlpProjector(\n            projector_type=self.projector_config.projector_type,\n            input_dim=self.projector_config.input_dim,\n            n_embed=n_embed,\n            depth=self.projector_config.depth,\n            mlp_ratio=self.projector_config.mlp_ratio,","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/models/unlimited_ocr.py#L53-L89","documentation":"UnlimitedOCR's tile-position encoder only implements tile_tag=='2D'; any other tile_tag value in the vision config is rejected at __init__.","triggerScenarios":"Loading an UnlimitedOCR checkpoint whose config sets tile_tag to '1D' or another value.","commonSituations":"Custom/older checkpoints trained with 1D row tags; hand-edited vision configs.","solutions":["Use a checkpoint/config with tile_tag='2D'","Set tile_tag='2D' in the vision config if the weights actually match","Implement the 1D branch if you have such a checkpoint"],"exampleFix":"# config.json\n# before\n\"tile_tag\": \"1D\"\n# after\n\"tile_tag\": \"2D\"","handlingStrategy":"validation","validationCode":"assert cfg.vision_config.get('tile_tag','2D') == '2D', 'unlimited_ocr supports tile_tag=2D only'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate vision_config values against supported model variants","Keep checkpoint configs unmodified from release"],"tags":["config-validation","ocr","vision"],"backgroundTag":"unsupported-config-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}