Skip to content

[Bug] DeepSeek-V3 model gets bad accuracy result on gsm8k benchmark when EP is enabled #8402

@zminglei

Description

@zminglei

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
  • 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed.
  • 5. Please use English, otherwise it will be closed.

Describe the bug

DeepSeek-V3 model gets bad accuracy result on gsm8k benchmark when EP is enabled.
TP 8 result: 0.945 (Accuracy)
EP result: 0.845 (Accuracy)

Reproduction

EP result reproduce:

# Terminal 1
python -m sglang.launch_server --model /shared/public/elr-models/deepseek-ai/DeepSeek-V3-0324/e9b33add76883f293d6bf61f6bd89b497e80e335/ --tp 8 --trust-remote-code --enable-ep-moe --mem-fraction-static 0.8


# Terminal 2
python benchmark/gsm8k/bench_sglang.py
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 200/200 [00:28<00:00,  7.11it/s]
Accuracy: 0.845
Invalid: 0.000
Latency: 29.142 s
Output throughput: 595.128 token/s

TP result reproduce:

# Terminal 1
python -m sglang.launch_server --model /shared/public/elr-models/deepseek-ai/DeepSeek-V3-0324/e9b33add76883f293d6bf61f6bd89b497e80e335/ --tp 8 --trust-remote-code --mem-fraction-static 0.8


# Terminal 2
python benchmark/gsm8k/bench_sglang.py --data-path /shared/public/data/gsm8k/test.jsonl
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 200/200 [00:22<00:00,  8.92it/s]
Accuracy: 0.945
Invalid: 0.000
Latency: 22.641 s
Output throughput: 886.078 token/s

Environment

Python: 3.10.14 (main, Jul 14 2024, 22:24:12) [GCC 11.2.0]
CUDA available: True
GPU 0,1,2,3,4,5,6,7: NVIDIA H200
GPU 0,1,2,3,4,5,6,7 Compute Capability: 9.0
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 12.6, V12.6.77
CUDA Driver Version: 550.163.01
PyTorch: 2.7.1+cu126
sglang: 0.4.9.post3
sgl_kernel: 0.2.7
flashinfer_python: 0.2.7.post1
triton: 3.3.1
transformers: 4.55.0.dev0
torchao: 0.9.0
numpy: 2.2.6
aiohttp: 3.12.14
fastapi: 0.116.1
hf_transfer: 0.1.9
huggingface_hub: 0.34.1
interegular: 0.3.3
modelscope: 1.28.1
orjson: 3.11.1
outlines: 0.1.11
packaging: 25.0
psutil: 7.0.0
pydantic: 2.11.7
python-multipart: 0.0.20
pyzmq: 27.0.0
uvicorn: 0.35.0
uvloop: 0.21.0
vllm: Module Not Found
xgrammar: 0.1.21
openai: 1.97.1
tiktoken: 0.9.0
anthropic: 0.59.0
litellm: 1.74.8
decord: 0.6.0
NVIDIA Topology:
GPU0 GPU1 GPU2 GPU3 GPU4 GPU5 GPU6 GPU7 NIC0 NIC1 NIC2 NIC3 CPU Affinity NUMA Affinity GPU NUMA ID
GPU0 X NV18 NV18 NV18 NV18 NV18 NV18 NV18 SYS SYS SYS SYS 0-63,128-191 0 N/A
GPU1 NV18 X NV18 NV18 NV18 NV18 NV18 NV18 SYS SYS SYS SYS 0-63,128-191 0 N/A
GPU2 NV18 NV18 X NV18 NV18 NV18 NV18 NV18 SYS SYS SYS SYS 0-63,128-191 0 N/A
GPU3 NV18 NV18 NV18 X NV18 NV18 NV18 NV18 SYS SYS SYS SYS 0-63,128-191 0 N/A
GPU4 NV18 NV18 NV18 NV18 X NV18 NV18 NV18 NODE NODE PIX NODE 64-127,192-255 1 N/A
GPU5 NV18 NV18 NV18 NV18 NV18 X NV18 NV18 NODE NODE NODE PIX 64-127,192-255 1 N/A
GPU6 NV18 NV18 NV18 NV18 NV18 NV18 X NV18 NODE PIX NODE NODE 64-127,192-255 1 N/A
GPU7 NV18 NV18 NV18 NV18 NV18 NV18 NV18 X PIX NODE NODE NODE 64-127,192-255 1 N/A
NIC0 SYS SYS SYS SYS NODE NODE NODE PIX X NODE NODE NODE
NIC1 SYS SYS SYS SYS NODE NODE PIX NODE NODE X NODE NODE
NIC2 SYS SYS SYS SYS PIX NODE NODE NODE NODE NODE X NODE
NIC3 SYS SYS SYS SYS NODE PIX NODE NODE NODE NODE NODE X

Legend:

X = Self
SYS = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
PHB = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
PXB = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
PIX = Connection traversing at most a single PCIe bridge
NV# = Connection traversing a bonded set of # NVLinks

NIC Legend:

NIC0: mlx5_0
NIC1: mlx5_1
NIC2: mlx5_2
NIC3: mlx5_3

ulimit soft: 10000000

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions