Skip to content

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

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

amy-why-3459 wants to merge 8 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.

…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>

@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
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>

@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.

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>

@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.

@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.

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.

4 participants