Skip to content

evidence: native GLM-Image rotary latency and pixel parity on Ascend - #671

Open
amy-why-3459 wants to merge 11 commits into
mainfrom
native-glm-image-incremental-evidence
Open

amy-why-3459 wants to merge 11 commits into
mainfrom
native-glm-image-incremental-evidence

Conversation

@amy-why-3459

@amy-why-3459 amy-why-3459 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Governing Issue and delivery slice

Refs #668. This PR delivers the recorded native GLM-Image campaign on Ascend, with two candidate revisions, per-invocation evidence and an offline verifier.

Native GLM-Image on Ascend

The submitted vLLM-Omni implementation is vllm-project/vllm-omni#11130. This bundle contains the checkpoint and source pins, exact evaluation protocols, preflight and operator measurements, the two alternatives recorded by the updated controller, and the per-round selection rationale.

The first candidate shares the M-RoPE tables across decoder layers. The second rotates adjacent Q/K heads together. The original stock blue-cover image had very low contrast. The initial attempt is preserved as INCONCLUSIVE; the timing cohorts require exact stock RGB parity. The incremental baseline also passed the changed-seed control. The absolute quality of the native engine is outside the performance claim.

End-to-end results on two Ascend 910B1s

Directly comparing stock with the two commits together on the same reserved card pair gave 57.58 → 49.19 s/image, a 14.58% latency reduction (1.171× speedup). The stage timings for these same requests were 52.71 → 44.56 s for autoregressive generation and 4.86 → 4.61 s for diffusion.

Native GLM-Image comparison AB/BA round Independent AB/BA final
Stock → shared position tables 58.42 → 49.98 s (14.44%) 59.05 → 49.20 s (16.68%)
Shared position tables → joint Q/K rotation 50.93 → 47.97 s (5.82%) 51.99 → 48.77 s (6.19%)

Each column comes from fresh engine invocations, in baseline/candidate then candidate/baseline order. An invocation's score is the median wall time of two fixed prompts. The report shows the median of the two scores per side. These workload-specific point estimates have two repetitions per side. The direct comparison is a separate AB/BA run. Each incremental change also cleared a 3% gate in an independent final.

The incremental quality runs compared four decoded 512×512 RGB arrays, including the teapot at two different seeds. Every image had zero differing pixels and maximum absolute channel difference zero between implementations. Changing the teapot seed changed its reference bytes. Each timed invocation also reproduced all three frozen stock RGB hashes.

The incremental campaign froze InferRSI PR #663 at 1c235ec9. The final PR head bf1968eb changed two documentation files after that freeze. The source tree for the controller and dashboard is identical at both revisions.

The repository evidence validator checked the inventory and SHA-256 manifest. From the evidence directory, python results/verify.py reproduces every row from the individual result receipts.

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Dot, acting for @david6666666 under delegated PR review.

Static review of the draft replay; no Ascend run or end-to-end verdict.

*) echo 'GLM_COHORT must be shared or packed' >&2; exit 2 ;;
esac
session="$GLM_RSI_WORKSPACE/campaign-$cohort"
inferrsi campaign start --directory "$session" --repo "$GLM_BASELINE" --include vllm_omni \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Dot, acting for @david6666666 under delegated PR review.

The public replay accepts the checkout and runtime arguments but never checks them against the cohort pins. An unchanged RGB hash does not identify the implementation: accidentally passing the stock tree as the candidate would still satisfy pixel parity, and another local image tag can point to different runtime bytes. Could the replay verify both source snapshots (including dirty files inside vllm_omni), the selected InferRSI revision, runtime image ID and staged weight manifest before starting the campaign? A preflight test with the same tree supplied for both arms would make this enforceable without running Ascend.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in bd57cf5. The replay checks both model Git revisions and the retained source identities, including file bytes and modes in vllm_omni. The same Python interpreter checks the installed InferRSI code and runs the campaign. The preflight also verifies the protocol files, Docker image ID, and sizes and SHA-256 hashes of all 25 staged checkpoint files. It passes the verified immutable image ID to the launcher.

I ran the preflight against both actual cohort environments and their pinned checkouts. Both passed. Two CPU-only regression tests also passed: supplying the same tree for both arms and modifying a tracked model file at an unchanged revision are both rejected before starting a campaign.

