{"record":{"id":"6587dfbe383ed100","repo":"sgl-project/sglang","slug":"minicpm-does-not-support-dp-attention","errorCode":null,"errorMessage":"MiniCPM does not support DP attention","messagePattern":"MiniCPM does not support DP attention","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/arg_groups/overrides.py","lineNumber":1287,"sourceCode":"    if server_args.is_attention_backend_not_set():\n        overrides[\"prefill_attention_backend\"] = \"flashinfer\"\n        logger.info(\"Use flashinfer as default prefill attention backend for Moss-VL\")\n    prefill_backend = (\n        overrides.get(\"prefill_attention_backend\")\n        or server_args.get_attention_backends()[0]\n    )\n    assert prefill_backend == \"flashinfer\", (\n        \"MossVLForConditionalGeneration requires flashinfer prefill \"\n        \"attention backend for cross-attention custom mask support.\"\n    )\n    return overrides\n\n\n@_register_for(\"MiniCPMForCausalLM\", \"MiniCPMSALAForCausalLM\")\ndef _minicpm_sala_overrides(server_args: Any, hf_config: Any) -> dict:\n    cfg = resolving_view(server_args)\n    if cfg.enable_dp_attention:\n        raise ValueError(\"MiniCPM does not support DP attention\")\n    has_sparse_attention = getattr(hf_config, \"has_minicpm_sparse_attention\", False)\n    has_hybrid_attention = has_sparse_attention or getattr(\n        hf_config, \"has_lightning_layers\", False\n    )\n    overrides: Dict[str, Any] = {}\n    if has_hybrid_attention:\n        if cfg.enable_hierarchical_cache:\n            raise ValueError(\"MiniCPM SALA does not support hierarchical cache\")\n        overrides[\"disable_radix_cache\"] = True\n    if envs.SGLANG_MINICPM_FORCE_DENSE.get():\n        dense_backends = {\n            \"minicpm_flashattn\": (\"fa4\" if is_blackwell_supported() else \"fa3\"),\n            \"minicpm_flashinfer\": \"flashinfer\",\n        }\n        # Literal keys keep the written-field set statically derivable; a loop\n        # variable hides it from the census in test_chain_read_ratchet.py.\n        dense_attention = dense_backends.get(cfg.attention_backend)\n        if dense_attention is not None:","sourceCodeStart":1269,"sourceCodeEnd":1305,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/arg_groups/overrides.py#L1269-L1305","documentation":"MiniCPM models (MiniCPMForCausalLM / MiniCPMSALAForCausalLM) do not implement DP attention in SGLang; the model-specific override hook rejects enable_dp_attention at argument resolution time.","triggerScenarios":"Launching any MiniCPM variant with --enable-dp-attention (or a config that sets enable_dp_attention=True); _minicpm_sala_overrides raises immediately.","commonSituations":"Copy-pasting a DeepSeek DP-attention launch line for throughput; cluster defaults injecting --enable-dp-attention globally.","solutions":["Remove --enable-dp-attention from the launch command","If you need data parallelism, use --dp-size with tensor parallelism instead of DP attention","Pick a model that supports DP attention if it is a hard requirement"],"exampleFix":"# before\n--enable-dp-attention --dp-size 4\n# after\n--dp-size 4","handlingStrategy":"validation","validationCode":"if model_arch in ('MiniCPMForCausalLM', 'MiniCPMSALAForCausalLM'):\n    server_args.enable_dp_attention = False","typeGuard":null,"tryCatchPattern":"except ValueError as e:\n    if 'DP attention' in str(e): server_args.enable_dp_attention = False; retry()\n    raise","preventionTips":["Maintain per-model flag whitelists in launch tooling","Strip --enable-dp-attention from generic templates when serving MiniCPM"],"tags":["minicpm","dp-attention","sglang","config-validation"],"backgroundTag":"unsupported-feature-for-model","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}