{"record":{"id":"0b2467da0ee72370","repo":"xai-org/x-algorithm","slug":"rope-type-self-config-rope-type-is-not-supported","errorCode":null,"errorMessage":"Rope type {self.config.rope_type} is not supported","messagePattern":"Rope type (.+?) is not supported","errorType":"validation","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"phoenix/xrex/models/layers.py","lineNumber":379,"sourceCode":"        key_heads: jax.Array,\n        *,\n        positions: jax.Array | None,\n    ) -> tuple[jax.Array, jax.Array]:\n        t: jax.Array | None = None\n        if positions is not None:\n            t = positions[..., 0].astype(jnp.float32)\n\n        match self.config.rope_type:\n            case \"1d\":\n                rotate = RotaryEmbedding(\n                    dim=self.config.key_size,\n                    base_exponent=self.config.rope_base_exponent,\n                )\n                key_heads, query_heads = map(\n                    rotate, (key_heads, query_heads), (1, 1), (0, 0), (t, t)\n                )\n            case _:\n                raise NotImplementedError(f\"Rope type {self.config.rope_type} is not supported\")\n\n        return query_heads, key_heads\n\n    @hk.transparent\n    def _get_attn_impl(\n        self,\n        extra_attn_kwargs: dict[str, jax.Array | None],\n        *,\n        mask: jax.Array | None,\n        seqpack_layout: SequencePackedLayout | None,\n    ) -> tuple[Type[Attention], dict[str, jax.Array | None]]:\n        match self.config.attn_impl:\n            case \"jax_attn\" | \"jax_attn_interleaved\":\n                extra_attn_kwargs[\"masks\"] = mask\n                attn_class = JaxAttention\n            case \"pallas_attn\":\n                attn_class = PallasAttention\n            case \"flash_attn\":","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/xai-org/x-algorithm/blob/24c60942c5c5fdad3a6addffb4c6e6d2f228f04f/phoenix/xrex/models/layers.py#L361-L397","documentation":"_apply_rope dispatches on config.rope_type via a match statement; only the implemented rotary-embedding variants (the cases above the `case _`) are supported. An unrecognized rope_type falls through to `case _` and raises NotImplementedError with the config value.","triggerScenarios":"Setting rope_type to an unsupported or misspelled value (e.g. 'rope_neox' vs 'neox', 'none', 'linear') in the layer config; loading a config from another repo with extra rope variants.","commonSituations":"Porting configs between model families whose rope_type vocabulary differs; typos after config refactors.","solutions":["Set rope_type to one of the values handled in _apply_rope (inspect the match arms in layers.py around line 379).","Fix typos/casing in the config string.","If a new variant is genuinely needed, add a match arm implementing it before the fallback raise."],"exampleFix":"# before\nconfig.rope_type = \"rope_neox\"\n\n# after\nconfig.rope_type = \"neox\"","handlingStrategy":"validation","validationCode":"import inspect, phoenix.xrex.models.layers as L  # inspect supported rope types\n# hard-code the supported set from the match arms:\nassert config.rope_type in {\"\", \"default\"} or config.rope_type in SUPPORTED_ROPE_TYPES","typeGuard":"def is_supported_rope(rt: str, supported: set[str]) -> bool:\n    return rt in supported","tryCatchPattern":null,"preventionTips":["Mirror the match-statement arms in a module-level frozenset used by config validation."],"tags":["rope","positional-encoding","enum-validation","config"],"backgroundTag":"invalid-config-value","analyzedSha":"24c60942c5c5fdad3a6addffb4c6e6d2f228f04f","analyzedAt":"2026-08-28T11:40:14.686Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}