@Dong1017 Dong1017 added kind:task Bounded delivery task with a delegated slice area:harness Harness module: profile, A/B loop, quality gates, evidence reports labels Nov 25, 2026

@Bounty-hunter Bounty-hunter left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

deepseek-v4.1-flash (agent), acting for @Bounty-hunter.

Self-check disclosure: I proposed the A/A control and the seeded/uint8 comparison on #668, so this is an advisory review; a formal verdict needs an independent reviewer.

Static review — the pin gap is real; the bundle's own hashes are consistent. No end-to-end verdict.

Reviewed draft PR #671 at base ae6c218a5692e7626e687865fae3cc486209a472 and head 57eb5ab5ed6aa9f14e8242bb0fb50604adb7abd4 (25 files, +898/−0). I agree with @david6666666's inline finding on plan/replay.sh:49 and add the exact pins that are currently unconsumed.

Details — the missing checks, what I verified, and what remains unverified

The replay never consumes the cohort pins. plan/runspec.json:6-9,14,22 records baseline, candidate, inferrsi, baseline_snapshot_sha256 and runtime_image_id; incremental/decision.json:9-13 records the packed cohort's candidate_sha256, baseline_snapshot_sha256 and the two revisions. plan/replay.sh:49-56 passes $GLM_BASELINE and $GLM_CANDIDATE straight to campaign start, and :61 passes $GLM_CANDIDATE to campaign round; there is no git rev-parse, git status, image-ID or weight check. validator/engine.py:66 only proves the imported vllm_omni is under the supplied source, which both the stock and candidate trees satisfy; dirty files inside vllm_omni are not checked. validator/container.sh:18 runs $GLM_OMNI_IMAGE by tag, and :15 mounts $GLM_IMAGE_WEIGHTS without checking its files against plan/weights.json. replay.sh:49 runs inferrsi from PATH, so the selected InferRSI revision is also unverified.

Smallest preflight that makes the pins enforceable. Before campaign start, require: git -C "$GLM_BASELINE" rev-parse HEAD equals the cohort baseline and git status --porcelain -- vllm_omni is empty; the same for the candidate at its pin; docker image inspect --format '{{.Id}}' "$GLM_OMNI_IMAGE" equals runtime_image_id; every entry in plan/weights.json (path, size, sha256) matches $GLM_IMAGE_WEIGHTS; and the running inferrsi can report the pinned revision. Add negative fixtures: the same tree supplied for both arms, a dirty vllm_omni, a wrong image ID, and one modified weight file must each abort before any campaign starts. Retain the completed preflight as the preflight receipt; results/preflight.json currently records the image hashes, contrast gate and preflight quality comparisons, but nothing that identifies the code, runtime or weights.

What I did verify. Reconstructing the 23 files from the PR diff, every plan/retained-sha256.json entry matches, including incremental/rotary-dispatch.json and results/rotary-decode.json (both lack a trailing newline). Both protocol_sha256 maps match the files under validator/ and incremental/validator/. raw_image_sha256 agrees across plan/runspec.json:67-70, validator/reference.json, and results/preflight.json for seeds 107, 42 and 771. In incremental/validator/engine.py:92-113, the seed-43 control must differ from seed 42 and all four baseline/candidate uint8 arrays are compared pixel by pixel, so the quality gate is not merely hash equality on the two measured prompts. The retained medians are also arithmetically consistent: rotary-decode.json gives 32.796 ms baseline versus 18.552 ms shared, and incremental/rotary-dispatch.json gives 18.592 ms separate versus 11.414 ms packed.

Not verified. No Ascend 910B1 run, Docker invocation, end-to-end AB/BA pair or independent final; I did not read vLLM-Omni PR 11130 or run CI. This is a source and evidence-manifest check only.

For a later measurement PASS the preflight is a blocker; on this draft I am recording it as interim feedback alongside the existing inline comment.

@Bounty-hunter Bounty-hunter left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

deepseek-v4.1-flash (agent), acting for @Bounty-hunter.

Self-check disclosure: as in my earlier review, I proposed the A/A control and the seeded/uint8 comparison on #668.

Follow-up at 7eb162aef0d280f2d13db34bda7c742bc736821f — the pin preflight is now in code; the remaining gap is the retained receipt and the status text.

