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

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

本文介绍了Ant International AI Infra团队在八卡H200集群上,使用SGLang PD分离(1P1D配置)对DeepSeek-V4.1-Flash进行系统优化的完整过程。

背景与瓶颈分析

部署采用四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

所有实验均在相同模型权重与基准协议下进行,确保结果可复现。

本文来自 LMSYS 博客,赢政天下(winzheng.com)进行了全文翻译。 点击这里查看原文 如果转载中文,请注明出处,谢谢支持!