171 Commits

Author SHA1 Message Date
shishi
cd7b2d4a62 docs(datasets): add README with ShareGPT download instructions
The datasets/ directory is gitignored (large, re-downloadable), but later
agents need to know how to obtain the dataset when it is missing. Add a
tracked README that documents the download steps.

- datasets/README.md: documents the ShareGPT_V3_unfiltered_cleaned_split.json
  source (HF anon8231489123/ShareGPT_Vicuna_unfiltered), the hf-mirror.com
  download command for CN environments, the JSON validity check (94145
  entries), and the container path consistency note.
- .gitignore: change "datasets/" to "datasets/*" so the "!datasets/README.md"
  negation actually works (git cannot re-include a file under a fully-ignored
  directory). The dataset .json stays ignored; only README.md is tracked.
2026-07-28 17:02:19 +08:00
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
c234468cd6 docs: add new-experiment quick start and forbid raw_requests in results.json 2026-07-22 04:08:51 +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
yy-fighting
489c5a5e61 fix(lib.sh): avoid cd side-effect in git_commit/git_dirty and safe JSON in write_metadata_json 2026-07-22 03:44:18 +00:00
yy-fighting
b6dab8e139 build: add pyproject.toml with ruff lint/format config and requirements-dev 2026-07-22 03:41:47 +00:00
yy-fighting
3ba4968971 chore(gitignore): ignore envs venvs and skills-lock.json, keep envs docs 2026-07-22 03:38:52 +00:00
sskj-agent
6286733f3c chore: gitignore dummy_sharegpt.json dataset 2026-07-22 00:22:06 +08: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
Quantong Qiu
059eb2521c !19 fix(parse_results): 不再把 raw_requests 嵌入 results.json,避免 8.5MB 膨胀
Merge pull request !19 from Zhiyi Hong/auto/main/11665927/2a47b692-1
2026-07-21 10:07:16 +00: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
Quantong Qiu
3bd8f60474 !18 chore(repo): 瘦身规范 - 忽略编译产物/JIT缓存/raw_outputs,取消跟踪618个垃圾文件
Merge pull request !18 from Zhiyi Hong/auto/main/11665927/1845919b-1
2026-07-21 09:49: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
7231536db2 !17 [Feat] use nightly SGLang FlashInfer MoE
Merge pull request !17 from Zhiyi Hong/auto/main/11665927/284b6d8c-1
2026-07-21 09:09:44 +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
Quantong Qiu
6087798262 !15 [Fix] skip longer contexts after C1 OOM
Merge pull request !15 from Zhiyi Hong/auto/main/11665927/c343e5be-1
2026-07-21 06:58:33 +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
8e21d8a34f !14 [Feat] add 6000D DSV4 tiny adaptive benchmarks
Merge pull request !14 from Zhiyi Hong/auto/main/11665927/9c484989-1
2026-07-21 05:30:58 +00: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
680f2c31d6 !11 feat(p800): enable operator-level timing in profiling experiment
Merge pull request !11 from yy-fighting/auto/main/13188872/d44301a2-1
2026-07-21 05:24:54 +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
Quantong Qiu
ac5a01dbd0 fix(sglang): cap SM120 CUDA graph prefill 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
yy
bf03201168 feat(p800): auto-load timing module in every TP worker process
sitecustomize.py is imported automatically by Python at startup
in every process, including the SGLang scheduler/TP worker
processes spawned for tensor parallelism. Adding the p800_timing
import here ensures the monkey-patches are applied to all 8 TP
workers, not just the launch_server parent process (which never
runs the model forward and would record empty timing data).

The timing module self-disables unless SGLANG_TIMING_ENABLED=1,
so this import is a no-op when timing is not in use.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 02:02:06 +00:00
yy
f81c647d16 feat(p800): add manual timing module to bypass broken PyTorch Profiler
PyTorch Profiler crashes on P800 XPU due to a CUPTI bug in
cuptiActivityDisable() that SIGKILLs the server process. This
module provides an alternative by monkey-patching SGLang's
DeepSeek-V4 decoder layer and its sub-operators to record
per-op wall-clock timing.

What it does:
- Patches DeepseekV4DecoderLayer.forward and sub-operators
  (hc_pre/hc_post, RMSNorm, MQALayer attention, QKV projection,
  DeepseekV2MoE and its gate/shared/routed experts) with timed
  wrappers that call torch.cuda.synchronize() before and after.
- Distinguishes prefill vs decode via forward_batch flags
  (is_prefill_only / is_extend_in_batch / extend_num_tokens)
  and propagates the phase to sub-operators via threading.local.
- Writes per-PID JSON summaries (count/avg/p50/p95/p99) every
  5000 records plus on atexit/SIGTERM, so data survives when
  the server is stopped.

Usage: set SGLANG_TIMING_ENABLED=1 in the container environment.
Output: /tmp/p800_timing_results_{pid}.json

Known limitations:
- torch.cuda.synchronize() adds overhead, inflating small-op times.
- moe_routed_ms only covers forward_normal (65% of calls); the
  dual_stream path taken during CUDA graph capture is not patched.
- All-reduce patch fails (Communicator import path mismatch).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 02:00:57 +00:00
Quantong Qiu
039a2fa7b9 !10 update
Merge pull request !10 from iiGray/auto/main/16070382/4f447e97-1
2026-07-20 15:23:45 +00:00
iiGray
2f15d09877 update 2026-07-20 15:21:35 +00:00
Quantong Qiu
eaf005845a !9 update VLLM + GLM + H20
Merge pull request !9 from iiGray/auto/main/16070382/c54513b9-1
2026-07-20 15:18:16 +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
a8ed016f1e !6 fix(h20): capture decode graphs through batch 128
Merge pull request !6 from Zhiyi Hong/auto/main/11665927/ab48baba-1
2026-07-20 09:59:34 +00:00
Quantong Qiu
105267b1b8 fix(h20): capture decode graphs through batch 128 2026-07-20 17:56:58 +08:00
Quantong Qiu
ca965b6d26 !5 refactor(paths): derive repository files from root
Merge pull request !5 from Zhiyi Hong/auto/main/11665927/8b450d8d-1
2026-07-20 09:38:55 +00:00
Quantong Qiu
359df6a7b6 refactor(paths): derive repository files from root 2026-07-20 17:33:51 +08:00
Quantong Qiu
580b6c1c56 !2 feat(p800): add sglang profiling experiment with PROFILE_REPORT
Merge pull request !2 from Zhiyi Hong/auto/main/11665927/7d4f729c-1
2026-07-20 08:11:59 +00: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
ac821cf0f5 !4 fix(sglang): cap SM120 CUDA graph prefill
Merge pull request !4 from Zhiyi Hong/auto/main/11665927/7c4aea9d-1
2026-07-20 08:09:16 +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