{"record":{"id":"c3946dbd5e7ce76b","repo":"sgl-project/sglang","slug":"not-support-pos-emb-type-pos-emb-type-c3946d","errorCode":null,"errorMessage":"Not support pos_emb_type: {pos_emb_type}","messagePattern":"Not support pos_emb_type: (.+?)","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/models/kimi_k3_vl.py","lineNumber":301,"sourceCode":"        pos_emb_type: str = \"divided_fixed\",\n        pos_emb_interpolation_mode: str = \"bicubic\",\n        patch_embed_proj_bias: bool = True,\n    ):\n        super().__init__()\n        if isinstance(patch_size, int):\n            patch_size = (patch_size, patch_size)\n        self.patch_size = patch_size\n\n        self.proj = nn.Conv2d(\n            in_dim,\n            out_dim,\n            kernel_size=patch_size,\n            stride=patch_size,\n            bias=patch_embed_proj_bias,\n        )\n\n        if pos_emb_type != \"divided_fixed\":\n            raise NotImplementedError(f\"Not support pos_emb_type: {pos_emb_type}\")\n        self.pos_emb = Learnable2DInterpPosEmbDividedFixed(\n            height=pos_emb_height,\n            width=pos_emb_width,\n            num_frames=pos_emb_time,\n            dim=out_dim,\n            interpolation_mode=pos_emb_interpolation_mode,\n        )\n\n    def forward(\n        self,\n        x: torch.Tensor,\n        grid_thws: torch.Tensor,\n        *,\n        grid_thw_list: Optional[Sequence[Sequence[int]]] = None,\n        position_embeddings: Optional[torch.Tensor] = None,\n    ) -> torch.Tensor:\n        # MIOpen can overflow grid_size for some patch shapes. Prefer AITER's\n        # Triton convolution on AMD, with an equivalent linear fallback.","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/models/kimi_k3_vl.py#L283-L319","documentation":"The Kimi-K3 vision tower (kimi_k3_vl.py:301) only implements the 'divided_fixed' positional-embedding scheme (Learnable2DInterpPosEmbDividedFixed). Any other pos_emb_type string in the vision config is rejected at model construction. This is a config-surface guard: new checkpoint variants using a different pos-emb layout would need a new implementation.","triggerScenarios":"Loading a Kimi-K3-VL checkpoint whose config.json vision section sets pos_emb_type to anything other than \"divided_fixed\" (e.g. a future \"rope\" or \"absolute\" variant).","commonSituations":"Using a new/finetuned community checkpoint that changed vision pos-emb, hand-edited config.json, or mixing configs from a different model revision.","solutions":["Check the checkpoint's config.json vision pos_emb_type; the official weights use divided_fixed","Use the official Kimi-K3 vision config or a checkpoint revision known to work with this code","If you genuinely need the new type, implement a matching Learnable2DInterpPosEmb subclass and register it in the branch"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"assert vision_cfg[\"pos_emb_type\"] == \"divided_fixed\", vision_cfg[\"pos_emb_type\"]","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate non-default vision config fields before launching a long server boot","Track which checkpoint revision a config came from"],"tags":["kimi-k3","vision","config-validation","not-implemented"],"backgroundTag":"unsupported-config-value","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}