132 Commits

Author SHA1 Message Date
shishi
d6e00d61dc fix(dsv4): sync glm52 add16 fixes (sglang 0.5.2 client + health timeout)
Sync the glm52 add16 fixes (98cdb67) into the DSV4 experiment so the
adaptive concurrency search can actually run end-to-end.

sglang client (the main blocker):
- Built local/vllm-ascend:0.23-a3-dsv4-sglang image: sglang 0.5.2 (not
  0.5.16 -- 0.5.16 deprecates bench_serving and the glm52 parser fix
  targets the 0.5.2 output format) + minimal deps (ipython/traitlets/
  stack_data/executing/asttokens/pure_eval/prompt_toolkit/wcwidth) via
  --no-deps, so the vllm env is untouched.
- Verified: python -m sglang.bench_serving --help works in the image.
- config.env DOCKER_IMAGE -> local/vllm-ascend:0.23-a3-dsv4-sglang.

config.env (sync glm52 98cdb67):
- CONTAINER_NAME: drop ${...:-} override -> fixed value (avoids the
  double-suffix bug where CONTAINER_NAME already carries _tpX_dpY).
- CONTAINER_PYTHON: /usr/local/bin/python (does not exist) ->
  /usr/local/python3.12.13/bin/python3 (matches glm52 fix).

run_adaptive_concurrency_add16.sh (sync glm52 98cdb67):
- --model $SERVED_MODEL_NAME -> --tokenizer $MODEL_PATH (bench_serving
  0.5.2 wants the tokenizer path).
- docker exec env: add TORCH_DEVICE_BACKEND_AUTOLOAD=0 so the client
  does not try to autoload torch_npu.
- export ENGINE_TP/ENGINE_DP in engine_start_server + export line;
  container_name uses ${ENGINE_TP:-${tp}} (the bench runs in a subshell
  where tp/dp are not in scope).

start_vllm_docker.sh (sync glm52 98cdb67):
- Health timeout configurable via HEALTH_MAX_RETRIES /
  HEALTH_RETRY_INTERVAL_S (default 480x5s=40min; TP=16 compiles 16
  graphs ~60min, old hardcoded 360x10s was too rigid).
- Container name: drop the double-suffix (CONTAINER_NAME no longer
  re-overridden before appending _tpX_dpY).
- Mount /mnt (bench client reads dataset from there).
2026-07-28 16:54:01 +08:00
shishi
6c81183fd7 feat(910c/glm52): 并行配置改为只测 TP=8 和 TP=16,并按TP区分服务参数
config.env: PARALLEL_CONFIGS 默认值从 "2 4"/"4 2"/"8 1" 改为 "8 1"/"16 1"
run_adaptive_concurrency_add16.sh: engine_build_server_args 按 TP 覆盖参数
- TP=8:  gpu_mem_util=0.95, max_model_len=16384,  max_num_seqs=64  (64GB/die KV cache 紧张)
- TP=16: gpu_mem_util=0.92, max_model_len=131072, max_num_seqs=256 (16 die 全用)
可通过 TP8_*/TP16_* 环境变量进一步覆盖
2026-07-28 16:51:14 +08:00
shishi
98cdb67b66 fix(910c/glm52): 修复sglang0.5.2解析兼容性+TP=16设备挂载+health超时
sglang 0.5.2 bench_serving 输出与解析器不兼容,致 add16 c=32 崩溃:
- 缺 total_throughput -> total_tps 恒0,无法检测吞吐增益
- 缺 p95_*(仅p99) -> TTFT SLO 失效
- gain previous<=0 返回 inf -> json.loads(inf) 崩溃

修复:
1. adaptive_concurrency.py: 缺失时从 ttfts/itls 数组补算 p95/p50;
   total_tps 回退 input+output throughput; gain 返回 Infinity
2. parse_backend.py: 同上补算逻辑; 补 from __future__ import annotations
   (py3.9 下 dict|None 语法无法 import)
3. start_vllm_docker.sh: --device davinci0~15 支持 TP=16;
   health 超时可配(默认480x5s=40min,TP=16编译16 graph约60min);
   补驱动挂载+/mnt; 修容器名双后缀
4. run_adaptive_concurrency_add16.sh: --tokenizer 替代 --model;
   TORCH_DEVICE_BACKEND_AUTOLOAD=0; CONTAINER_PYTHON 路径; 导出 ENGINE_TP/DP
5. config.env: 固定 CONTAINER_NAME/DOCKER_IMAGE/GPU_MEM_UTIL
6. TP8_vs_TP16_report.md: TP=8 vs TP=16 手动测速对比报告

验证: TP=8 add16 c=16->c=32 不再崩溃; TP=16 编译完成变 healthy 推理正常
2026-07-28 16:43:05 +08:00
shishi
4197e2738d feat(dsv4): make DSV4-Flash 910C experiment runnable (verified TP4/DP2)
The dsv4_910c_vllm_tp_dp_matrix experiment was a placeholder (wrong
MODEL_PATH, glm52 image default, no DSV4 serve flags, no driver mounts).
Bring it to a working state, validated end-to-end on 910c.1.

config.env:
- MODEL_PATH: /mnt/models/DeepSeek-V4-Flash -> .../DeepSeek-V4-Flash-w8a8-mtp
  (weights downloaded from ModelScope Eco-Tech/DeepSeek-V4-Flash-w8a8-mtp,
  ~280 GiB, 70 shards, verified present and chowned to shishi)
- SERVED_MODEL_NAME: deepseek-v4-flash -> dsv4 (matches vllm-ascend tutorial)
- DOCKER_IMAGE: vllm-ascend:v0.23.0rc1-a3-openeuler ->
  quay.io/ascend/vllm-ascend:v0.23.0rc1-a3-openeuler (full tag, present locally;
  the glm5.2-a3 image carries GLM-specific patches and is NOT DSV4-compatible)
- Add DSV4_* serve-flag vars: tokenizer-mode/tool-call-parser/reasoning-parser
  deepseek_v4, quantization ascend, expert-parallel, async-scheduling,
  MTP speculative-config, compilation-config, additional-config, multithread
  model-loader (128 threads for the 280GiB load)
- Rewrite the OOM-boundary comment to reflect actual w8a8 weight size

start_vllm_docker.sh (the main pitfalls vs the glm52 launcher):
- Inject the DSV4_* serve flags (GLM-5.2 needs none of them); without them
  vllm rejects the model / lacks MTP
- Mount host driver libs (driver/lib64, dcmi, hccn_tool, npu-smi,
  version.info, ascend_install.info, hccn.conf) -- otherwise the container
  torch_npu fails with libascend_hal.so not found
- Mount all 16 dies via --device /dev/davinci0..15 + davinci_manager/
  devmm_svm/hisi_hdc instead of relying on Ascend Docker Runtime injection
  (ASCEND_VISIBLE_DEVICES-only), which was unreliable on this host
- --privileged --shm-size 512g for the 280GiB weight load
- LD_PRELOAD the openEuler jemalloc path /usr/lib64/libjemalloc.so.2
  (the glm52 ubuntu path /usr/lib/aarch64-linux-gnu/... does not exist here)
- Raise health-wait budget 240x5s -> 360x10s (DSV4 load+compile ~8min)
- DRY_RUN mode for command preview without launching

Verified: start_vllm_docker.sh 4 2 brings the server up on port 30052 in
~8 min (130s weight load per die, 29s compile, 187s engine init); chat
completion returns correctly, system_fingerprint vllm-0.23.0-tp4-dp2-ep.
2026-07-28 16:36:53 +08:00
shishi
46e79d63e7 feat(platform): add Ascend 910C NPU platform support
- platforms/ascend_910c.env: 8-card 910C config (16 dies, 64GB HBM/die),
  Ascend Docker Runtime, ASCEND_VISIBLE_DEVICES device selection
- scripts/common/platform.sh: auto-detect 910C via npu-smi + Huawei PCI IDs
- scripts/common/npu_smi_sampler.py: standalone npu-smi -> nvidia-smi CSV
  sampler so parse_backend.py needs no changes
- experiments/910c/glm52_910c_vllm_tp_dp_matrix/: GLM-5.2 (w4a8c8) experiment,
  model present on host, ready for smoke after image load
- experiments/910c/dsv4_910c_vllm_tp_dp_matrix/: DSV4-Flash experiment
  (placeholder MODEL_PATH, weights not yet downloaded)
- envs/ASCEND_910C_ENV_SETUP.md: full onboarding guide (permissions, image
  load, Ascend Docker Runtime, NPU monitor, known pitfalls)
- Both experiments: TP2/DP4 + TP4/DP2 + TP8/DP1, matrix.json capped at 128K
  context per 64GB HBM/die
2026-07-27 22:00:05 +08:00
d13f61f7b8 Add vLLM TP×DP matrix benchmarking scripts and Docker support
- Introduced `run_adaptive_concurrency_add16.sh` for adaptive concurrency testing with vLLM.
- Added `run_bench.sh` to execute TP×DP matrix benchmarks for Hy3-FP8 on vLLM.
- Created `start_vllm_docker.sh` to launch the vLLM server in a Docker container for specified TP and DP configurations.
- Implemented `start_vllm_dp.sh` to manage starting the vLLM server, defaulting to Docker unless specified otherwise.
- Enhanced logging and health check mechanisms for server readiness.
- Included GPU monitoring and OOM detection in benchmarking scripts.
2026-07-23 02:06:47 +00:00
yy-fighting
3b0297516e fix: replace 5 buggy parse_results.py (raw_requests bloat) with shared parse_backend.py wrapper 2026-07-22 03:47:22 +00:00
Quantong Qiu
aee25d4088 feat(pro6000): add qwen3_235b_pro6000_sglang_tp8 experiment (code + README + report.md) 2026-07-21 23:54:19 +08:00
yy-fighting
31a21631b8 fix(parse_results): 不再把 raw_requests 嵌入 results.json,避免 8.5MB 膨胀
parse_jsonl 当 raw 文件是单个聚合 JSON 对象时返回 [data](整个聚合含
itls/generated_texts 数组),原代码把它当 raw_requests[:100] 塞进 scenario,
导致单次 bench 的 results.json 膨胀到 12.5MB(itls 6.95MB + generated_texts 1.54MB)。
而真正有用的聚合百分位已在 latencies 字段(~0.5KB),逐请求原始数据已在
raw_outputs/*.jsonl,raw_requests 字段纯冗余。

- 移除 scenario dict 的 raw_requests 字段; parse_jsonl 返回值改用 _ 接收
- 符合 BENCHMARK_WORKFLOW.md: 产生大量请求时逐请求数据存 raw_outputs, results.json 只留聚合百分位
- 实测 qwen3_235b results.json: 12.52MB -> ~KB
- 同步修改 4 份相同 md5 的 parse_results.py(本提交含 3 份 tracked; qwen3_8b 未跟踪待随实验提交)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 10:05:31 +00:00
yy-fighting
080e095ece chore(repo): 瘦身规范 - 忽略编译产物/JIT缓存/raw_outputs,取消跟踪618个垃圾文件
- .gitignore 新增规范:实验目录只提交 代码 + report.md + results.json(小体量汇总)
- 忽略: *.o/*.so/*.ninja*/*.cubin, sglang_sm120_cache/, vllm_sm120_cache/,
  *_sm120_cache/, experiments/**/runtime/, bench-output/, experiments/**/raw_outputs/
- 修正原 experiments/*/runtime/ 规则过窄(只匹配一层) -> experiments/**/runtime/
- git rm --cached 取消跟踪 618 个已入库的缓存/产物/原始日志(文件保留在本地工作区)
- 当前 HEAD 减少约 83MB 跟踪体积; 历史体积需另做 filter-branch 重写(本次不做)
- results.json 保留(28个共0.99MB, compare.py/文档依赖)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 09:46:46 +00:00
Quantong Qiu
8c737b840b [Feat] use nightly SGLang FlashInfer MoE 2026-07-21 15:22:47 +08:00
Quantong Qiu
d0319504e4 !16 feat(p800): add Qwen3-235B-A22B SGLang TP=8 benchmark experiment
Merge pull request !16 from Zhiyi Hong/auto/main/11665927/214b0db4-1
2026-07-21 06:58:53 +00:00
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
Quantong Qiu
83f5ea2197 [Fix] skip longer contexts after C1 OOM 2026-07-21 14:19:38 +08:00
Quantong Qiu
f263695e1b Merge branch 'main' of gitee.com:yy-fighting/sskj into auto/main/11665927/9c484989-1
Signed-off-by: Quantong Qiu <q_qtang@163.com>
2026-07-21 05:30:44 +00:00
Quantong Qiu
5e864d2393 !13 [Feat] apply validated deployment capacity caps
Merge pull request !13 from Zhiyi Hong/auto/main/11665927/494ca4a8-1
2026-07-21 05:26:41 +00:00
Quantong Qiu
7d79a1a7ec !12 6000D Results
Merge pull request !12 from Zhiyi Hong/auto/main/11665927/b544d0ba-1
2026-07-21 05:25:41 +00:00
Quantong Qiu
0c2256ca1c [Feat] add 6000D DSV4 tiny adaptive benchmarks 2026-07-21 11:54:04 +08:00
Quantong Qiu
db16057962 [Feat] apply validated deployment capacity caps 2026-07-21 11:50:23 +08:00
Quantong Qiu
db25bc7e5f 6000D Results 2026-07-21 11:14:14 +08:00
yy
41a3ff0a6b feat(p800): enable operator-level timing in profiling experiment
Wire the timing module into the dsv4_p800_sglang_profile
experiment's server startup so benchmarks produce per-operator
Prefill/Decode breakdowns alongside the existing aggregate metrics.

Changes to start_sglang_docker.sh:
- Mount p800_timing.py into the container site-packages (read-only)
  via PATCH_ROOT so the path resolves correctly on any host.
- Set SGLANG_TIMING_ENABLED=1 in the container env to activate
  the monkey-patches loaded by sitecustomize.
- Prepend import p800_timing to the launch_server python -c
  entrypoint so the polling thread starts before model loading.

Combined with the previous two commits, a single run of
run_profile.sh now emits /tmp/p800_timing_results_{pid}.json
per TP worker with layer/attention/moe/hc/rmsnorm timing split
by prefill and decode.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 02:02:50 +00:00
iiGray
2f15d09877 update 2026-07-20 15:21:35 +00:00
iiGray
3f50608aa7 update VLLM + GLM + H20 2026-07-20 15:13:09 +00:00
iiGray
866af70760 add VLLM + H20 + GLM 2026-07-20 14:16:44 +00:00
Quantong Qiu
105267b1b8 fix(h20): capture decode graphs through batch 128 2026-07-20 17:56:58 +08:00
Quantong Qiu
359df6a7b6 refactor(paths): derive repository files from root 2026-07-20 17:33:51 +08:00
Quantong Qiu
f0c93a7d72 !3 feat: add P800 vs H20 diagnosis plan for performance gap analysis
Merge pull request !3 from Zhiyi Hong/auto/main/11665927/d2449eb9-1
2026-07-20 08:11:18 +00:00
Quantong Qiu
8562c26524 fix(sglang): cap SM120 CUDA graph prefill 2026-07-20 16:06:09 +08:00
yy-fighting
0afd552ad3 feat: add P800 vs H20 diagnosis plan for performance gap analysis 2026-07-20 05:30:29 +00:00
yy-fighting
a7e2037471 feat(p800): add sglang profiling experiment with PROFILE_REPORT
- New experiment: dsv4_p800_sglang_profile for PyTorch profiler testing
- Documents XPU cuptiActivityDisable bug (error 17) when saving traces
- Includes benchmark results (ISL=4k, OSL=1k, C=16, TP8/DP1)
- PROFILE_REPORT.md with full analysis of P800 vs H20 performance gap
- Add dsv4_p800_sglang_tp_dp_official experiment config
2026-07-20 05:30:29 +00:00
Quantong Qiu
5ffbd0a21a fix(bench): use default limits and back off after OOM 2026-07-20 11:48:10 +08:00
SSKJ Dev
ceb1170969 Add adaptive results and configuration files for sglang experiment
- Created adaptive_summary.md to summarize adaptive concurrency search results, including metrics such as TP, DP, and TPS.
- Added run_manifest.json to document experiment configuration details, including hardware specifications and search parameters.
- Introduced shapes.tsv to define input and output lengths for various configurations in the adaptive experiment.
2026-07-19 04:03:47 +00:00
Quantong Qiu
958c5778f0 Add new kernels and autotune configurations for DeepseekV4 model
- Introduced a new CUDA kernel for transposing and packing FP32 into UE8.
- Added binary file for the new kernel.
- Created multiple autotune configuration files for version 0.6.14 of FlashInfer, supporting various input shapes and configurations.
- Added model information JSON for DeepseekV4ForCausalLM, detailing its architecture and capabilities.
2026-07-18 10:31:24 +08:00
Quantong Qiu
8beed2411f update 8k and 32k 2026-07-17 16:47:25 +08:00
yy-fighting
b3ead2cb77 untrack tp*_dp* outputs again; fix gitignore pattern (add platform/experiment level) 2026-07-17 07:13:48 +00:00
yy-fighting
3b1539d446 fix over-corrected scripts/common paths (4 levels -> 3) in 12 scripts 2026-07-17 07:09:40 +00:00
yy-fighting
b01640aa20 commit only aggregated adaptive results; untrack tp*_dp* raw outputs and metrics
- keep adaptive_points/shapes/summary jsonl+md, run_manifest.json, shapes.tsv
- untrack tp*_dp*/ subdirs (raw_outputs, metrics, logs, gpu_logs) and ignore them in .gitignore
- update NEW_PLATFORM_GUIDE commit convention accordingly
2026-07-17 06:28:55 +00:00
yy-fighting
8652a685e6 rewrite README, add new platform onboarding guide, fix broken scripts/common paths
- rewrite README with project purpose, standard workflow, corrected index
- add docs/NEW_PLATFORM_GUIDE.md (new GPU onboarding SOP, GLM5.2 reuse)
- fix ../../scripts/common -> ../../../scripts/common in 42 experiment scripts
- refresh stale docs (EXPERIMENT_GUIDE, H200_QUICKSTART, ADAPTIVE_CONCURRENCY_USAGE, BENCHMARK_WORKFLOW)
- remove dead code (dp_proxy.py) and .bak leftovers
- add p800 adaptive results (tp4_dp2/tp8_dp1 metrics + summary)
- gitignore envs/charts and .tmp_charts
2026-07-17 06:18:05 +00:00
SSKJ Dev
90f0257ae0 update result 2026-07-17 02:19:22 +00:00
SSKJ Dev
ff218bdeb3 enable TTFT group skip for all add16 benchmarks 2026-07-17 02:04:05 +00:00
SSKJ Dev
0591c401ab update stop method 2026-07-16 13:02:29 +00:00
SSKJ Dev
589d3b079d enable initial backoff for all add16 benchmarks 2026-07-16 09:05:37 +00:00
SSKJ Dev
c2a3024a1b update SEARCH_INITIAL_BACKOFF_CONCURRENCIES 2026-07-16 08:58:31 +00:00
yy-fighting
58ed6ea633 fix P800 bench_serving P95 2026-07-16 07:49:32 +00:00
yy-fighting
136fc80a38 Merge branch 'main' of https://gitee.com/yy-fighting/sskj 2026-07-16 06:49:52 +00:00
yy-fighting
0fdd3749c7 Add P800 sglang TP/DP matrix experiment
- New experiments/p800/dsv4_p800_sglang_tp_dp_matrix: TP8/DP1, TP4/DP2,
  TP2/DP4 matrix with smoke results; TP2/DP4 documents the weight-loading
  OOM root cause (274 GiB INT8 weights sharded only across TP group).
