Repository navigation
[Perf] [NVIDIA] deepseek-v4.1: Reuse dequantized compressed KV in PD CP prefill (7/N) - #40421
Conversation
|
/tag-run-ci-label |
|
/rerun-failed-ci |
c6d77af to
b14c6e3
Compare
|
/rerun-failed-ci |
|
/rerun-test test_deepseek_v41_flash_gb300.py |
|
🚀 |
This comment has been minimized.
This comment has been minimized.
b14c6e3 to
4e0159d
Compare
|
/rerun-test test_dsv41_shared_prefill_kv.py test_deepseek_v41_pd_cp_dspark.py test_deepseek_v4_flash_fp4_h200.py test_deepseek_v4_flash_fp4_b200.py |
|
🚀 🚀 🚀 ⛔ |
|
/rerun-test test_deepseek_v4_flash_fp4_megamoe_b200.py test_deepseek_v41_flash_gb300_dp4ep4.py test_deepseek_v41_flash_gb300_encoder_bcg.py test_deepseek_v41_flash_gb300_tp4ep4.py test_deepseek_v41_flash_gb300_trtllm_bounded_bcg.py |
|
🚀 🚀 |
86349c2 to
e58302f
Compare
|
/rerun-test test_deepseek_v41_pd_cp_dspark.py test_deepseek_v4_flash_fp4_h200.py test_deepseek_v4_flash_fp4_b200.py test_deepseek_v4_flash_fp4_megamoe_b200.py test_deepseek_v41_flash_gb300_dp4ep4.py test_deepseek_v41_flash_gb300_encoder_bcg.py test_deepseek_v41_flash_gb300_tp4ep4.py test_deepseek_v41_flash_gb300_trtllm_bounded_bcg.py |
|
🚀 🚀 🚀 🚀 |
e58302f to
be92599
Compare
|
PR ready. Will merge later |
be92599 to
2c6ee0f
Compare
This comment has been minimized.
This comment has been minimized.
2c6ee0f to
4d23ceb
Compare
6405bb6 to
ac14286
Compare


issue:#39700
base pr: #40179
Summary
DeepSeek V4.1 consumer layers can share the same compressed KV storage, but sparse prefill currently dequantizes that storage into a BF16 workspace on every layer.
Reuse the dequantized compressed KV within a forward to avoid repeated reads, dequantization, and workspace writes.

Changes
This retains additional scratch memory for the separate workspaces.
Validation
Performance
DeepSeek V4.1 Flash on 8×B200 with PD disaggregation; prefill uses TP4/EP4, CP, BCG, MegaMoE, and DSpark. Results are medians of three unprofiled runs using the unchanged benchmark script, with 512 requests and an output length of 500, which is 60k unprefix cache of 64k all input length.
precision
gsm8k test result

trace comparison
before

after

CI States
Latest PR Test (Base): 🚫 Run #41813675179
Latest PR Test (Extra): ❌ Run #41813675111
Latest PR Test (AMD ROCm 10): ❌ Run #41813675138
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: