sskj/experiments/p800/qwen3_235b_p800_sglang_tp8
yy-fighting 3f28edd1a6 feat(p800): add Qwen3-235B-A22B SGLang TP=8 benchmark experiment
Deploy Qwen3-235B-A22B on 8x Kunlun P800 XPU (TP=8) via sglang, adapted
from the proven qwen3-8b launch (attention-backend kunlun, dtype float16,
mem-fraction-static 0.9, XSGL_* XPU env vars). TP bumped to 8 with all 8
/dev/xpu* devices; context-length 8192 (the 8b used 4096 which truncated
2 outputs at 2k+2k).

Patch qwen3_moe.py in the sglang image: load_weights assigned to the
read-only @property routed_experts_weights_of_layer, raising
AttributeError for any qwen3 MoE model (Qwen3-8B is dense, so unaffected).
Fix: assign to the private _routed_experts_weights_of_layer, applied
idempotently in start_server.sh on every start.

bench_serving: isl=2048 osl=2048 concurrency=16 num_prompts=160.
160/160 success in 771s. Summary in results/qwen3_235b_tp8_run1/report.md.
Server on port 30010 (30000 held by the lingering qwen3_8b_bench_tp1).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 06:34:57 +00:00
..

Qwen3-235B-A22B · Kunlun P800 · SGLang TP=8

在 p800.28× 昆仑芯 P800 XPU每卡 96GB上用 SGLang 以 TP=8 部署 Qwen3-235B-A22B,并用 sglang.bench_serving输入 2048 / 输出 2048 / 并发 16 的吞吐基准输出吞吐、TTFT、TPOT、ITL、E2E 等指标。

关键设计

本实验借鉴仓库里已验证可用的 qwen3-8b TP=1 启动命令(同一昆仑 P800 sglang 镜像), 仅做以下适配:

qwen3-8b (TP=1) 本实验 (TP=8)
容器 XPU /dev/xpu0 /dev/xpu0..7(新容器)
--tp-size 1 8
XPU_VISIBLE_DEVICES 0 0,1,2,3,4,5,6,7
--model-path Qwen3-8B Qwen3-235B-A22B
--context-length 4096 81928b 用 4096 在 2k+2k 下截断了 2 条输出)
其余启动参数 完全一致

不变的 Qwen3 专用配置(与 DSV4 实验不同):

  • --attention-backend kunlun(非 DSV4 的 nsa
  • XPU 环境变量:XSGL_INTERTYPE_BFP16=1XSGL_FAST_SWIGLU=1XMLIR_FORCE_USE_XPU_GRAPH=1XSGL_FUSE_SPLIT_NORM_ROPE_NEOX=1
  • --dtype float16--disable-radix-cache--chunked-prefill-size -1--page-size 64--mem-fraction-static 0.9--cuda-graph-bs 1..16
  • 无 DSV4 专用变量(IS_DSV4/SGLANG_DSV4_MODE 等)、无 reasoning/tool-call parser

显存预算235B FP16 权重 ~470GBTP=8 每卡 ~59GB每卡 96GB0.9 静态占比留 ~27GB/卡 给 KV+激活+cuda graph2k+2k 上下文 KV 极小,充裕。

注意:框架 scripts/common/server_docker.sh 里的 docker_server_start 是 DeepSeek-V4 硬编码的NSA attention、IS_DSV4=1、deepseekv4 parser 不能用于 Qwen3因此本实验自带独立的 start_server.sh

文件

  • config.env — 实验参数唯一来源
  • start_server.sh — 起 8-XPU 容器 + 容器内启动 sglang + 健康检查
  • run_bench.sh — 编排入口(写元数据 → 起服务 → warmup+bench → 解析)
  • parse_results.py — 解析 sglang.bench_serving 输出(复用自 dsv4_p800_sglang
  • results/<run_id>/ — 自动生成:raw_outputs/*.jsonllogs/results.jsonreport.md

用法

cd /data1/yy/sskj/experiments/p800/qwen3_235b_p800_sglang_tp8

# 一键跑(起服务 + 基准 + 解析)
bash run_bench.sh

# 或分步:先起服务(便于排查),再复用服务跑基准
bash start_server.sh
SKIP_MANAGE_SERVER=1 bash run_bench.sh

服务启动加载 235B 权重(~470GB+ 捕获 16 个 batch size 的 cuda graph 较慢, 健康检查超时设为 1200s。结果在 results/<run_id>/report.md

输出指标report.md

每个 scenario 给出Success/Failed、Req/s、Input/Output/Total tok/s、 TTFTmean/p50/p90/p99、TPOTmean/p50/p90/p99、E2Ep99等。