Repository navigation
[Perf] deepseek-v4.1: Default PD to MegaAttention, with the KV layout in the PD handshake - #45075
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
/rerun-test test_register_to_bootstrap.py test_disaggregation_wire.py test_dsv4_compressed_pools.py test_model_overrides.py test_prefill_complete_integration.py test_decode_queue_cleanup.py registered/unit/server_args/test_server_args.py test_pool_configurator.py test_deepseek_v41_pd_cp_dspark.py test_disaggregation_dsv4.py test_disaggregation_rust_server.py registered/disaggregation/test_disaggregation_basic.py test_disaggregation_hisparse.py test_disaggregation_dp_attention.py |
|
/tag-and-rerun-ci |
|
🚀 🚀 🚀 🚀 🚀 |
The startup assert rejected --dsv4-attn-backend trtllm with any --disaggregation-mode because a trtllm prefill could pair with a FlashMLA decode and transfer 512-byte uniform-FP8 rows into 584-byte packed pages. The bootstrap handshake now carries the pool's KV layout (sgl-project#45075 reports uniform_fp8 for trtllm pools) and rejects such a pair, and every transferred buffer is described from the real pool geometry, so a matched trtllm prefill/decode pair needs no transfer changes. Closes sgl-project#37838. Co-Authored-By: Claude Opus 5.5 <[email protected]>
_default_dsv4_attention_backendno longer falls back to FlashMLA under PD, so both roles pick MegaAttention (flashmla_mega) on SM100/SM103, as a single server does.kv_cache_dtype, so a mismatched pair would transfer KV that the decode misreads. The prefill now registers its KV layout (DeepSeekV4TokenToKVPool.pd_kv_layout: the main layout plus each compression ratio's), the Python and Rust bootstrap servers relay it, and the decode raisesKV layout mismatchnext to the dtype check. Other pools report no layout and skip the check.Verified on two GB300 nodes (DEP2 prefill + DEP2 decode, DSpark, Mooncake) with no
--dsv4-attn-backend: both roles resolveflashmla_mega, and GSM8K (1,319, greedy) scores 96.66%, the same as withflashmlaon both roles. With only the decode onflashmla, its first request fails withKV layout mismatch: prefill server has kv_layout=v41,c1:v41_fp4,c2:v41_fp4, but decode server has kv_layout=v4,c1:v4,c2:v4.Behavior change: DeepSeek-V4.1 PD on SM100/SM103 runs MegaAttention on both roles by default. A prefill on SM100/SM103 paired with a decode on another GPU now needs
--dsv4-attn-backend flashmlaon the prefill. An older decode cannot parse the newkv_layoutfield, so upgrade both roles together.CI States
Latest PR Test (Base): 🚫 Run #39193587005
Latest PR Test (Extra): ❌ Run #39193586944
Latest PR Test (AMD ROCm 10): 🚫 Run #39193586911