{"record":{"id":"683cc2c6f4bd819c","repo":"sgl-project/sglang","slug":"use-rope2d-must-be-true","errorCode":null,"errorMessage":"use_rope2d must be True","messagePattern":"use_rope2d must be True","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/models/step3_vl_10b.py","lineNumber":317,"sourceCode":"        config,\n        act_layer: Callable,\n        norm_layer: Callable = _DEFAULT_NORM_LAYER,\n        quant_config: Optional[QuantizationConfig] = None,\n        prefix: str = \"\",\n    ):\n        super().__init__()\n        self.patch_size = config.patch_size\n\n        self.output_dim = config.output_dim or config.width\n        self.heads = config.heads\n        self.width = config.width\n        self.layers = config.layers\n\n        self.use_abs_posemb = config.use_abs_posemb\n        self.use_cls_token = config.use_cls_token\n        self.use_rope2d = config.use_rope2d\n        if not self.use_rope2d:\n            raise ValueError(\"use_rope2d must be True\")\n        self.image_size = config.image_size\n\n        self.conv1 = Conv2dLayer(\n            in_channels=3,\n            out_channels=config.width,\n            kernel_size=config.patch_size,\n            stride=config.patch_size,\n            bias=False,\n        )\n\n        self.ln_pre = norm_layer(config.width) if config.use_ln_pre else nn.Identity()\n        self.ln_post = norm_layer(self.width) if config.use_ln_post else nn.Identity()\n\n        self.transformer = PerceptionEncoderVisionTransformer(\n            config.width,\n            config.layers,\n            config.heads,\n            max_grid_height=self.image_size // self.patch_size,","sourceCodeStart":299,"sourceCodeEnd":335,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/models/step3_vl_10b.py#L299-L335","documentation":"The Step3-VL-10B vision encoder's implementation only supports 2D rotary position embeddings; if config.use_rope2d is false the position-encoding path would differ from the trained model, so init rejects it outright.","triggerScenarios":"Loading a step3-vl-10b vision config where use_rope2d is False (edited config.json, wrong vision tower config merged from another model, or a new checkpoint variant).","commonSituations":"Checkpoint merges that take the vision config from a different model; hand-tuned configs disabling rope2d expecting abs-posemb fallback; conversion tooling writing incomplete vision configs.","solutions":["Restore use_rope2d: true in the vision config.json","Re-download the original step3-vl-10b checkpoint config","If the variant truly lacks rope2d, use a backend supporting it or extend the model"],"exampleFix":"// config.json\n// before: \"use_rope2d\": false\n// after:  \"use_rope2d\": true","handlingStrategy":"validation","validationCode":"assert config.use_rope2d is True, \"step3-vl-10b vision requires use_rope2d=true\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Diff vision config against the official checkpoint after merges"],"tags":["step3-vl","vision-config","rope"],"backgroundTag":"unsupported-config-flag","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}