Skip to content

feat: SPEED-Bench and GreenSpec arms on aiperf - #42

Open
Noridom1 wants to merge 8 commits into
vng-benchmarkfrom
feat/greenspec-aiperf
Open

Noridom1 wants to merge 8 commits into
vng-benchmarkfrom
feat/greenspec-aiperf

Conversation

@Noridom1

@Noridom1 Noridom1 commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Five commits on top of vng-benchmark (fast-forward, no conflicts):

  • 02920960 feat(speedbench): shared SPEED-Bench client on aiperf. Adds run_speedbench_aiperf / resolve_speedbench_dataset to benchmark_lib.sh. infx.bench_serving.speedbench_aiperf maps the aiperf export onto the benchmark_serving result keys and adds acceptance length from the vllm:spec_decode_* counters. Adds an optional SPEEDBENCH_HF_TOKEN secret.

  • 4f0bd067 feat(greenspec): GreenSpec arm on aiperf. run_greenspec_aiperf benchmarks one GreenSpec subset (internal prod-traffic spec-decode bench). It uses the aiperf greenspec_* preset when available, else a raw_payload file. The dataset comes from a private HF repo pinned by commit and checked against SHA256SUMS. A guard runs before any upload:

    • keeps only an allowlist of result files;
    • strips error messages from the aiperf export;
    • withholds the server log;
    • fails on any dataset row id or any oversized file.

    Adds an optional GREENSPEC_HF_TOKEN secret.

  • 60c5a2fe fix(greenspec): no preset for a lite bucket selection. Bucket presets cover the full bucket, so GREENSPEC_BUCKET with GREENSPEC_LITE=1 now runs through raw_payload instead of sending the first N rows of the full bucket.

  • 0c6498ac docs(greenspec): GreenSpec procedures. New docs/greenspec-procedures.md (flow, prerequisites, selection, adding a cell, dispatch and results, troubleshooting, data-safety rules), linked from docs/index.md and docs/procedures.md. English only for now; the _zh.md pair is not included.

  • 8e8d4343 feat(greenspec): progress lines in the job log. aiperf's console stays off the job log (it can echo server error text). A watcher reads it every GREENSPEC_PROGRESS_INTERVAL seconds (default 60, 0 = off) and prints only the progress-bar numbers, e.g. GreenSpec progress: Profiling 33/64 (52%) elapsed 02:10 eta 02:00. Checked end to end against aiperf-mock-server.

Submodule change

utils/aiperf moves from SemiAnalysisAI/aiperf@faf3f8b to Noridom1/aiperf@8f69bd6f (branch feat/greenspec-loader). That is the same base plus one commit, the GreenSpec loader and presets. Existing aiperf/agentx recipes run on the same code.

Note: faf3f8b (the current pin on vng-benchmark) is not on any branch of SemiAnalysisAI/aiperf; it only lives on a personal fork branch. Before merge, the plan is to:

  1. create a branch on vngcloud/aiperf at faf3f8b;
  2. PR the loader commit there;
  3. point this submodule at vngcloud/aiperf.

Validation

  • utils/test_greenspec_aiperf.py and utils/test_speedbench_aiperf.py pass.
  • CI run https://github.com/vngcloud/InferenceX/actions/runs/40636901474, Gemma 4 31B FP8 on hardware-hcm, TP1, c8, GreenSpec agentic_tools lite. It ran from the bench branch, which adds a test recipe on top of this PR.
    • Both cells passed: 256/256 requests each, no errors. Each GreenSpec artifact holds only the 5 allowlisted files.

      Metric Base MTP MTP vs base
      Output throughput (tok/s) 52.3 74.1 1.42×
      Total token throughput (tok/s) 4259 5524 1.30×
      TPOT median / mean (ms) 107.1 / 123.1 71.8 / 88.0 1.49× / 1.40×
      TTFT median (ms) 2459 3442 0.71×
      E2E latency median (ms) 21467 15969 1.34×
      Acceptance length / rate n/a 3.85 / 0.71

      No ignore_eos, so output lengths differ between arms (82k vs 90k tokens). Compare TPOT and throughput, not duration. ITL is per chunk and is not comparable under MTP.

  • A direct Slurm smoke with the same recipe passed both arms (base and MTP).

Not in this PR

  • The hardware-hcm Slurm account fix (27185633, SLURM_ACCOUNT="greennode") is still needed on vng-benchmark. The CI run above used it via the bench branch.
  • The Gemma 4 GreenSpec recipe stays on bench/gemma4-greenspec-hcm.

phucnlt2 and others added 2 commits October 28, 2026 10:55
Add run_speedbench_aiperf and resolve_speedbench_dataset to
benchmark_lib.sh. The pinned utils/aiperf speed_bench_* loaders read the
prepared SPEED-Bench snapshot (Noridom1/speed-bench-prepared@6e5c3a81,
SHA256-checked, cache first); infx.bench_serving.speedbench_aiperf maps the
aiperf export onto the benchmark_serving result keys and attaches acceptance
length from the vllm:spec_decode_* counters, so SPEED-Bench arms use the
normal fixed-seq-len process_result/collect path.

Wire an optional SPEEDBENCH_HF_TOKEN secret (benchmark-tmpl callers only,
forwarded by launch_h200-greennode.sh; falls back to HF_TOKEN) and upload
results/speedbench_aiperf as its own artifact.

在 benchmark_lib.sh 中新增 run_speedbench_aiperf 与
resolve_speedbench_dataset。固定版本 utils/aiperf 的 speed_bench_* loader
读取预处理好的 SPEED-Bench 快照(Noridom1/speed-bench-prepared@6e5c3a81,
校验 SHA256,优先使用缓存);infx.bench_serving.speedbench_aiperf 将 aiperf
导出转换为 benchmark_serving 结果格式,并从 vllm:spec_decode_* 计数器计算
接受长度,使 SPEED-Bench 走标准 fixed-seq-len 处理流程。

新增可选 secret SPEEDBENCH_HF_TOKEN(仅传给 benchmark-tmpl 调用,由
launch_h200-greennode.sh 转发进容器,缺省回退到 HF_TOKEN),并将
results/speedbench_aiperf 作为独立 artifact 上传。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
run_greenspec_aiperf (benchmark_lib.sh) benchmarks one GreenSpec subset with
aiperf: it uses the greenspec_* preset when the installed aiperf has it, else
writes a raw_payload file. The dataset is fetched from a private HF repo pinned
by commit and checked against SHA256SUMS. A guard runs before any upload: it
keeps an allowlist of result files, strips error messages, withholds the server
log, and fails on any row id or oversized file. Workflows gain the greenspec
inputs; the aiperf submodule points at a fork branch with the GreenSpec loader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Thanks for the contribution!

  • Review: If this PR changes files owned by someone other than a repository admin or @SemiAnalysisAI/core, ask one eligible CODEOWNER to complete the latest PR_REVIEW_CHECKLIST.md before contacting a core maintainer on Slack. Follow the template exactly, including As a PR reviewer and CODEOWNER, I have reviewed this and have, so sign-off verification triggers.
  • PR verification: Sweeps only run on labeled PRs. Add full-sweep-fail-fast (strongly recommended); use full-sweep-enabled only when matrix jobs should continue after a failure.
  • After merging: PR authors must ensure all GitHub Actions jobs pass. Transient failures often pass on rerun; see how to rerun failed jobs.
中文

感谢你的贡献!

  • **审阅:**如果 PR 修改的文件归属于仓库管理员及 @SemiAnalysisAI/core 之外的 CODEOWNER,请先联系一位有资格的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,再通过 Slack 联系核心维护者。必须严格遵循模板,并保留 As a PR reviewer and CODEOWNER, I have reviewed this and have,才能触发签核验证。
  • **PR 验证:**扫描仅在带有标签的 PR 上运行。强烈建议添加 full-sweep-fail-fast;仅当需要矩阵任务在失败后继续运行时才使用 full-sweep-enabled。
  • **合并后:**PR 作者必须确保所有 GitHub Actions 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明。

Noridom1 and others added 3 commits October 28, 2026 13:23
Bucket presets cover the full bucket, so a lite bucket selection took the
preset and sent the first N rows of the full bucket instead of its lite
rows. Return no preset there, as for recorded, so it runs through
raw_payload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
How a GreenSpec cell runs, prerequisites, subset selection, adding a
cell, dispatch and results, troubleshooting, and the data-safety rules.
English only for now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aiperf's console stays off the job log because it can echo server error
text, which left long cells with no progress. A watcher now reads that
console every GREENSPEC_PROGRESS_INTERVAL seconds (default 60, 0 = off)
and prints only the numbers of its progress bars:
'GreenSpec progress: Profiling 33/64 (52%) elapsed 02:10 eta 02:00'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Noridom1
Noridom1 marked this pull request as ready for review October 28, 2026 06:42
@Noridom1
Noridom1 requested a balanced review from Copilot October 28, 2026 06:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Noridom1 and others added 3 commits October 28, 2026 14:37
The watcher only reprinted progress-bar numbers from a hidden console log,
and missed aiperf's percent-only Profiling bar. aiperf's console now
streams to the job log through `greenspec_aiperf console`, unbuffered.
The filter drops what can echo server error text: the Error Summary
table (its Message column is the raw server response) becomes one line
of codes and counts, and an ERROR or CRITICAL record keeps only its
timestamp and level. Each progress bar, with or without a total, prints
at most once per GREENSPEC_PROGRESS_INTERVAL seconds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server still holds its log open when the guard runs. Truncating and
writing the stub let later engine writes land after it, behind a hole of
NULs, so the uploaded log was no longer just the stub. Write the stub to
a sibling file and os.replace it, so the server keeps writing to the
unlinked inode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants