SGLang PD分离优化DeepSeek-V4.1在H200上的性能突破

Ant International AI Infra团队公布了在八卡H200集群上优化DeepSeek-V4.1-Flash的完整记录,采用的是SGLang的PD分离方案,配比为1P1D。

这套部署把四块GPU分给Prefill、四块GPU分给Decode。团队早期做性能剖析时发现,Indexer计算吃掉了Prefill前向耗时的39.06%,MoE和NCCL通信各占大约18%。

Eight-H200 PD serving topology with four GPUs assigned to each worker

图1画出了1P1D的服务拓扑。团队圈出了五个瓶颈:形状敏感的Indexer GEMM、晚层token的冗余计算、MoE输出通信、全上下文评分,以及重复评分尾声的内存流量。

Early Prefill profile, highlighting Indexer computation and the remaining major costs

针对这五处,团队落地了六项优化。

具体来看:把BF16评分宽度对齐,微基准延迟降了约40%;候选位置直接评分,E2E降22.1%;评分尾声做融合,E2E降18.2%;Prefill chunk加大到16K,TTFT降31.3%;MoE输出改用reduce-scatter,通信时间降19.4%-21.7%;启用CP与DSpark的有界重放,TTFT降46.7%。

Pre-optimization serving performance at the original development commitBaseline GSM8K single-shot accuracy on 1,319 examplesModel execution stages and the locations of the six optimizations

基准测试的输入是65536 token,输出512 token,覆盖50%、70%、90%三种共享前缀场景。

优化之后,综合E2E延迟下降15%-64%,TTFT下降41%-79%,TPOT上升3%-52%。代价是GSM8K准确率从96.74%掉到95.38%。

Score-width alignment before and after, retaining the logical selection rangeOriginal serving benchmark table from PR 45794CP rank 0 scoring trace with width alignmentCP rank 0 scoring trace before width alignmentGSM8K accuracy with score-width alignment from PR 45794

团队强调,所有实验用的模型权重和基准协议完全一致,结果可以复现。