DeepSeek V4 Pro 0813 INT8 部署指南

更新时间:
复制 MD 格式

基于灵骏真武 810E 实例 efg.p16en 部署

SGLang v0.5.21

环境准备

镜像

docker pull egslingjun-registry.cn-wulanchabu.cr.aliyuncs.com/egslingjun-tmp/inference-xpu-pytorch-opt:v0.5.21_1ccf267d76_20261116_175604

下载模型。

# T-HEAD量化模型
modelscope download --model T-HEAD/DeepSeek-V4-Pro-0813-MoE-Quant-W-INT8-PerChannel-A-INT8-PerToken-Dense-Quant-W-INT8-PerChannel-A-INT8-PerToken --local_dir /path/to/your/model
模型:https://modelscope.cn/models/T-HEAD/DeepSeek-V4-Pro-0813-MoE-Quant-W-INT8-PerChannel-A-INT8-PerToken-Dense-Quant-W-INT8-PerChannel-A-INT8-PerToken

Colocate 部署(合部署,跨 2 机 TP32)

该流水线为 colocate 合部署,无 P/D 拆分,单进程同时承担 prefill 与 decode;--tp-size 32 --nnodes 2,需在 2 台机器分别以 --node-rank 0 / 1 启动。

$变量 请按实际环境设置:$SERVICE_PORT(服务端口)、$DIST_INIT_ADDR(多机 rendezvous 地址,形如 IP:port,指向 node-rank 0 机器)。客户端直接访问 node-rank 0 机器的 http://<host>:$SERVICE_PORT,无需 router。

Colocate · node-rank 0

export MODEL_PATH=/path/to/your/model
export SERVED_MODEL_NAME=dsv4pro
export SGLANG_RAGGED_VERIFY_MODE=static
export SGLANG_DSV4_FP4_EXPERTS=0
export SGLANG_DSPARK_ENABLE_MULTI_STREAM=1
export SGLANG_OPT_USE_MULTI_STREAM_OVERLAP=1
export SGLANG_OPT_BF16_FP32_GEMM_ALGO=cublas
export SGLANG_DSPARK_OPT_MARKOV_W2_TP_SHARD=0
export SGLANG_OPT_FP8_WO_A_GEMM=0
export SGLANG_ENABLE_JIT_DEEPGEMM=1
export SGLANG_JIT_DEEPGEMM_PRECOMPILE=1
export SGLANG_JIT_DEEPGEMM_FAST_WARMUP=0
export SGLANG_WARMUP_TIMEOUT=3600
export PYTHONUNBUFFERED=1
export SGLANG_ENABLE_CACHELINK=0
export PCCL_NET_PLUGIN_ENABLE=1
sglang serve \
  --model-path ${MODEL_PATH} \
  --served-model-name ${SERVED_MODEL_NAME} \
  --trust-remote-code \
  --tp-size 32 \
  --attention-context-parallel-size 2 \
  --nnodes 2 \
  --node-rank 0 \
  --dist-init-addr $DIST_INIT_ADDR \
  --quantization w8a8_int8 \
  --cuda-graph-backend-prefill disabled \
  --max-running-requests 64 \
  --cuda-graph-max-bs-decode 64 \
  --mem-fraction-static 0.9 \
  --page-size 256 \
  --speculative-algorithm DSPARK \
  --speculative-dspark-block-size 5 \
  --speculative-draft-model-path ${DRAFT_MODEL_PATH:-${MODEL_PATH}} \
  --disable-custom-all-reduce \
  --disable-overlap-schedule \
  --disable-shared-experts-fusion \
  --watchdog-timeout 60000 \
  --soft-watchdog-timeout 60000 \
  --dist-timeout 60000 \
  --enable-metrics \
  --enable-cache-report \
  --reasoning-parser deepseek-v4 \
  --tool-call-parser deepseekv4 \
  --port $SERVICE_PORT \
  --host 0.0.0.0

Colocate · node-rank 1

export MODEL_PATH=/path/to/your/model
export SERVED_MODEL_NAME=dsv4pro
export SGLANG_RAGGED_VERIFY_MODE=static
export SGLANG_DSV4_FP4_EXPERTS=0
export SGLANG_DSPARK_ENABLE_MULTI_STREAM=1
export SGLANG_OPT_USE_MULTI_STREAM_OVERLAP=1
export SGLANG_OPT_BF16_FP32_GEMM_ALGO=cublas
export SGLANG_DSPARK_OPT_MARKOV_W2_TP_SHARD=0
export SGLANG_OPT_FP8_WO_A_GEMM=0
export SGLANG_ENABLE_JIT_DEEPGEMM=1
export SGLANG_JIT_DEEPGEMM_PRECOMPILE=1
export SGLANG_JIT_DEEPGEMM_FAST_WARMUP=0
export SGLANG_WARMUP_TIMEOUT=3600
export PYTHONUNBUFFERED=1
export SGLANG_ENABLE_CACHELINK=0
export PCCL_NET_PLUGIN_ENABLE=1
sglang serve \
  --model-path ${MODEL_PATH} \
  --served-model-name ${SERVED_MODEL_NAME} \
  --trust-remote-code \
  --tp-size 32 \
  --attention-context-parallel-size 2 \
  --nnodes 2 \
  --node-rank 1 \
  --dist-init-addr $DIST_INIT_ADDR \
  --quantization w8a8_int8 \
  --cuda-graph-backend-prefill disabled \
  --max-running-requests 64 \
  --cuda-graph-max-bs-decode 64 \
  --mem-fraction-static 0.9 \
  --page-size 256 \
  --speculative-algorithm DSPARK \
  --speculative-dspark-block-size 5 \
  --speculative-draft-model-path ${DRAFT_MODEL_PATH:-${MODEL_PATH}} \
  --disable-custom-all-reduce \
  --disable-overlap-schedule \
  --disable-shared-experts-fusion \
  --watchdog-timeout 60000 \
  --soft-watchdog-timeout 60000 \
  --dist-timeout 60000 \
  --enable-metrics \
  --enable-cache-report \
  --reasoning-parser deepseek-v4 \
  --tool-call-parser deepseekv4 \
  --port $SERVICE_PORT \
  --host 0.0.0.0