- Launch args drop --ep-size/--chunked-prefill-size/--max-prefill-tokens/
  --max-running-requests; experts fall back to TP sharding.
- Move dsv4_p800_256k_4k_probe under experiments/p800/.
- scripts/common: jq-free parsing fixes in adaptive_bench_lib.sh and
  parse_backend.py.
- .gitignore: cover raw_outputs under nested platform experiment layout.
2026-07-16 06:49:21 +00:00
SSKJ Dev
20cb4e35c2 update 2026-07-16 06:25:00 +00:00
yy-fighting
8f89cf6dc2 Merge branch 'main' of https://gitee.com/yy-fighting/sskj 2026-07-16 05:18:58 +00:00
SSKJ Dev
dcb8cd2131 feat(adaptive): add TTFT SLO early-stop and fix relative paths for h20 experiments
- Add TTFT_SLO_MS and ENABLE_TTFT_SLO_STOP config to adaptive search
- Stop searching current shape when TTFT P95 exceeds SLO (default 3000ms)
- Fix relative paths in h20 scripts: ../../scripts/common -> ../../../scripts/common
- Update compare.py default TTFT limit to 4000ms
2026-07-16 05:15:51 +00:00
yy-fighting
18ded8e15d Merge branch 'main' of https://gitee.com/yy-fighting/sskj
# Conflicts:
#	experiments/dsv4_p800_long_context_matrix/README.md
#	experiments/dsv4_p800_long_context_matrix/config.env
#	experiments/dsv4_p800_long_context_matrix/run_bench.sh
2026-07-16 05:13:38 +00:00