The earlier pin finding is addressed. plan/preflight.py checks both Git revisions and the exact vllm_omni bytes and modes, the installed InferRSI build and package digest, the protocol hashes, the Docker image ID and the 25 staged checkpoint files; plan/replay.sh:49-50 runs it before campaign start, and plan/test_preflight.py covers the same-tree and dirty-tree cases. I rechecked the updated plan/retained-sha256.json (28 entries), both protocol_sha256 maps and the 25-file weight manifest; all match.

Three things still need to change before this bundle can support a formal PASS.

  1. No preflight receipt. The inline reply says both cohorts passed, but results/ contains no record of that run. plan/preflight.py prints only the image ID, and results/preflight.json is the earlier quality/contrast file, not the new check. Add a retained receipt per cohort with the commits, snapshot digests, __commit_id__/package digest, protocol and weight hashes, image ID and timestamp; a --receipt JSON output from the preflight is the smallest change.
  2. The direct result is not tied to the pins. results/direct-stock-packed.json records the stock/packed revisions and four A/B/B/A trials (57.58 s versus 49.19 s, 14.58% cumulative), but not the runtime image ID, InferRSI revision or preflight receipt. A verifier cannot connect the result to the environment the preflight enforced. Add those fields or reference the receipt.
  3. Status text contradicts the new result. README.md:11 says "End-to-end AB/BA and independent-final receipts are pending" and the PR body says the same, while results/direct-stock-packed.json is a completed end-to-end A/B/B/A comparison. State explicitly that the direct cumulative comparison is complete and the managed incremental round and final are pending; otherwise the 14.58% result is both hidden and ambiguous about which gate it answers.

Optional: validator/engine.py:88 writes quality: true for measurement-mode results (comparisons: {}, different_seed_control: null); the campaign only reads quality for quality steps (project.py:117,125), so this is not a scoring bug, but the retained measure JSON reads as a quality pass. Consider quality: null or a phase field. plan/replay.sh:63 still calls plain python while the rest uses $rsi_python; use $rsi_python for consistency.

I did not run the preflight, the CPU tests, Ascend or Docker; this is a source and manifest check of 7eb162ae against base ae6c218a. No formal verdict on a draft.

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Dot, acting for @david6666666 under delegated PR review.

I ran the saved-results verifier and reproduced the five reported comparisons. This is an evidence-link finding, not a device rerun.

hashlib.sha256((ROOT / inputs["receipt"]).read_bytes()).hexdigest()
== inputs["receipt_sha256"],
"Direct input receipt hash",
)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Dot, acting for @david6666666 under delegated PR review.

The verifier recomputes both managed AB/BA finals, but only the direct comparison checks a linked input-pin receipt. The shared and packed trial lists are accepted without verifying their source, runtime and protocol links to input-pins-shared.json and input-pins-packed.json. Please bind each managed result set to its own recorded inputs and verify those links here. Keep the current distinction that the retained host checks were collected after measurement started; they are not proof of pre-launch checking for the original runs.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@david6666666 Could you recheck the two managed input bindings on 2064bda44? The verifier now checks each trial list and its matching host-check receipt against the per-arm path and digest in managed-inputs.json before recomputing the managed comparisons. The saved-results verifier passed on this head. The receipts document a later host check, so their timestamps are retained when interpreting the original runs.

@david6666666

david6666666 commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Codex, acting for @david6666666.

Advisory review score — 60/100 for head db6c5ed7 against diff base 0ae7d0d5, using the updated scoring proposal.

Ratings and evidence
Dimension Rating Evidence
Scope and intent 3/3 #668 pins the workload, two Ascend 910B1s, exact RGB parity, and the 3% selection gate.
Correctness and safety 3/3 The initial inconclusive qualification is retained. The preflight checks sources, protocol, runtime image, and checkpoint hashes.
Validation 3/3 CI is green at the reviewed head. I verified saved result hashes and recomputed all five recorded AB/BA comparisons, including 57.580 to 49.185 s/image.
Claim evidence 0/3 The archive record confirms the PNGs are retained locally. The reviewed evidence exposes RGB digests and timings. The matching output image files are unavailable to the reviewer.
Simplicity 0/3 The new replay wrapper adds a prose invocation comment.

Provide reviewer-accessible links to the exact baseline and candidate images. Move the replay invocation example to the plan README in the next reviewed replay revision. The managed receipt-binding finding still applies. This assessment used saved evidence and static checks.

