{"record":{"id":"827d01d8cdd14a5d","repo":"sgl-project/sglang","slug":"currently-only-radix-supported-deterministic-atte","errorCode":null,"errorMessage":"Currently only {RADIX_SUPPORTED_DETERMINISTIC_ATTENTION_BACKEND} attention backends are supported for deterministic inference with absorbed-MLA models. But you're using {attention_backend}.","messagePattern":"Currently only (.+?) attention backends are supported for deterministic inference with absorbed-MLA models\\. But you're using (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/server_args.py","lineNumber":9234,"sourceCode":"                        \"DeepseekV32ForCausalLM\",\n                        \"MistralLarge3ForCausalLM\",\n                        \"PixtralForConditionalGeneration\",\n                        \"GlmMoeDsaForCausalLM\",\n                        \"Glm4MoeLiteForCausalLM\",\n                    ]\n                except Exception:\n                    pass\n\n            # Check attention backend\n            run_post_process_pass(self, _deterministic_attention_backend)\n\n            attention_backend = resolved_view(self).attention_backend\n            if is_deepseek_model:\n                if (\n                    attention_backend\n                    not in RADIX_SUPPORTED_DETERMINISTIC_ATTENTION_BACKEND\n                ):\n                    raise ValueError(\n                        f\"Currently only {RADIX_SUPPORTED_DETERMINISTIC_ATTENTION_BACKEND} attention backends are supported for deterministic inference with absorbed-MLA models. But you're using {attention_backend}.\"\n                    )\n                if attention_backend == \"fa4\" and not is_sm100_or_sm110_supported():\n                    raise ValueError(\n                        \"Deterministic inference with absorbed-MLA models on the fa4 \"\n                        \"attention backend requires SM100/SM110: it runs \"\n                        \"absorbed MLA, whose qv argument flash_attn.cute only \"\n                        \"implements on those archs.\"\n                    )\n\n            if attention_backend not in RADIX_SUPPORTED_DETERMINISTIC_ATTENTION_BACKEND:\n                # Currently, only certain backends support radix cache. Support for other backends is in progress\n                self._declare(\n                    \"_handle_deterministic_inference\",\n                    disable_radix_cache=True,\n                )\n                logger.warning(\n                    f\"Currently radix cache is not compatible with {attention_backend} attention backend for deterministic inference. It will be supported in the future.\"","sourceCodeStart":9216,"sourceCodeEnd":9252,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/server_args.py#L9216-L9252","documentation":"Raised when deterministic inference is enabled with an absorbed-MLA (DeepSeek-family) model but the chosen attention backend is not in RADIX_SUPPORTED_DETERMINISTIC_ATTENTION_BACKEND. Deterministic replay of absorbed MLA is only implemented for specific radix-capable backends, so others cannot guarantee bit-identical attention results.","triggerScenarios":"Enabling deterministic inference (e.g. via rl_on_policy_target or explicit flag) with a DeepSeek/absorbed-MLA model while attention_backend is something other than the supported set (e.g. flashinfer or triton variants).","commonSituations":"Switching attention backends for perf tuning while keeping deterministic inference on; upgrading SGLang where the supported backend list changed; RL on-policy workflows hitting an unsupported default backend.","solutions":["Switch to one of the backends in RADIX_SUPPORTED_DETERMINISTIC_ATTENTION_BACKEND (inspect its value in python/sglang/srt/server_args.py)","Or disable deterministic inference / rl_on_policy_target if reproducibility is not required","For DeepSeek models prefer the supported backend pair listed in the constant"],"exampleFix":"# before\n--attention-backend flashinfer --rl-on-policy-target ...\n# after\n--attention-backend fa3 --rl-on-policy-target ...","handlingStrategy":"validation","validationCode":"from sglang.srt.server_args import RADIX_SUPPORTED_DETERMINISTIC_ATTENTION_BACKEND\nif deterministic and is_deepseek:\n    assert args.attention_backend in RADIX_SUPPORTED_DETERMINISTIC_ATTENTION_BACKEND, (\n        f\"need one of {RADIX_SUPPORTED_DETERMINISTIC_ATTENTION_BACKEND}\")","typeGuard":"def backend_supports_deterministic_mla(backend: str) -> bool:\n    from sglang.srt.server_args import RADIX_SUPPORTED_DETERMINISTIC_ATTENTION_BACKEND\n    return backend in RADIX_SUPPORTED_DETERMINISTIC_ATTENTION_BACKEND","tryCatchPattern":"try:\n    ServerArgs(**cli)\nexcept ValueError as e:\n    if 'deterministic inference' in str(e):\n        cli['attention_backend'] = 'fa3'  # fallback to a supported backend\n        ServerArgs(**cli)\n    else:\n        raise","preventionTips":["Pin an attention backend explicitly in deterministic/RL configs","Check the supported backend constant when upgrading SGLang"],"tags":["sglang","deterministic-inference","mla","attention-backend","deepseek"],"backgroundTag":"unsupported-configuration-combination","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}