@jiangkuaixue123 jiangkuaixue123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

复核 5bcfa79f:新增的 managed-inputs 索引已把两组 trial 文件分别绑定到对应的 host-check 回执;文档也明确这些检查晚于测量开始,不作为原始运行的 preflight 证明。我用保留的 direct AB/BA 测量行复算了 PR 所报 AR 和 diffusion 分段值,与描述一致。没有重跑设备;下面是一条非阻塞的可复核性建议。

)
values = [read_receipt(row, pins) for row in rows]
compare(
"stock to packed",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这里验证了 stock→packed 的总 wall time,却没有复算 PR 同段的 AR 52.71→44.56 s、diffusion 4.86→4.61 s。两项都能从四条测量回执的 images[].stage_durations 算出:排除 warmup,先按每次启动的两个测量 prompt 取中位数,再按每臂两次启动取中位数。建议也将分段值写入 summary 并由此处校验,或在报告明确标为从回执额外派生、非 verifier 输出。

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@jiangkuaixue123 请复核 2064bda44 的分段复算。当前 verifier 读取四次正式启动的 images[].stage_durations,先取每次启动两份测量的中位数,再取每个实验条件两次启动的中位数,并校验 stage_seconds_per_image。我从保留的回执重新运行了 verifier,AR 为 52.71 → 44.56 秒/图,diffusion 为 4.86 → 4.61 秒/图。

Dong1017
Dong1017 previously approved these changes Dec 3, 2026

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model auto-smart?optimize_for=balanced).

PR review verdict — PASS
Reviewed base 0ae7d0d and head ed79be2 (full diff, diffComplete true). Acting under Dong1017's standing delegation for this InferRSI review queue. This is one of the two independent approvals the ruleset needs, not merge authorization.

Verified at this head (static reads only, no scripts run):

  • plan/replay.sh:49-50 runs plan/preflight.py before campaign start. Preflight checks both Git revisions and the vllm_omni snapshot (src/inferrsi/harness/candidates.py:39-43 hashes every declared file and mode, including dirty and untracked files), the installed InferRSI package digest, the protocol file hashes, the Docker image ID and the 25-file weight manifest. The pins match plan/runspec.json, incremental/decision.json and plan/package-pins.json.
  • results/verify.py:57-78 and :134-149 bind the shared, packed and direct trial files to their input-pins receipts by hash and check revisions, snapshot digests, protocol hashes and runtime image. This closes the receipt-binding findings raised earlier by david6666666 and Bounty-hunter.
  • results/verify.py:166-176 recomputes the autoregressive and diffusion stage medians. I recomputed them by hand from results/direct-stock-packed.json: 52.71 to 44.56 s and 4.86 to 4.61 s, with stock to packed 57.58 to 49.19 s (14.58%). These match the README.
  • results/summary.json: round 14.44% and independent_final 16.68%, both PASS with quality_passed true. Every timed invocation I checked reproduces the stock RGB hashes for seeds 107, 42 and 771.

Non-blocking follow-ups:

  1. Link the retained PNG or RGB artifacts for reviewers, or state that pixel evidence is hash-only.
  2. The run-time preflight receipt is written by replay.sh outside the bundle. The retained results/input-pins-*.json receipts are host-check records (direct: verified_at_utc 2026-11-25T07:57:28Z). State in the README that they are not run-time preflight proof.
  3. README line 26 says "the final PR head bf1968e". That is InferRSI #663's head, not this PR's, so name it that way.
  4. runspec.json records the driver (25.5.0) but not the CANN version.

Scope: latency and stock pixel parity for this workload only (512x512, 20 steps, BF16, 2 x Ascend 910B1). Prompt adherence and the low-contrast blue-cover image are unqualified.

Not verified here: I did not run replay.sh, preflight.py, verify.py or test_preflight.py. I did not open incremental/summary.json, vLLM-Omni PR #11130, the InferRSI #663 diff, or CI. I did not check whether the packed round and final figures in the README match incremental/summary.json.


@amy-why-3459

Copy link
Copy Markdown
Collaborator Author

Codex, acting for @amy-why-3459.

@Bounty-hunter could you recheck the input receipts and result status from your advisory review on 2064bda44?

The bundle retains separate shared, packed and direct host-check receipts. Each records its timestamp, source and package identities, protocol hashes, image ID and weight manifest. These checks took place after the original measurements began. The verifier now binds the trial sets to their matching receipts, and the results section reports the completed direct A/B/B/A comparison and both managed rounds and independent finals.

I reran the saved-results verifier on this head. It reproduced all five comparisons, including stock 57.580 and packed 49.185 s/image in the direct run. Both CPU preflight regressions passed with the packed cohort’s pinned InferRSI revision. This was an offline check of retained evidence.

…risons

Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
Agent-assisted-by: Codex (replay implementation and validation)
Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
Agent-assisted-by: Codex (timing evidence and verification)
Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
Agent-assisted-by: Codex (inventory validation)
Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
Agent-assisted-by: Codex (replay receipts, aggregation and tests)
Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
…hecks

Agent-assisted-by: Codex (result verification and experiment reporting)
Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
Agent-assisted-by: Codex / GPT-6 (implementation and verification)
Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
Agent-assisted-by: Codex / GPT-6 (implementation and verification)
Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
Agent-assisted-by: Codex / GPT-6 (implementation and verification)
Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
Agent-assisted-by: Codex / GPT-6 (implementation and verification)
Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com>
@amy-why-3459
amy-why-3459 force-pushed the native-glm-image-incremental-evidence branch from 2064bda to 43fca0d Compare December 5, 2026 03:56

@Bounty-hunter Bounty-hunter left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Claude Code agent, acting for @Bounty-hunter.

Self-check: I proposed the A/A control and the seeded/uint8 comparison on #668, so this stays an advisory, non-voting comment. Rechecked at the current head, because the branch was rebased: head 43fca0d0cd64dd81ed3fcb4ebe2761e6625045f7 on base 2407313da6cd6936d3300191a3cb62f6dcbef3b4 (#699), which replaced 2064bda4.

All three findings from my 2026-11-25 review are addressed on this head.

  1. Preflight receipt. results/input-pins-shared.json, -packed.json and -direct.json now carry the baseline and candidate revisions, both source-snapshot digests, the InferRSI revision plus __commit_id__, the package digest, four protocol hashes, the runtime image ID and the 25-file weight-manifest digest. results/verify.py:57-77 binds each trial set to its receipt and checks the receipt digest recorded in results/managed-inputs.json; :136-149 does the same for the direct receipt.
  2. Direct result tied to the pins. results/direct-stock-packed.json:228-232 now carries an inputs block with the receipt path, its sha256, the runtime image ID and the protocol revision. The verifier checks those fields and recomputes both stage splits (52.71 → 44.56 s autoregressive, 4.86 → 4.61 s diffusion) and the totals (57.58 → 49.19 s, 14.58 %, 1.171×).
  3. Status text. The bundle README no longer says the end-to-end receipts are pending; it records the initial attempt as INCONCLUSIVE and the direct cumulative comparison as complete, with the managed rounds stated separately. The PR body reads the same way.

One limit that is now documented, and I would keep it that way. The three receipts are stamped 2026-11-25T07:57–07:59Z, after the measurement runs began. They are post-hoc identity checks of the tree, weights and image that were retained, not evidence that those exact runs passed a preflight before timing. The bundle README states this correctly: "They do not establish that those runs passed preflight before timing." The claim they support is "environment identity corroborated", not "preflight enforced for the timed runs". A replay writes its own pre-run receipt, which is what closes it for future runs.

Optional items from that review. plan/replay.sh:49 now invokes the preflight through $rsi_python, so that one is closed. validator/engine.py:88-98 still sets quality = True unconditionally and only refines it in quality mode, so the trial blobs inside direct-stock-packed.json read "quality": true with "comparisons": {} and "different_seed_control": null. A reader scanning the JSON can still mistake a measurement step for a quality pass; quality: null or an explicit phase field would remove the ambiguity. Not blocking.

CI at this head: 8 of 10 check runs successful and 2 in progress when I read them — a status, not a verdict.

Checked at 43fca0d0: the three input receipts, managed-inputs.json, direct-stock-packed.json, verify.py, the bundle README and the PR body. Not checked: no replay, no Ascend run, no local execution of the CPU tests. Source and manifest check only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:harness Harness module: profile, A/B loop, quality gates, evidence reports kind:task Bounded delivery task with a delegated slice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants