From e0552e2cc4d91928c48a4c2aa8ba18eacf881b61 Mon Sep 17 00:00:00 2001 From: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> Date: Wed, 25 Nov 2026 14:25:39 +0800 Subject: [PATCH 1/7] evidence: freeze native GLM-Image position-reuse and packed Q/K comparisons Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> --- .../README.md | 11 ++ .../incremental/criteria.md | 5 + .../incremental/decision.json | 48 ++++++ .../incremental/diagnosis.md | 4 + .../incremental/rotary-dispatch.json | 52 ++++++ .../incremental/validator/container.sh | 20 +++ .../incremental/validator/deploy.yaml | 45 ++++++ .../incremental/validator/engine.py | 120 ++++++++++++++ .../incremental/validator/reference.json | 5 + .../patch/README.md | 1 + .../plan/README.md | 9 ++ .../plan/TASK.md | 15 ++ .../plan/diagnosis.md | 1 + .../plan/replay.sh | 29 ++++ .../plan/retained-sha256.json | 25 +++ .../plan/runspec.json | 72 +++++++++ .../plan/weights.json | 152 ++++++++++++++++++ .../results/archive.md | 1 + .../results/preflight.json | 17 ++ .../results/rotary-decode.json | 28 ++++ .../validator/container.sh | 20 +++ .../validator/deploy.yaml | 45 ++++++ .../validator/engine.py | 103 ++++++++++++ .../validator/reference.json | 5 + tools/evidence_inventory.json | 5 + 25 files changed, 838 insertions(+) create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/README.md create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/incremental/criteria.md create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/incremental/decision.json create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/incremental/diagnosis.md create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/incremental/rotary-dispatch.json create mode 100755 evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/container.sh create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/deploy.yaml create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/engine.py create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/reference.json create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/patch/README.md create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/plan/TASK.md create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/plan/diagnosis.md create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/plan/runspec.json create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/plan/weights.json create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/results/archive.md create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/results/preflight.json create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/results/rotary-decode.json create mode 100755 evidence/glm-image-vllm-omni-910b1-20261125/validator/container.sh create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/validator/deploy.yaml create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/validator/engine.py create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/validator/reference.json diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/README.md b/evidence/glm-image-vllm-omni-910b1-20261125/README.md new file mode 100644 index 000000000..fe9ae1c1a --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/README.md @@ -0,0 +1,11 @@ +# Native GLM-Image on two Ascend 910B1s + +The performance comparison uses the public vLLM-Omni `Omni.generate` entry point for 512×512 BF16 text-to-image generation. Autoregressive decoding and 20 diffusion steps both contribute to the single-image latency. A fresh engine serves each invocation, with a separate untimed warmup. + +The first candidate shares the position tables across local decoder layers. The incremental candidate applies the same rotation to adjacent Q/K heads. The model implementations and focused regression tests are in [vLLM-Omni #11130](https://github.com/vllm-project/vllm-omni/pull/11130). The governing [issue #668](https://github.com/InferMatrixLab/InferRSI/issues/668) records the acceptance conditions and the initial rejected baseline qualification. The [InferRSI decision-view changes](https://github.com/InferMatrixLab/InferRSI/pull/663) are pinned for the incremental round. + +The original quality attempt stopped because the stock blue-cover image at seed 771 has very low contrast. The parity cohorts retain the prompt and compare its exact RGB pixels against an independently rendered stock fixture. The benchmark measures latency and preservation of engine output. It does not evaluate prompt adherence or generation quality. + +The incremental protocol also renders the teapot at seed 43 in both quality arms, verifies that changing the seed changes the stock RGB output, and compares all four baseline/candidate arrays. The engine hashes the RGB bytes after decoding. PNG compression and engine initialization are outside the timed interval. + +The source snapshots, runtime, weights, workload, output oracle and acceptance gates are recorded in `plan/`. The incremental selection and its two alternatives are in `incremental/decision.json`. The 40-layer diagnostics describe the rotary region only. End-to-end AB/BA and independent-final receipts are pending. diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/incremental/criteria.md b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/criteria.md new file mode 100644 index 000000000..c8dfca978 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/criteria.md @@ -0,0 +1,5 @@ +Iterate on the native vLLM-Omni GLM-Image AR model from f7c891db411dd75572169c163c4f967fc326a4c9 (shared cosine/sine tables). Measure the incremental change using InferRSI PR #663 at 1c235ec9d5be686b23107cf50f457577e68305d5. Acceptance is scoped to issue https://github.com/InferMatrixLab/InferRSI/issues/668. + +Freeze the 512x512 two-card Ascend BF16 deployment and checkpoint, 20 diffusion steps, one warmup and two distinct seeded prompts from the prior parity study. For each measured step check all three pinned stock RGB hashes. In each quality arm also render the same teapot prompt with seed 43, require it to differ from seed 42, and compare all four baseline/candidate uint8 RGB arrays. Every channel must match across arms. The stock blue-cover fixture is near white. The claim concerns latency and reference equality. + +Use a 3% incremental latency-reduction gate, two independent measurement invocations per arm, alternating AB/BA. Each invocation starts a new engine and runs both stages with one request at a time. Disk encoding, engine initialization and warmup are excluded from latency. The median of the two requests is one observation. Retest independently on the same pair of leased cards before adopting the patch. Preserve competing options, selection reasoning and unsuccessful trials. diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/incremental/decision.json b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/decision.json new file mode 100644 index 000000000..75f5ff3a1 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/decision.json @@ -0,0 +1,48 @@ +{ + "hypothesis": "Using the adjacent Q/K heads in the existing QKV projection as a single rotary input should reduce eager per-token dispatch with equal pixels.", + "strategy": "Apply the existing BF16 operations to the packed Q/K head group. Split into contiguous Q and K after rotation; V is passed through.", + "alternatives": [ + "Use a hardware-specific fused rotary kernel. Its rounding on partial BF16 heads would need separate validation on each backend.", + "Cache cosine/sine tables across decode steps. Different M-RoPE positions and request lifetimes require an additional indexing and invalidation protocol." + ], + "selection_reason": "The previous native AR stage takes about 46.7 s/image. Packed Q/K retained exact output bytes for one and 32 tokens and lowered the one-token 40-layer section from 18.59 to 11.41 ms; it needs no device-specific kernel or cross-request cache.", + "candidate_sha256": "902bc7709fd982056bda66bb0375f71486af674543dd2fb4d8dc04078a79443a", + "inferrsi": "1c235ec9d5be686b23107cf50f457577e68305d5", + "baseline": "f7c891db411dd75572169c163c4f967fc326a4c9", + "candidate": "d36dbd5de794aa94fd6e561f3bde7c8903a28fc5", + "baseline_snapshot_sha256": "1f862afc5d564dd81b14f55cddcf66a2b5b102f13ebed02d38cc57d60513d397", + "retrieved_items": [ + { + "ref": "package:inferrsi.common.skills.audit_h3_metal_fasth3_semantics", + "title": "audit-h3-metal-fasth3-semantics" + }, + { + "ref": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i", + "title": "Qwen-Image-2.1 eager text-to-image on one 910B1: reuse plus interleaved RoPE, 30% not met" + }, + { + "ref": "package:inferrsi.common.skills.kernel_writing_guide", + "title": "kernel-writing-guide" + }, + { + "ref": "checkout:case.qwen-ascend-rejected-directions", + "title": "qwen-ascend-rejected-directions" + }, + { + "ref": "package:inferrsi.ascend.skills.vllm_ascend", + "title": "vllm-ascend" + }, + { + "ref": "checkout:case.sglang-gdn-source-contract", + "title": "sglang-gdn-source-contract" + } + ], + "cited_item": "package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i", + "protocol_sha256": { + "container.sh": "43363892249dc0586dc50ac36ca5a6ca4646812ac7433bc306e9c4cd750ca4b8", + "deploy.yaml": "75ecf5716e03215701dcb096377898d4b420ed04c59d1adbaef4c1d94eab0141", + "engine.py": "bd611d3b3d8b0b563005da02c56b4d49c6ca23b9c193141df9fc03eca3936d7c", + "reference.json": "af459c286ca5beaedbda6cb009237c7fdc43578890726f3b90167cbe7406f404" + }, + "quality": "Compare native stock RGB SHA-256 for seeds 107, 42 and 771. Independently render the teapot at seed 43 and require a different hash from seed 42. In both quality arms save all four images as lossless PNGs, decode to uint8 RGB and compare each candidate pixel with baseline." +} diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/incremental/diagnosis.md b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/diagnosis.md new file mode 100644 index 000000000..378c6be67 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/diagnosis.md @@ -0,0 +1,4 @@ +The preceding native GLM-Image candidate shares the position tables but still launches two rotary sequences per decoder layer. Its 40-layer position-only diagnostic on one decode token took 18.552 ms. In the warmed two-card native candidate quality run (512x512, 20 steps), the following stage times were recorded: +- seed 42: total 51.024 s, AR 46.665 s, diffusion 4.349 s. +- seed 771: total 51.689 s, AR 46.640 s, diffusion 5.040 s. +The QKV projection delivers contiguous Q and K head groups. Both groups use the same position-dependent elementwise arithmetic. This motivates testing joint Q/K rotation to reduce repeated elementwise launches. The stage timings do not attribute all autoregressive time to this region. diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/incremental/rotary-dispatch.json b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/rotary-dispatch.json new file mode 100644 index 000000000..0a14bad68 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/rotary-dispatch.json @@ -0,0 +1,52 @@ +{ + "1": { + "ms_per_40_layers": { + "separate": [ + 18.972269113874063, + 18.211443006293848, + 18.141426262445748, + 19.483767624478787, + 19.50419688364491, + 18.17398951970972 + ], + "packed": [ + 11.420416500186548, + 11.363160010660067, + 11.40731485793367, + 11.485400755191222, + 11.939202493522316, + 11.316705000353977 + ] + }, + "medians_ms": { + "separate": 18.591856060083956, + "packed": 11.413865679060109 + }, + "qkv_sha256": "ef1b4d7e01c132bf676aefcbb195cde12e3e3d5aaaff9cb7f1155c2eb1dbabb3" + }, + "32": { + "ms_per_40_layers": { + "separate": [ + 19.203422736609355, + 18.503781990148127, + 18.589607876492664, + 19.22697585541755, + 18.255092873005196, + 18.49560550181195 + ], + "packed": [ + 14.228343759896234, + 14.256188122089952, + 14.114011893980205, + 14.144875371130183, + 13.947223866125569, + 14.03340749675408 + ] + }, + "medians_ms": { + "separate": 18.546694933320396, + "packed": 14.129443632555194 + }, + "qkv_sha256": "773b1e8e37e5f5db2bcd1c5b50169cc844a51e7cfdf77d4a6949aea5040e1fb9" + } +} \ No newline at end of file diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/container.sh b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/container.sh new file mode 100755 index 000000000..5186f3237 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/container.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail +: "${ASCEND_RT_VISIBLE_DEVICES:?Launch inside npu run --gpus 2}" +: "${GLM_RSI_WORKSPACE:?Set this to the experiment workspace containing the frozen protocol, execution snapshots and outputs}" +: "${GLM_IMAGE_WEIGHTS:?Set this to the staged GLM-Image checkpoint directory}" +: "${GLM_OMNI_IMAGE:?Set this to the tested Ascend vLLM-Omni runtime image}" +[[ $ASCEND_RT_VISIBLE_DEVICES =~ ^[0-9]+,[0-9]+$ ]] +protocol=$(cd "$(dirname "$0")" && pwd -P) +mode=$1 +source_dir=$2 +result=$3 +exec docker run --rm --init --runtime=ascend --privileged --shm-size=12g \ + -e ASCEND_RT_VISIBLE_DEVICES -e HF_HUB_OFFLINE=1 -e OMP_NUM_THREADS=4 -e PYTHONDONTWRITEBYTECODE=1 \ + -e GLM_IMAGE_MODEL=/weights/GLM-Image \ + -v "$GLM_RSI_WORKSPACE:$GLM_RSI_WORKSPACE" -v "$GLM_IMAGE_WEIGHTS:/weights/GLM-Image:ro" \ + -v /usr/local/Ascend/driver:/usr/local/Ascend/driver:ro -v /usr/local/Ascend/firmware:/usr/local/Ascend/firmware:ro \ + -v /etc/ascend_install.info:/etc/ascend_install.info:ro \ + -v "$source_dir:$source_dir:ro" -w /tmp --entrypoint bash "$GLM_OMNI_IMAGE" \ + -c 'export PYTHONPATH="$3:${PYTHONPATH:-}"; exec python -u "$1" "$2" "$3" "$4"' \ + bash "$protocol/engine.py" "$mode" "$source_dir" "$result" diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/deploy.yaml b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/deploy.yaml new file mode 100644 index 000000000..6de14a48d --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/deploy.yaml @@ -0,0 +1,45 @@ +async_chunk: false +stages: + - stage_id: 0 + devices: "0" + max_num_seqs: 1 + gpu_memory_utilization: 0.65 + max_num_batched_tokens: 4096 + max_model_len: 8192 + enforce_eager: false + enable_prefix_caching: true + trust_remote_code: true + tensor_parallel_size: 1 + async_scheduling: true + distributed_executor_backend: mp + worker_cls: vllm_omni.platforms.npu.worker.npu_ar_worker.NPUARWorker + compilation_config: + cudagraph_capture_sizes: [1] + cudagraph_mode: FULL_DECODE_ONLY + default_sampling_params: + temperature: 0.9 + top_p: 0.75 + top_k: 16512 + stop_token_ids: [16385] + max_tokens: 4353 + seed: 42 + detokenize: false + - stage_id: 1 + devices: "1" + max_num_batched_tokens: 4096 + max_num_seqs: 1 + enforce_eager: true + trust_remote_code: true + enable_prefix_caching: false + distributed_executor_backend: mp + parallel_config: + tensor_parallel_size: 1 + sequence_parallel_size: 1 + ulysses_degree: 1 + ring_degree: 1 + default_sampling_params: + seed: 42 + num_inference_steps: 20 + guidance_scale: 1.5 + height: 512 + width: 512 diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/engine.py b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/engine.py new file mode 100644 index 000000000..33205a7b0 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/engine.py @@ -0,0 +1,120 @@ +"""Evaluate the native vLLM-Omni two-stage GLM-Image pipeline.""" + +import argparse +import hashlib +import json +import os +import statistics +import time +from pathlib import Path + +WARMUP = ("A photograph of a yellow apple on a plate.", 107) +CASES = ( + ("A red ceramic teapot on a wooden table in soft window light, a still life photograph.", 42), + ('A blue book cover with the word "MOON" in white, a crescent moon above a quiet lake.', 771), +) +SIZE = 512 +STEPS = 20 + + +def generate(engine, case): + import numpy as np + from vllm import SamplingParams + from vllm_omni.inputs.data import OmniDiffusionSamplingParams + from vllm_omni.model_executor.stage_input_processors.glm_image import compute_max_tokens + + caption, seed = case + grid = {"target_h": SIZE, "target_w": SIZE} + generation = {"num_inference_steps": STEPS, "guidance_scale": 1.5, "seed": seed} + params = [ + SamplingParams( + temperature=0.9, top_p=0.75, top_k=16512, seed=seed, detokenize=False, + max_tokens=compute_max_tokens(SIZE, SIZE), stop_token_ids=[16385], extra_args=grid, + ), + OmniDiffusionSamplingParams(height=SIZE, width=SIZE, **generation), + ] + prompt = {"prompt": caption, "height": SIZE, "width": SIZE, "mm_processor_kwargs": grid, **generation} + started = time.perf_counter() + outputs = list(engine.generate([prompt], params, py_generator=True)) + elapsed = time.perf_counter() - started + outputs = [out for out in outputs if out.final_output_type == "image"] + if len(outputs) != 1 or len(outputs[0].images) != 1: + raise ValueError("Expected one completed image") + image = outputs[0].images[0].convert("RGB") + pixels = np.asarray(image) + contrast = float(pixels.std(axis=(0, 1)).max()) + if image.size != (SIZE, SIZE) or contrast == 0 or (seed != 771 and contrast <= 2): + raise ValueError(f"Invalid native output for seed {seed}: {image.size}, contrast {contrast}") + timing = getattr(outputs[0], "stage_durations", None) or {} + row = { + "seed": seed, "elapsed_s": elapsed, + "sha256": hashlib.sha256(image.tobytes()).hexdigest(), + "max_channel_std": contrast, "stage_durations": {k: float(v) for k, v in timing.items() if isinstance(v, (int, float))}, + } + return image, row + + +def main(): + import vllm_omni + from vllm_omni.entrypoints.omni import Omni + + parser = argparse.ArgumentParser() + parser.add_argument("mode", choices=("quality", "measure")) + parser.add_argument("source", type=Path) + parser.add_argument("result", type=Path) + args = parser.parse_args() + if not Path(vllm_omni.__file__).resolve().is_relative_to(args.source.resolve()): + raise RuntimeError("The imported vllm_omni is outside the declared source snapshot") + engine = Omni( + model=os.environ["GLM_IMAGE_MODEL"], deploy_config=str(Path(__file__).with_name("deploy.yaml")), + stage_init_timeout=750, log_stats=True, + ) + frozen = json.loads(Path(__file__).with_name("reference.json").read_text()) + rows = [] + comparisons = {} + quality_images = {} + control = None + try: + warmup_image, warmup = generate(engine, WARMUP) + if warmup["sha256"] != frozen[str(warmup["seed"])]: + raise ValueError("Warmup control differs from the independent stock baseline") + if args.mode == "quality": + quality_images[warmup["seed"]] = warmup_image + for case in CASES: + image, row = generate(engine, case) + if row["sha256"] != frozen[str(row["seed"])]: + raise ValueError(f"Seed {row['seed']} differs from the stock baseline: {row['sha256']}") + if args.mode == "quality": + quality_images[row["seed"]] = image + rows.append(row) + print(json.dumps(row), flush=True) + if args.mode == "quality": + other, control = generate(engine, (CASES[0][0], CASES[0][1] + 1)) + if control["sha256"] == rows[0]["sha256"]: + raise ValueError("Changing the seed did not change the control image") + quality_images[control["seed"]] = other + finally: + engine.close() + quality = True + if args.mode == "quality": + import numpy as np + from PIL import Image + + if args.result.parent.name not in {"quality-baseline", "quality-candidate"}: + raise ValueError("Unknown InferRSI quality step") + for seed, image in quality_images.items(): + name = f"image-{seed}.png" + image.save(args.result.parent / name) + if args.result.parent.name == "quality-candidate": + with Image.open(args.result.parent.parent / "quality-baseline" / name) as reference: + delta = np.abs(np.asarray(image, dtype=np.int16) - np.asarray(reference.convert("RGB"), dtype=np.int16)) + comparisons[str(seed)] = {"max_channel_delta": int(delta.max()), + "differing_pixels": int(np.any(delta != 0, axis=2).sum())} + quality = quality and comparisons[str(seed)]["differing_pixels"] == 0 + args.result.write_text(json.dumps({ + "quality": quality, "comparisons": comparisons, "different_seed_control": control, "warmup_control": warmup, "latency_s": statistics.median(s["elapsed_s"] for s in rows), "images": rows, + }, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/reference.json b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/reference.json new file mode 100644 index 000000000..629994b32 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/validator/reference.json @@ -0,0 +1,5 @@ +{ + "107": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "42": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "771": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d" +} diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/patch/README.md b/evidence/glm-image-vllm-omni-910b1-20261125/patch/README.md new file mode 100644 index 000000000..d1c57c201 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/patch/README.md @@ -0,0 +1 @@ +The native model implementation and focused regression tests are submitted in [vLLM-Omni #11130](https://github.com/vllm-project/vllm-omni/pull/11130). Inspect the [exact source diff](https://github.com/vllm-project/vllm-omni/compare/21a1d1bcc99de83cc23dadbb323dbe82133097df...f7c891db411dd75572169c163c4f967fc326a4c9). diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md b/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md new file mode 100644 index 000000000..6c86b2b73 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md @@ -0,0 +1,9 @@ +Use two allocator-reserved Ascend 910B1s. Stage the checkpoint identified by `weights.json`, install InferRSI at the revision in `runspec.json` and check out the two vLLM-Omni revisions listed there. The launcher in `validator/` uses this site's Ascend Docker runtime conventions. Supply the matching runtime image on an appropriate Docker host with the drivers installed. + +Set `GLM_RSI_WORKSPACE` to an absolute shared directory with room for fresh snapshots and outputs, `GLM_BASELINE` and `GLM_CANDIDATE` to the two checkouts, `GLM_IMAGE_WEIGHTS` to the staged checkpoint, and `GLM_OMNI_IMAGE` to the pinned runtime. From this directory, run: + +```sh +npu run --gpus 2 -- bash replay.sh +``` + +The reservation spans the round and its independent final. The native model is imported from each declared candidate tree. Public reference hashes are specific to this runtime, checkpoint, workload and deployment. A different runtime can invalidate the pixel oracle. diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/TASK.md b/evidence/glm-image-vllm-omni-910b1-20261125/plan/TASK.md new file mode 100644 index 000000000..261be6ef8 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/TASK.md @@ -0,0 +1,15 @@ +Measure whether a change in the GLM-Image implementation in vllm-project/vllm-omni reduces single-request text-to-image latency on Ascend. Use the public Omni.generate entry point, including both autoregressive generation and diffusion. Use InferRSI with #663 for the campaign and retention of search evidence. + +### Frozen comparison + +- Start the vLLM-Omni comparison at `21a1d1bcc99de83cc23dadbb323dbe82133097df`. Record the exact winning code and its identity with the results. +- Use two reserved Ascend 910B1 cards, BF16 and a single request at a time. Place the AR stage on one card and the diffusion stage on the other. Allocate both with one `npu run --gpus 2` reservation for the round and independent final. +- Fix resolution at 512 × 512, denoising at 20 steps, guidance at 1.5, and the seed for each of two distinct prompts. Retain a separate warmup prompt. Measure wall time through return of the image, outside engine initialization, disk encoding and warmup. +- Keep both images identical to their respective baseline RGB pixels. Compare baseline and candidate in alternating AB/BA order. Use a 3% local minimum latency reduction as the engineering selection criterion and independently retest the retained source. +- Record stage timings when available. Report an inconclusive evaluation for missing images, initialization failure, interrupted trials or incomplete measurements. Limit conclusions to this workload and device configuration. + +The vLLM-Omni repository owns the implementation. InferRSI owns the campaign evidence and protocol. Link the scoped changes and independent result here for review. + +The stock baseline produced a nearly white blue-cover image for seed 771 (512×512, channel range 237–255, maximum channel standard deviation 1.43152). The initial automatic contrast check stopped before comparing the candidate. That attempt remains **INCONCLUSIVE**. A second stock run reproduced the teapot RGB digest and provided independent reference images for all three requests. + +A separate timing/parity cohort keeps both measured prompts and seeds, the original AB/BA protocol, and two cards. Freeze all three stock RGB hashes before the comparison. Require both implementations to reproduce each pinned hash on **every** invocation, including the warmup. The warmup and teapot must still pass the original contrast check. The blue-cover fixture must stay nonconstant and byte-identical to its stock reference. Report its poor contrast separately and limit the claim to latency and pixel parity. diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/diagnosis.md b/evidence/glm-image-vllm-omni-910b1-20261125/plan/diagnosis.md new file mode 100644 index 000000000..b5c7e53dc --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/diagnosis.md @@ -0,0 +1 @@ +The stock native two-stage Omni.generate call produced a 512x512 RGB image (seed 42). In this cold-request diagnostic, after engine initialization, OmniTiming recorded 77.97 s end to end, 76.65 s in the autoregressive stage and 1.31 s in diffusion. The diagnostic used the smoke denoising length; acceptance always uses 20 steps, a separate warmup and two fixed prompts. In vLLM-Omni baseline 21a1d1bcc, GlmImageTextModel forwards the identical positions to 40 local decoder layers. Each GlmImageTextAttention computes position frequencies and invokes cos and sin. These tables depend only on the positions, rope parameters and activation dtype. Investigate sharing them within a single model forward; the measured stage breakdown alone does not attribute the full AR time to RoPE. diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh b/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh new file mode 100644 index 000000000..d2276af25 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# Run with npu run --gpus 2 -- bash plan/replay.sh inside the documented environment. +set -euo pipefail +: "${ASCEND_RT_VISIBLE_DEVICES:?Reserve two devices with npu run}" +: "${GLM_RSI_WORKSPACE:?Set an absolute directory for the retained experiment}" +: "${GLM_BASELINE:?Set the stock vLLM-Omni checkout directory}" +: "${GLM_CANDIDATE:?Set the candidate vLLM-Omni checkout directory}" +: "${GLM_IMAGE_WEIGHTS:?Set the staged checkpoint directory}" +: "${GLM_OMNI_IMAGE:?Set the compatible local Ascend runtime image}" +bundle=$(cd "$(dirname "$0")/.." && pwd -P) +session="$GLM_RSI_WORKSPACE/campaign" +inferrsi campaign start --directory "$session" --repo "$GLM_BASELINE" --include vllm_omni \ + --protocol "$bundle/validator" --instructions "$bundle/plan/TASK.md" \ + --measure-command 'bash {protocol}/container.sh measure {candidate} {result}' \ + --quality-command 'bash {protocol}/container.sh quality {candidate} {result}' \ + --metric-key latency_s --metric-unit s/image --direction minimize --quality-key quality \ + --scope 'Single warm 512x512 text-to-image request through native Omni.generate, including AR and 20-step diffusion, on 2x Ascend 910B1.' \ + --min-improvement-pct 3 --repetitions 2 --warmups 0 --rounds 3 --round-mode up_to \ + --max-minutes 420 --evaluation-timeout-seconds 8400 --final-reserve-seconds 8200 --knowledge on +inferrsi campaign diagnose --directory "$session" --bottleneck 'Repeated M-RoPE table construction in the AR decoder' --evidence "$bundle/plan/diagnosis.md" +inferrsi campaign knowledge --directory "$session" \ + --query 'Autoregressive transformer GLM image generation latency on Ascend NPU: invariant rotary position embeddings precompute reuse across decoder layers, same-token operator dispatch and identical output validation.' \ + --context-bytes 13000 --limit 6 > "$GLM_RSI_WORKSPACE/knowledge.json" +ref=$(python -c 'import json,sys; print(json.load(open(sys.argv[1]))["reference"]["path"])' "$GLM_RSI_WORKSPACE/knowledge.json") +inferrsi campaign round --directory "$session" --candidate "$GLM_CANDIDATE" \ + --hypothesis 'Sharing M-RoPE tables eliminates repeated per-layer operations and preserves Q/K rotation and pixels.' \ + --strategy 'Share position-dependent tensors within one forward.' \ + --knowledge-ref "$ref#package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i" +inferrsi campaign final --directory "$session" --reason 'Independently retest the retained implementation.' diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json b/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json new file mode 100644 index 000000000..aaebb43e0 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json @@ -0,0 +1,25 @@ +{ + "README.md": "e6e1863a9168f4c49abdd7602f0560d303b947890c46e8acefe82e5184cf90c4", + "incremental/criteria.md": "166eddb4c04c1d5cd8a861176ee20baa1d3e28a9f4866f5ca47d6f1d9883591e", + "incremental/decision.json": "36fb5341fe8b1083428796a5746d0c11bdc8c8744bd798e32f2e36d85bbd9753", + "incremental/diagnosis.md": "f07da215e9939c48cffbf38aad7760c1301ecac974f8299548359d07c8340753", + "incremental/rotary-dispatch.json": "6e2a9fbf61816137be539b35c732536f6b0de00336882f67bfe12fc9b96e4b8b", + "incremental/validator/container.sh": "43363892249dc0586dc50ac36ca5a6ca4646812ac7433bc306e9c4cd750ca4b8", + "incremental/validator/deploy.yaml": "75ecf5716e03215701dcb096377898d4b420ed04c59d1adbaef4c1d94eab0141", + "incremental/validator/engine.py": "bd611d3b3d8b0b563005da02c56b4d49c6ca23b9c193141df9fc03eca3936d7c", + "incremental/validator/reference.json": "af459c286ca5beaedbda6cb009237c7fdc43578890726f3b90167cbe7406f404", + "patch/README.md": "ddaa4e4209c37d0f286661147498681875a15b8f1123626fababc315475bd4b1", + "plan/README.md": "31bb75d90a00d82796a35edc923537b9615e237a40205a915c2744f9de874725", + "plan/TASK.md": "24abcb003e945bbdc6c6e0d078ece978f3098dc378cc10a5f849cef66864cdb7", + "plan/diagnosis.md": "4d95bef719304cd2a27010676022cdd616b1080199936bc8e487b00a6406a9e9", + "plan/replay.sh": "5908b864f6e4c449d55c9d6edd3478555c60624072b068710d9cac9156bb3240", + "plan/runspec.json": "bb473fbc83cc71e62b5ef4901efd571a35846cdbb358860e6749c972b7d191bf", + "plan/weights.json": "bb257eff27189a25113d935292563659738198b5ffc25b32945c5032ccece774", + "results/archive.md": "f0e0d6a2826dcdf83b8ac8efbaa79cab0430d0af9c160b43a010c7655db20793", + "results/preflight.json": "8ccd8b1bad8ebf770ef1dbb2db4022a662cb82f181711c699d0a2799cb381b19", + "results/rotary-decode.json": "fc2dfc2822b23d75a02b4da799b1b6b5511a7ad77ce3e310dfc1186a682bb54d", + "validator/container.sh": "43363892249dc0586dc50ac36ca5a6ca4646812ac7433bc306e9c4cd750ca4b8", + "validator/deploy.yaml": "75ecf5716e03215701dcb096377898d4b420ed04c59d1adbaef4c1d94eab0141", + "validator/engine.py": "b6a2e88e31f6321d127fdc9b143769ddc599fe7b667c28a2771947a9acd33e5f", + "validator/reference.json": "af459c286ca5beaedbda6cb009237c7fdc43578890726f3b90167cbe7406f404" +} diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/runspec.json b/evidence/glm-image-vllm-omni-910b1-20261125/plan/runspec.json new file mode 100644 index 000000000..aeb364cb2 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/runspec.json @@ -0,0 +1,72 @@ +{ + "acceptance_issue": "https://github.com/InferMatrixLab/InferRSI/issues/668", + "model": "ZhipuAI/GLM-Image", + "weight_file_manifest_sha256": "bb257eff27189a25113d935292563659738198b5ffc25b32945c5032ccece774", + "engine": "https://github.com/vllm-project/vllm-omni", + "baseline": "21a1d1bcc99de83cc23dadbb323dbe82133097df", + "candidate": "f7c891db411dd75572169c163c4f967fc326a4c9", + "candidate_pull_request": "https://github.com/vllm-project/vllm-omni/pull/11130", + "inferrsi": "5058434f00c74fd942db56d1a2265ccde6669a0c", + "inferrsi_pull_request": "https://github.com/InferMatrixLab/InferRSI/pull/663", + "candidate_includes": [ + "vllm_omni" + ], + "baseline_snapshot_sha256": "bab1b7a5e4dc9cb16edf3765b159b892beb65a18083bd8e5747d58b41501440d", + "hardware": "2 x Ascend 910B1, 64 GiB each", + "driver": "25.5.0", + "stage_placement": { + "autoregression": "logical 0", + "diffusion": "logical 1" + }, + "dtype": "bfloat16", + "runtime_image_id": "sha256:a1abda7da5d6acdb2523f9521fd234fc0b07b98f87bd416b2d1b511f5642e75b", + "runtime": { + "vllm": "0.34.0+empty", + "vllm_ascend": "0.19.1rc2.dev3629+gdf793dcde", + "torch": "2.10.0+cpu", + "diffusers": "0.42.0", + "transformers": "5.19.0", + "torch_npu": "2.10.0.post7" + }, + "evaluation_settings": { + "metric_key": "latency_s", + "metric_unit": "s/image", + "quality_key": "quality", + "scope": "Single warm 512x512 text-to-image request through native Omni.generate, including AR and 20-step diffusion, on 2x Ascend 910B1.", + "direction": "minimize", + "min_improvement_pct": 3.0, + "repetitions": 2, + "warmups": 0, + "decision": "point", + "require_explanation": false, + "measure_command": [ + "bash", + "{protocol}/container.sh", + "measure", + "{candidate}", + "{result}" + ], + "quality_command": [ + "bash", + "{protocol}/container.sh", + "quality", + "{candidate}", + "{result}" + ] + }, + "protocol_sha256": { + "engine.py": "b6a2e88e31f6321d127fdc9b143769ddc599fe7b667c28a2771947a9acd33e5f", + "deploy.yaml": "75ecf5716e03215701dcb096377898d4b420ed04c59d1adbaef4c1d94eab0141", + "container.sh": "43363892249dc0586dc50ac36ca5a6ca4646812ac7433bc306e9c4cd750ca4b8", + "reference.json": "af459c286ca5beaedbda6cb009237c7fdc43578890726f3b90167cbe7406f404" + }, + "process_model": "A fresh two-stage engine per quality or measurement invocation; one warmup followed by two measured calls.", + "aggregation": "Per invocation, median of the two prompt latencies. Per side, median of measurement invocations. Quality invocations are excluded from scores.", + "preservation_oracle": "Independent stock 512x512 RGB reference bytes from all three requests, verified in every invocation.", + "baseline_image_limitation": "The blue-cover request produces a near-white image in the native stock engine; no prompt-fidelity claim.", + "raw_image_sha256": { + "107": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "42": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "771": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d" + } +} diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/weights.json b/evidence/glm-image-vllm-omni-910b1-20261125/plan/weights.json new file mode 100644 index 000000000..08e956ca7 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/weights.json @@ -0,0 +1,152 @@ +[ + { + "path": "model_index.json", + "size": 619, + "sha256": "67b2c0934a43c6821c7862b1999fc10f7d7a1b9b89ccb3a01bd908a46e8035f2", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "processor/chat_template.jinja", + "size": 435, + "sha256": "fc5ffeb5867c85630da91cca05db7c46167189d7f6066a615d435e4ec3154a57", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "processor/preprocessor_config.json", + "size": 431, + "sha256": "bc8b8af6f487435d02a32e8ea4996493457a5ac94f85c16f546ec45ba95f20a5", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "processor/tokenizer.json", + "size": 23763950, + "sha256": "7626ee04802e81cadec0dbb983f2278aa24240b3b5c86a0b7831199ef25c6652", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "processor/tokenizer_config.json", + "size": 4926, + "sha256": "5b212b0fa405480adc080ba1af5b9c5365e54b65d20d65277a93c8178fca5aeb", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "scheduler/scheduler_config.json", + "size": 482, + "sha256": "ed2f73067894ed3d8d9341036ceb7607ad9df1753bd4a0b15ed7cf1c528f758e", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "text_encoder/config.json", + "size": 781, + "sha256": "f63c1c853b48d04e6b4ed28911a320ab8cdd8333399a08571053303eec567411", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "text_encoder/model.safetensors", + "size": 870643240, + "sha256": "aa1ce00ffb0fe8912dfe32c11ba235b87511604298b605ef95314668a02f2bbf", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "tokenizer/added_tokens.json", + "size": 3018, + "sha256": "0004781309423057d33b9edf50d2669253d4347873ea33d4e7755cb866f23883", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "tokenizer/special_tokens_map.json", + "size": 3090, + "sha256": "3c2572df5f4ec60a476e5d90a1f52a989f9eefbbf381d358924a44a648bf0edb", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "tokenizer/tokenizer_config.json", + "size": 25602, + "sha256": "3be33c710b17ac8686cd2b82ec044b0cd1122ff92c651d7170bfe1af8256ebfb", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "transformer/config.json", + "size": 349, + "sha256": "ed79f81e11e9e485580c8ede7b7a09c8fb6811f5ac0ae4ce748acf6804aa97a0", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "transformer/diffusion_pytorch_model-00001-of-00003.safetensors", + "size": 4966398856, + "sha256": "f58e49fd4f181d80aa4ea22de425e7f49a9e1d0f35415fe53634e722670eec55", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "transformer/diffusion_pytorch_model-00002-of-00003.safetensors", + "size": 4984743304, + "sha256": "828d8aa45a4ded6d32e5018d36af9f234929966df3066cbc2b77afe22e4fa59a", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "transformer/diffusion_pytorch_model-00003-of-00003.safetensors", + "size": 3902674480, + "sha256": "209b6fa82bd9632e44e9a2daea8727bd3f8206331dd20d784f5cdc39a65a035f", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "transformer/diffusion_pytorch_model.safetensors.index.json", + "size": 44596, + "sha256": "d957778edf4b6757a2df2a464cae988ebdc35788fe146588a52ec221fa39698d", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "vae/config.json", + "size": 1246, + "sha256": "3dd3fd1e352eb444a5bdaa657946e17af8c2ab2790969b0a63296e383ab81da7", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "vae/diffusion_pytorch_model.safetensors", + "size": 812234342, + "sha256": "a80a129b649cdb6d74d9c2b5bb060f3b882b7826b63a732306a7d3393deedbc0", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "vision_language_encoder/config.json", + "size": 1473, + "sha256": "816382abb020842b3ba8f54bd64a54f39455ac80223bdfe732d3c78d831beb6b", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "vision_language_encoder/generation_config.json", + "size": 201, + "sha256": "34a0bb3aae9ef1313ffc06c54b7710273f2c7db1fa90999f4f4438162b84a03a", + "revision": "aa69106ae1ee981902695d08f5130dc3dd6152a4" + }, + { + "path": "vision_language_encoder/model-00001-of-00004.safetensors", + "size": 5295710600, + "sha256": "8575ed7148893c4fb390ad84c51d9c3800b0f960af6f977c6f6fd6d1708c8c4d", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "vision_language_encoder/model-00002-of-00004.safetensors", + "size": 5303216664, + "sha256": "d074e03e7bf01b4a3150adec5afb968303a0310ce701c3eae47f3e78e58b0fc5", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "vision_language_encoder/model-00003-of-00004.safetensors", + "size": 5303216648, + "sha256": "c0b8360e705e473233b2f176bfee7ced2f1654e38d24215ae8f5515891312300", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "vision_language_encoder/model-00004-of-00004.safetensors", + "size": 4326469720, + "sha256": "24ba0474ffbb11163465a2961c45f2a12d88e91840214f93f355851d7d303d0a", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + }, + { + "path": "vision_language_encoder/model.safetensors.index.json", + "size": 90283, + "sha256": "539e0dc83c362e45b15b2be4f4dc0cdb75631176bf329f95e183e38a32586c4f", + "revision": "0431c5b32a640563230d2c01ca4e6c0561c72a67" + } +] diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/results/archive.md b/evidence/glm-image-vllm-omni-910b1-20261125/results/archive.md new file mode 100644 index 000000000..77066dd9c --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/results/archive.md @@ -0,0 +1 @@ +The source campaign retains frozen snapshots, per-invocation logs, quality PNGs and assessment records locally. The public trial export uses timestamp-free step names, decoded RGB hashes, stage durations and scoped verdicts. Model weights and host-specific logs are retained outside the repository. diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/results/preflight.json b/evidence/glm-image-vllm-omni-910b1-20261125/results/preflight.json new file mode 100644 index 000000000..e65270d58 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/results/preflight.json @@ -0,0 +1,17 @@ +{ + "initial_contrast_qualification": { + "verdict": "INCONCLUSIVE", + "reason": "The stock blue-cover maximum channel standard deviation was 1.43152 (gate >2). The initial attempt did not produce a scored candidate.", + "observation_sha256": "fb8ede1c0fb5e8b4863147867ef27e3027516b7fa1f01135dd5dfc90fad58cae" + }, + "incremental_baseline_quality": { + "passed": true, + "stock_rgb_sha256": { + "107": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "42": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "771": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d" + }, + "different_teapot_seed": 43, + "different_teapot_rgb_sha256": "6ea2af8df2d86b2029cef035724a052438f4717b27cb7abaa581d7a2d670fad8" + } +} diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/results/rotary-decode.json b/evidence/glm-image-vllm-omni-910b1-20261125/results/rotary-decode.json new file mode 100644 index 000000000..164924508 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/results/rotary-decode.json @@ -0,0 +1,28 @@ +{ + "device": "Ascend 910B1", + "layers": 40, + "tokens": 1, + "milliseconds_per_40_layers": { + "baseline": [ + 33.46395611879416, + 32.98260350129567, + 32.88443852216005, + 32.632770627969876, + 32.7085301396437, + 32.510258723050356 + ], + "shared": [ + 18.62252174760215, + 18.590296007459983, + 18.499463621992618, + 18.482343264622614, + 18.51365776383318, + 18.698147643590346 + ] + }, + "sha256": "bf155531d5deb90175120ee373223db4304a222c05409b4763a45f076f6366d5", + "medians_ms": { + "baseline": 32.796484330901876, + "shared": 18.55197688564658 + } +} \ No newline at end of file diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/validator/container.sh b/evidence/glm-image-vllm-omni-910b1-20261125/validator/container.sh new file mode 100755 index 000000000..5186f3237 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/validator/container.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -euo pipefail +: "${ASCEND_RT_VISIBLE_DEVICES:?Launch inside npu run --gpus 2}" +: "${GLM_RSI_WORKSPACE:?Set this to the experiment workspace containing the frozen protocol, execution snapshots and outputs}" +: "${GLM_IMAGE_WEIGHTS:?Set this to the staged GLM-Image checkpoint directory}" +: "${GLM_OMNI_IMAGE:?Set this to the tested Ascend vLLM-Omni runtime image}" +[[ $ASCEND_RT_VISIBLE_DEVICES =~ ^[0-9]+,[0-9]+$ ]] +protocol=$(cd "$(dirname "$0")" && pwd -P) +mode=$1 +source_dir=$2 +result=$3 +exec docker run --rm --init --runtime=ascend --privileged --shm-size=12g \ + -e ASCEND_RT_VISIBLE_DEVICES -e HF_HUB_OFFLINE=1 -e OMP_NUM_THREADS=4 -e PYTHONDONTWRITEBYTECODE=1 \ + -e GLM_IMAGE_MODEL=/weights/GLM-Image \ + -v "$GLM_RSI_WORKSPACE:$GLM_RSI_WORKSPACE" -v "$GLM_IMAGE_WEIGHTS:/weights/GLM-Image:ro" \ + -v /usr/local/Ascend/driver:/usr/local/Ascend/driver:ro -v /usr/local/Ascend/firmware:/usr/local/Ascend/firmware:ro \ + -v /etc/ascend_install.info:/etc/ascend_install.info:ro \ + -v "$source_dir:$source_dir:ro" -w /tmp --entrypoint bash "$GLM_OMNI_IMAGE" \ + -c 'export PYTHONPATH="$3:${PYTHONPATH:-}"; exec python -u "$1" "$2" "$3" "$4"' \ + bash "$protocol/engine.py" "$mode" "$source_dir" "$result" diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/validator/deploy.yaml b/evidence/glm-image-vllm-omni-910b1-20261125/validator/deploy.yaml new file mode 100644 index 000000000..6de14a48d --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/validator/deploy.yaml @@ -0,0 +1,45 @@ +async_chunk: false +stages: + - stage_id: 0 + devices: "0" + max_num_seqs: 1 + gpu_memory_utilization: 0.65 + max_num_batched_tokens: 4096 + max_model_len: 8192 + enforce_eager: false + enable_prefix_caching: true + trust_remote_code: true + tensor_parallel_size: 1 + async_scheduling: true + distributed_executor_backend: mp + worker_cls: vllm_omni.platforms.npu.worker.npu_ar_worker.NPUARWorker + compilation_config: + cudagraph_capture_sizes: [1] + cudagraph_mode: FULL_DECODE_ONLY + default_sampling_params: + temperature: 0.9 + top_p: 0.75 + top_k: 16512 + stop_token_ids: [16385] + max_tokens: 4353 + seed: 42 + detokenize: false + - stage_id: 1 + devices: "1" + max_num_batched_tokens: 4096 + max_num_seqs: 1 + enforce_eager: true + trust_remote_code: true + enable_prefix_caching: false + distributed_executor_backend: mp + parallel_config: + tensor_parallel_size: 1 + sequence_parallel_size: 1 + ulysses_degree: 1 + ring_degree: 1 + default_sampling_params: + seed: 42 + num_inference_steps: 20 + guidance_scale: 1.5 + height: 512 + width: 512 diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/validator/engine.py b/evidence/glm-image-vllm-omni-910b1-20261125/validator/engine.py new file mode 100644 index 000000000..b0f6c4fe5 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/validator/engine.py @@ -0,0 +1,103 @@ +"""Evaluate the native vLLM-Omni two-stage GLM-Image pipeline.""" + +import argparse +import hashlib +import json +import os +import statistics +import time +from pathlib import Path + +WARMUP = ("A photograph of a yellow apple on a plate.", 107) +CASES = ( + ("A red ceramic teapot on a wooden table in soft window light, a still life photograph.", 42), + ('A blue book cover with the word "MOON" in white, a crescent moon above a quiet lake.', 771), +) +SIZE = 512 +STEPS = 20 + + +def generate(engine, case): + import numpy as np + from vllm import SamplingParams + from vllm_omni.inputs.data import OmniDiffusionSamplingParams + from vllm_omni.model_executor.stage_input_processors.glm_image import compute_max_tokens + + caption, seed = case + grid = {"target_h": SIZE, "target_w": SIZE} + generation = {"num_inference_steps": STEPS, "guidance_scale": 1.5, "seed": seed} + params = [ + SamplingParams( + temperature=0.9, top_p=0.75, top_k=16512, seed=seed, detokenize=False, + max_tokens=compute_max_tokens(SIZE, SIZE), stop_token_ids=[16385], extra_args=grid, + ), + OmniDiffusionSamplingParams(height=SIZE, width=SIZE, **generation), + ] + prompt = {"prompt": caption, "height": SIZE, "width": SIZE, "mm_processor_kwargs": grid, **generation} + started = time.perf_counter() + outputs = list(engine.generate([prompt], params, py_generator=True)) + elapsed = time.perf_counter() - started + outputs = [out for out in outputs if out.final_output_type == "image"] + if len(outputs) != 1 or len(outputs[0].images) != 1: + raise ValueError("Expected one completed image") + image = outputs[0].images[0].convert("RGB") + pixels = np.asarray(image) + contrast = float(pixels.std(axis=(0, 1)).max()) + if image.size != (SIZE, SIZE) or contrast == 0 or (seed != 771 and contrast <= 2): + raise ValueError(f"Invalid native output for seed {seed}: {image.size}, contrast {contrast}") + timing = getattr(outputs[0], "stage_durations", None) or {} + row = { + "seed": seed, "elapsed_s": elapsed, + "sha256": hashlib.sha256(image.tobytes()).hexdigest(), + "max_channel_std": contrast, "stage_durations": {k: float(v) for k, v in timing.items() if isinstance(v, (int, float))}, + } + return image, row + + +def main(): + import vllm_omni + from vllm_omni.entrypoints.omni import Omni + + parser = argparse.ArgumentParser() + parser.add_argument("mode", choices=("quality", "measure")) + parser.add_argument("source", type=Path) + parser.add_argument("result", type=Path) + args = parser.parse_args() + if not Path(vllm_omni.__file__).resolve().is_relative_to(args.source.resolve()): + raise RuntimeError("The imported vllm_omni is outside the declared source snapshot") + engine = Omni( + model=os.environ["GLM_IMAGE_MODEL"], deploy_config=str(Path(__file__).with_name("deploy.yaml")), + stage_init_timeout=750, log_stats=True, + ) + frozen = json.loads(Path(__file__).with_name("reference.json").read_text()) + rows = [] + try: + _, warmup = generate(engine, WARMUP) + if warmup["sha256"] != frozen[str(warmup["seed"])]: + raise ValueError("Warmup control differs from the independent stock baseline") + for case in CASES: + image, row = generate(engine, case) + if row["sha256"] != frozen[str(row["seed"])]: + raise ValueError(f"Seed {row['seed']} differs from the stock baseline: {row['sha256']}") + if args.mode == "quality": + image.save(args.result.parent / f"image-{row['seed']}.png") + rows.append(row) + print(json.dumps(row), flush=True) + finally: + engine.close() + quality = True + if args.mode == "quality": + if args.result.parent.name == "quality-candidate": + reference = json.loads((args.result.parent.parent / "quality-baseline/result.json").read_text()) + quality = [(s["seed"], s["sha256"]) for s in rows] == [ + (s["seed"], s["sha256"]) for s in reference["images"] + ] + elif args.result.parent.name != "quality-baseline": + raise ValueError("Unknown InferRSI quality step") + args.result.write_text(json.dumps({ + "quality": quality, "warmup_control": warmup, "latency_s": statistics.median(s["elapsed_s"] for s in rows), "images": rows, + }, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/validator/reference.json b/evidence/glm-image-vllm-omni-910b1-20261125/validator/reference.json new file mode 100644 index 000000000..629994b32 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/validator/reference.json @@ -0,0 +1,5 @@ +{ + "107": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "42": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "771": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d" +} diff --git a/tools/evidence_inventory.json b/tools/evidence_inventory.json index e0958c8da..1c20ef966 100644 --- a/tools/evidence_inventory.json +++ b/tools/evidence_inventory.json @@ -231,6 +231,11 @@ "manifests": [{"path": "plan/integrity.json", "schema": "bundle-sha256"}], "external": ["Original private client captures and unredacted host-specific plans remain outside the repository; the public bundle retains labelled redactions, original digests and replayable answer checks."] }, + "glm-image-vllm-omni-910b1-20261125": { + "kind": "campaign", + "manifests": [{"path": "plan/retained-sha256.json", "schema": "bundle-sha256"}], + "external": ["Large native model checkpoints, generated PNGs and host-local execution logs remain outside the repository. Public trial receipts retain every image hash, stage duration, ordered sample and the initial baseline qualification failure."] + }, "qwen-vats-gvo-910b1-20261124": { "kind": "campaign", "manifests": [{"path": "plan/retained-sha256.json", "schema": "bundle-sha256"}], From 57eb5ab5ed6aa9f14e8242bb0fb50604adb7abd4 Mon Sep 17 00:00:00 2001 From: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> Date: Wed, 25 Nov 2026 14:33:49 +0800 Subject: [PATCH 2/7] evidence: verify four exact pixel comparisons for packed GLM-Image Q/K Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> --- .../plan/README.md | 2 + .../plan/replay.sh | 51 ++++++++++++++++--- .../plan/retained-sha256.json | 6 +-- .../results/preflight.json | 23 +++++++++ 4 files changed, 71 insertions(+), 11 deletions(-) diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md b/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md index 6c86b2b73..feb829e9d 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md @@ -7,3 +7,5 @@ npu run --gpus 2 -- bash replay.sh ``` The reservation spans the round and its independent final. The native model is imported from each declared candidate tree. Public reference hashes are specific to this runtime, checkpoint, workload and deployment. A different runtime can invalidate the pixel oracle. + +Set `GLM_COHORT=packed` for the incremental comparison. Use the InferRSI revision and the two model revisions from `incremental/decision.json`. Use `GLM_COHORT=shared` with `plan/runspec.json` for the first comparison. Each invocation writes to its own campaign directory. diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh b/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh index d2276af25..44adb23aa 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh @@ -8,22 +8,57 @@ set -euo pipefail : "${GLM_IMAGE_WEIGHTS:?Set the staged checkpoint directory}" : "${GLM_OMNI_IMAGE:?Set the compatible local Ascend runtime image}" bundle=$(cd "$(dirname "$0")/.." && pwd -P) -session="$GLM_RSI_WORKSPACE/campaign" +cohort=${GLM_COHORT:-shared} +case "$cohort" in + shared) + data="$bundle" + task="$bundle/plan/TASK.md" + diagnosis="$bundle/plan/diagnosis.md" + query='Autoregressive transformer GLM image generation latency on Ascend NPU: invariant rotary position embeddings precompute reuse across decoder layers, same-token operator dispatch and identical output validation.' + hypothesis='Sharing M-RoPE tables eliminates repeated per-layer operations and preserves Q/K rotation and pixels.' + strategy='Share position-dependent tensors within one forward.' + extra=() + rounds=3 + knowledge_bytes=13000 + ;; + packed) + data="$bundle/incremental" + task="$data/criteria.md" + diagnosis="$data/diagnosis.md" + query='Ascend rotary embedding fuse Q and K BF16 kernel dispatch exact rounding group query attention fused QKV layout partial rotary batch token' + hypothesis=$(python -c 'import json,sys; print(json.load(open(sys.argv[1]))["hypothesis"])' "$data/decision.json") + strategy=$(python -c 'import json,sys; print(json.load(open(sys.argv[1]))["strategy"])' "$data/decision.json") + mapfile -t extra < <(python - "$data/decision.json" <<'PYTHON' +import json +import sys + +decision = json.load(open(sys.argv[1])) +for option in decision["alternatives"]: + print("--alternative") + print(option) +print("--selection-reason") +print(decision["selection_reason"]) +PYTHON + ) + rounds=2 + knowledge_bytes=16000 + ;; + *) 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 \ - --protocol "$bundle/validator" --instructions "$bundle/plan/TASK.md" \ + --protocol "$data/validator" --instructions "$task" \ --measure-command 'bash {protocol}/container.sh measure {candidate} {result}' \ --quality-command 'bash {protocol}/container.sh quality {candidate} {result}' \ --metric-key latency_s --metric-unit s/image --direction minimize --quality-key quality \ --scope 'Single warm 512x512 text-to-image request through native Omni.generate, including AR and 20-step diffusion, on 2x Ascend 910B1.' \ - --min-improvement-pct 3 --repetitions 2 --warmups 0 --rounds 3 --round-mode up_to \ + --min-improvement-pct 3 --repetitions 2 --warmups 0 --rounds "$rounds" --round-mode up_to \ --max-minutes 420 --evaluation-timeout-seconds 8400 --final-reserve-seconds 8200 --knowledge on -inferrsi campaign diagnose --directory "$session" --bottleneck 'Repeated M-RoPE table construction in the AR decoder' --evidence "$bundle/plan/diagnosis.md" +inferrsi campaign diagnose --directory "$session" --bottleneck 'GLM-Image autoregressive position-embedding overhead' --evidence "$diagnosis" inferrsi campaign knowledge --directory "$session" \ - --query 'Autoregressive transformer GLM image generation latency on Ascend NPU: invariant rotary position embeddings precompute reuse across decoder layers, same-token operator dispatch and identical output validation.' \ - --context-bytes 13000 --limit 6 > "$GLM_RSI_WORKSPACE/knowledge.json" + --query "$query" --context-bytes "$knowledge_bytes" --limit 6 > "$GLM_RSI_WORKSPACE/knowledge.json" ref=$(python -c 'import json,sys; print(json.load(open(sys.argv[1]))["reference"]["path"])' "$GLM_RSI_WORKSPACE/knowledge.json") inferrsi campaign round --directory "$session" --candidate "$GLM_CANDIDATE" \ - --hypothesis 'Sharing M-RoPE tables eliminates repeated per-layer operations and preserves Q/K rotation and pixels.' \ - --strategy 'Share position-dependent tensors within one forward.' \ + --hypothesis "$hypothesis" --strategy "$strategy" "${extra[@]}" \ --knowledge-ref "$ref#package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i" inferrsi campaign final --directory "$session" --reason 'Independently retest the retained implementation.' diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json b/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json index aaebb43e0..02c1f53fa 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json @@ -9,14 +9,14 @@ "incremental/validator/engine.py": "bd611d3b3d8b0b563005da02c56b4d49c6ca23b9c193141df9fc03eca3936d7c", "incremental/validator/reference.json": "af459c286ca5beaedbda6cb009237c7fdc43578890726f3b90167cbe7406f404", "patch/README.md": "ddaa4e4209c37d0f286661147498681875a15b8f1123626fababc315475bd4b1", - "plan/README.md": "31bb75d90a00d82796a35edc923537b9615e237a40205a915c2744f9de874725", + "plan/README.md": "26fb706b2aaabe655d407c3c0cfbc6057ed4e601422e731e1c495c714803986a", "plan/TASK.md": "24abcb003e945bbdc6c6e0d078ece978f3098dc378cc10a5f849cef66864cdb7", "plan/diagnosis.md": "4d95bef719304cd2a27010676022cdd616b1080199936bc8e487b00a6406a9e9", - "plan/replay.sh": "5908b864f6e4c449d55c9d6edd3478555c60624072b068710d9cac9156bb3240", + "plan/replay.sh": "e196d5daf31d6a94796ea1134bcf2c8532f294df79db762615c8947be31f8740", "plan/runspec.json": "bb473fbc83cc71e62b5ef4901efd571a35846cdbb358860e6749c972b7d191bf", "plan/weights.json": "bb257eff27189a25113d935292563659738198b5ffc25b32945c5032ccece774", "results/archive.md": "f0e0d6a2826dcdf83b8ac8efbaa79cab0430d0af9c160b43a010c7655db20793", - "results/preflight.json": "8ccd8b1bad8ebf770ef1dbb2db4022a662cb82f181711c699d0a2799cb381b19", + "results/preflight.json": "e055218bbf98b83dc41dcdc74882cf792cba3df846cc25a72ef3e77d23467afd", "results/rotary-decode.json": "fc2dfc2822b23d75a02b4da799b1b6b5511a7ad77ce3e310dfc1186a682bb54d", "validator/container.sh": "43363892249dc0586dc50ac36ca5a6ca4646812ac7433bc306e9c4cd750ca4b8", "validator/deploy.yaml": "75ecf5716e03215701dcb096377898d4b420ed04c59d1adbaef4c1d94eab0141", diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/results/preflight.json b/evidence/glm-image-vllm-omni-910b1-20261125/results/preflight.json index e65270d58..54092799d 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/results/preflight.json +++ b/evidence/glm-image-vllm-omni-910b1-20261125/results/preflight.json @@ -13,5 +13,28 @@ }, "different_teapot_seed": 43, "different_teapot_rgb_sha256": "6ea2af8df2d86b2029cef035724a052438f4717b27cb7abaa581d7a2d670fad8" + }, + "incremental_candidate_quality": { + "passed": true, + "compared_pixels_per_image": 262144, + "rgb_comparisons": { + "107": { + "max_channel_delta": 0, + "differing_pixels": 0 + }, + "42": { + "max_channel_delta": 0, + "differing_pixels": 0 + }, + "771": { + "max_channel_delta": 0, + "differing_pixels": 0 + }, + "43": { + "max_channel_delta": 0, + "differing_pixels": 0 + } + }, + "different_teapot_rgb_sha256": "6ea2af8df2d86b2029cef035724a052438f4717b27cb7abaa581d7a2d670fad8" } } From bd57cf5d3077f99da2da9023b3e02e931220dded Mon Sep 17 00:00:00 2001 From: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> Date: Wed, 25 Nov 2026 15:14:11 +0800 Subject: [PATCH 3/7] evidence: validate pinned GLM-Image replay inputs before campaign start Agent-assisted-by: Codex (replay implementation and validation) Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> --- .../plan/README.md | 6 +- .../plan/package-pins.json | 10 ++ .../plan/preflight.py | 102 ++++++++++++++++++ .../plan/replay.sh | 13 ++- .../plan/retained-sha256.json | 7 +- .../plan/test_preflight.py | 55 ++++++++++ 6 files changed, 185 insertions(+), 8 deletions(-) create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/plan/package-pins.json create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/plan/preflight.py create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/plan/test_preflight.py diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md b/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md index feb829e9d..31dc7b07b 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md @@ -1,6 +1,6 @@ Use two allocator-reserved Ascend 910B1s. Stage the checkpoint identified by `weights.json`, install InferRSI at the revision in `runspec.json` and check out the two vLLM-Omni revisions listed there. The launcher in `validator/` uses this site's Ascend Docker runtime conventions. Supply the matching runtime image on an appropriate Docker host with the drivers installed. -Set `GLM_RSI_WORKSPACE` to an absolute shared directory with room for fresh snapshots and outputs, `GLM_BASELINE` and `GLM_CANDIDATE` to the two checkouts, `GLM_IMAGE_WEIGHTS` to the staged checkpoint, and `GLM_OMNI_IMAGE` to the pinned runtime. From this directory, run: +Set `GLM_RSI_WORKSPACE` to an absolute shared directory with room for fresh snapshots and outputs, `GLM_BASELINE` and `GLM_CANDIDATE` to the two checkouts, `GLM_IMAGE_WEIGHTS` to the staged checkpoint, and `GLM_OMNI_IMAGE` to the pinned runtime. Set `GLM_RSI_PYTHON` to the Python interpreter that contains the pinned InferRSI wheel, or activate that environment. From this directory run ```sh npu run --gpus 2 -- bash replay.sh @@ -9,3 +9,7 @@ npu run --gpus 2 -- bash replay.sh The reservation spans the round and its independent final. The native model is imported from each declared candidate tree. Public reference hashes are specific to this runtime, checkpoint, workload and deployment. A different runtime can invalidate the pixel oracle. Set `GLM_COHORT=packed` for the incremental comparison. Use the InferRSI revision and the two model revisions from `incremental/decision.json`. Use `GLM_COHORT=shared` with `plan/runspec.json` for the first comparison. Each invocation writes to its own campaign directory. + +Before creating a campaign, the replay checks both Git revisions and the exact retained `vllm_omni` source bytes and modes. It verifies the installed InferRSI build and package files, the frozen evaluation protocol, the Docker image ID and every staged checkpoint file against its recorded size and SHA-256. The replay then passes the immutable image ID to the engine launcher. The weight directory should contain the 25 files listed in `weights.json`. The same interpreter runs the preflight and the campaign. + +Run `python -B test_preflight.py` in the pinned InferRSI environment to exercise the identical-tree and dirty-source checks on CPU. To check real inputs alone, set the same environment variables and run `python -B preflight.py packed` or `python -B preflight.py shared`; a successful check prints the Docker image ID. diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/package-pins.json b/evidence/glm-image-vllm-omni-910b1-20261125/plan/package-pins.json new file mode 100644 index 000000000..bed32f080 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/package-pins.json @@ -0,0 +1,10 @@ +{ + "5058434f00c74fd942db56d1a2265ccde6669a0c": { + "scm_commit_id": "g5058434f0", + "files_sha256": "7996b3bcb0e4f37e450958bdbb47519cf3ccd57a3dd7bd7f68a66203c4e2d782" + }, + "1c235ec9d5be686b23107cf50f457577e68305d5": { + "scm_commit_id": "g1c235ec9d", + "files_sha256": "fb294aaf5ec4d086824b7435b079ca4fcc10318b3bf41917bb7b017a6919d52f" + } +} diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/preflight.py b/evidence/glm-image-vllm-omni-910b1-20261125/plan/preflight.py new file mode 100644 index 000000000..b70c4fbd4 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/preflight.py @@ -0,0 +1,102 @@ +"""Validate the recorded replay inputs on the host before launching the first engine.""" + +import argparse +import hashlib +import json +import os +import subprocess +from pathlib import Path + +from inferrsi._version import __commit_id__ + +import inferrsi +from inferrsi.harness.candidates import identity + +PLAN = Path(__file__).resolve().parent + + +def read(path): + return json.loads(path.read_text()) + + +def sha256(path): + digest = hashlib.sha256() + with path.open("rb") as source: + for chunk in iter(lambda: source.read(4 * 1024 * 1024), b""): + digest.update(chunk) + return digest.hexdigest() + + +def require_match(actual, expected, description): + if actual != expected: + raise ValueError(f"{description} differs from the recorded value") + + +def package_digest(): + """Cover installed code and package data independently of path, timestamps and umask.""" + root = Path(inferrsi.__file__).resolve().parent + files = { + p.relative_to(root).as_posix(): sha256(p) + for p in root.rglob("*") + if p.is_file() and "__pycache__" not in p.parts and p.suffix != ".pyc" + } + return hashlib.sha256(json.dumps(files, sort_keys=True).encode()).hexdigest() + + +def check_source(tree, commit, snapshot, role): + head = subprocess.check_output(["git", "-C", tree, "rev-parse", "HEAD"], text=True).strip() + require_match(head, commit, f"{role} Git revision") + require_match(identity(tree, ["vllm_omni"]), snapshot, f"{role} vllm_omni bytes and modes") + + +def check_sources(baseline, candidate, spec, candidate_digest): + if baseline.samefile(candidate): + raise ValueError("Baseline and candidate point to the same tree") + check_source(baseline, spec["baseline"], spec["baseline_snapshot_sha256"], "Baseline") + check_source(candidate, spec["candidate"], candidate_digest, "Candidate") + + +def check_weights(root, manifest_digest): + manifest = PLAN / "weights.json" + require_match(sha256(manifest), manifest_digest, "Weight manifest") + records = read(manifest) + files = {p.relative_to(root).as_posix() for p in root.rglob("*") if p.is_file()} + require_match(files, {row["path"] for row in records}, "Staged checkpoint file set") + for row in records: + path = root / row["path"] + require_match(path.stat().st_size, row["size"], row["path"]) + require_match(sha256(path), row["sha256"], row["path"]) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("cohort", choices=("shared", "packed")) + args = parser.parse_args() + common = read(PLAN / "runspec.json") + increment = read(PLAN.parent / "incremental/decision.json") + spec = common if args.cohort == "shared" else increment + candidate_digest = ( + increment["baseline_snapshot_sha256"] + if args.cohort == "shared" + else increment["candidate_sha256"] + ) + check_sources( + Path(os.environ["GLM_BASELINE"]), Path(os.environ["GLM_CANDIDATE"]), spec, candidate_digest + ) + package_pin = read(PLAN / "package-pins.json")[spec["inferrsi"]] + require_match(__commit_id__, package_pin["scm_commit_id"], "Installed InferRSI build revision") + require_match(package_digest(), package_pin["files_sha256"], "Installed InferRSI files") + protocol_root = PLAN.parent if args.cohort == "shared" else PLAN.parent / "incremental" + for filename, expected in spec["protocol_sha256"].items(): + require_match(sha256(protocol_root / "validator" / filename), expected, filename) + image_id = subprocess.check_output( + ["docker", "image", "inspect", "--format", "{{.Id}}", os.environ["GLM_OMNI_IMAGE"]], + text=True, + ).strip() + require_match(image_id, common["runtime_image_id"], "Docker runtime image") + check_weights(Path(os.environ["GLM_IMAGE_WEIGHTS"]), common["weight_file_manifest_sha256"]) + print(image_id) + + +if __name__ == "__main__": + main() diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh b/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh index 44adb23aa..b9cb4e1e5 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh @@ -45,8 +45,11 @@ PYTHON ;; *) echo 'GLM_COHORT must be shared or packed' >&2; exit 2 ;; esac +rsi_python=${GLM_RSI_PYTHON:-python} +GLM_OMNI_IMAGE=$("$rsi_python" -B "$bundle/plan/preflight.py" "$cohort") +export GLM_OMNI_IMAGE session="$GLM_RSI_WORKSPACE/campaign-$cohort" -inferrsi campaign start --directory "$session" --repo "$GLM_BASELINE" --include vllm_omni \ +"$rsi_python" -m inferrsi campaign start --directory "$session" --repo "$GLM_BASELINE" --include vllm_omni \ --protocol "$data/validator" --instructions "$task" \ --measure-command 'bash {protocol}/container.sh measure {candidate} {result}' \ --quality-command 'bash {protocol}/container.sh quality {candidate} {result}' \ @@ -54,11 +57,11 @@ inferrsi campaign start --directory "$session" --repo "$GLM_BASELINE" --include --scope 'Single warm 512x512 text-to-image request through native Omni.generate, including AR and 20-step diffusion, on 2x Ascend 910B1.' \ --min-improvement-pct 3 --repetitions 2 --warmups 0 --rounds "$rounds" --round-mode up_to \ --max-minutes 420 --evaluation-timeout-seconds 8400 --final-reserve-seconds 8200 --knowledge on -inferrsi campaign diagnose --directory "$session" --bottleneck 'GLM-Image autoregressive position-embedding overhead' --evidence "$diagnosis" -inferrsi campaign knowledge --directory "$session" \ +"$rsi_python" -m inferrsi campaign diagnose --directory "$session" --bottleneck 'GLM-Image autoregressive position-embedding overhead' --evidence "$diagnosis" +"$rsi_python" -m inferrsi campaign knowledge --directory "$session" \ --query "$query" --context-bytes "$knowledge_bytes" --limit 6 > "$GLM_RSI_WORKSPACE/knowledge.json" ref=$(python -c 'import json,sys; print(json.load(open(sys.argv[1]))["reference"]["path"])' "$GLM_RSI_WORKSPACE/knowledge.json") -inferrsi campaign round --directory "$session" --candidate "$GLM_CANDIDATE" \ +"$rsi_python" -m inferrsi campaign round --directory "$session" --candidate "$GLM_CANDIDATE" \ --hypothesis "$hypothesis" --strategy "$strategy" "${extra[@]}" \ --knowledge-ref "$ref#package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i" -inferrsi campaign final --directory "$session" --reason 'Independently retest the retained implementation.' +"$rsi_python" -m inferrsi campaign final --directory "$session" --reason 'Independently retest the retained implementation.' diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json b/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json index 02c1f53fa..365f5c299 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json @@ -9,11 +9,14 @@ "incremental/validator/engine.py": "bd611d3b3d8b0b563005da02c56b4d49c6ca23b9c193141df9fc03eca3936d7c", "incremental/validator/reference.json": "af459c286ca5beaedbda6cb009237c7fdc43578890726f3b90167cbe7406f404", "patch/README.md": "ddaa4e4209c37d0f286661147498681875a15b8f1123626fababc315475bd4b1", - "plan/README.md": "26fb706b2aaabe655d407c3c0cfbc6057ed4e601422e731e1c495c714803986a", + "plan/README.md": "1666de8164f72deaba4e762c5ae1fe962dc5e042bd818641661e28f93f18d7fe", "plan/TASK.md": "24abcb003e945bbdc6c6e0d078ece978f3098dc378cc10a5f849cef66864cdb7", "plan/diagnosis.md": "4d95bef719304cd2a27010676022cdd616b1080199936bc8e487b00a6406a9e9", - "plan/replay.sh": "e196d5daf31d6a94796ea1134bcf2c8532f294df79db762615c8947be31f8740", + "plan/package-pins.json": "fe0bc1553e951a9bfc76ac2044f6f3524c8c8c1037bbef00d63550f407d01bf4", + "plan/preflight.py": "64323092cb4d24b3beb58f56c33fee7feace45073b573aaf6a25ab4ea46233a4", + "plan/replay.sh": "5362b395aa519d310ca96f13a79ed0078c532533674ec307c34d780fd5ea14ff", "plan/runspec.json": "bb473fbc83cc71e62b5ef4901efd571a35846cdbb358860e6749c972b7d191bf", + "plan/test_preflight.py": "3ffe8f4015c9c7cf3fe3e60af1bf9ada5d3957f3a5c54108ff7c50dea788c30d", "plan/weights.json": "bb257eff27189a25113d935292563659738198b5ffc25b32945c5032ccece774", "results/archive.md": "f0e0d6a2826dcdf83b8ac8efbaa79cab0430d0af9c160b43a010c7655db20793", "results/preflight.json": "e055218bbf98b83dc41dcdc74882cf792cba3df846cc25a72ef3e77d23467afd", diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/test_preflight.py b/evidence/glm-image-vllm-omni-910b1-20261125/plan/test_preflight.py new file mode 100644 index 000000000..f314f2728 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/test_preflight.py @@ -0,0 +1,55 @@ +"""CPU-only regressions for replaying the wrong candidate or a dirty snapshot.""" + +import subprocess +import tempfile +import unittest +from pathlib import Path + +from preflight import check_source, check_sources + +from inferrsi.harness.candidates import identity + + +class ReplayInputs(unittest.TestCase): + def test_same_tree(self): + with tempfile.TemporaryDirectory() as where: + tree = Path(where) + with self.assertRaisesRegex(ValueError, "same tree"): + check_sources(tree, tree / ".", {}, "") + + def test_dirty_worktree(self): + with tempfile.TemporaryDirectory() as where: + tree = Path(where) + source = tree / "vllm_omni" + source.mkdir() + module = source / "model.py" + module.write_text("value = 1\n") + subprocess.run(["git", "init", "-q", where], check=True) + subprocess.run(["git", "-C", where, "add", "vllm_omni"], check=True) + subprocess.run( + [ + "git", + "-C", + where, + "-c", + "user.name=test", + "-c", + "user.email=test@example.org", + "commit", + "-qm", + "fixture", + ], + check=True, + ) + head = subprocess.check_output( + ["git", "-C", where, "rev-parse", "HEAD"], text=True + ).strip() + expected = identity(tree, ["vllm_omni"]) + check_source(tree, head, expected, "Candidate") + module.write_text("value = 2\n") + with self.assertRaisesRegex(ValueError, "Candidate vllm_omni"): + check_source(tree, head, expected, "Candidate") + + +if __name__ == "__main__": + unittest.main() From 7eb162aef0d280f2d13db34bda7c742bc736821f Mon Sep 17 00:00:00 2001 From: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> Date: Wed, 25 Nov 2026 15:18:30 +0800 Subject: [PATCH 4/7] evidence: record direct stock and packed Q/K AB/BA timings Agent-assisted-by: Codex (timing evidence and verification) Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> --- .../plan/direct-comparison.md | 1 + .../plan/retained-sha256.json | 2 + .../results/direct-stock-packed.json | 214 ++++++++++++++++++ 3 files changed, 217 insertions(+) create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/plan/direct-comparison.md create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/results/direct-stock-packed.json diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/direct-comparison.md b/evidence/glm-image-vllm-omni-910b1-20261125/plan/direct-comparison.md new file mode 100644 index 000000000..e6cc13d23 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/direct-comparison.md @@ -0,0 +1 @@ +Direct cumulative stock versus packed comparison. Run the stock vLLM-Omni revision 21a1d1bcc99de83cc23dadbb323dbe82133097df and final candidate d36dbd5de794aa94fd6e561f3bde7c8903a28fc5 in A/B/B/A order on one pair of reserved Ascend 910B1s. Each invocation starts a fresh native engine and uses the original independent RGB digests, one warmup and the two 512x512 20-step requests in the incremental frozen evaluator. Summarize the median of the two independently measured invocation medians per side. Report this direct comparison separately from the managed incremental round and its final. Do not multiply gains from different reservations. diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json b/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json index 365f5c299..679a2e861 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json @@ -12,6 +12,7 @@ "plan/README.md": "1666de8164f72deaba4e762c5ae1fe962dc5e042bd818641661e28f93f18d7fe", "plan/TASK.md": "24abcb003e945bbdc6c6e0d078ece978f3098dc378cc10a5f849cef66864cdb7", "plan/diagnosis.md": "4d95bef719304cd2a27010676022cdd616b1080199936bc8e487b00a6406a9e9", + "plan/direct-comparison.md": "39fcb154ad820bcb76b0206194881fd1fd4bb0da45552f853a93b31735a4877c", "plan/package-pins.json": "fe0bc1553e951a9bfc76ac2044f6f3524c8c8c1037bbef00d63550f407d01bf4", "plan/preflight.py": "64323092cb4d24b3beb58f56c33fee7feace45073b573aaf6a25ab4ea46233a4", "plan/replay.sh": "5362b395aa519d310ca96f13a79ed0078c532533674ec307c34d780fd5ea14ff", @@ -19,6 +20,7 @@ "plan/test_preflight.py": "3ffe8f4015c9c7cf3fe3e60af1bf9ada5d3957f3a5c54108ff7c50dea788c30d", "plan/weights.json": "bb257eff27189a25113d935292563659738198b5ffc25b32945c5032ccece774", "results/archive.md": "f0e0d6a2826dcdf83b8ac8efbaa79cab0430d0af9c160b43a010c7655db20793", + "results/direct-stock-packed.json": "9f7c9cc6557cb0773df997a6e93fe082ba11ec792a69161475c878fc4b602ffd", "results/preflight.json": "e055218bbf98b83dc41dcdc74882cf792cba3df846cc25a72ef3e77d23467afd", "results/rotary-decode.json": "fc2dfc2822b23d75a02b4da799b1b6b5511a7ad77ce3e310dfc1186a682bb54d", "validator/container.sh": "43363892249dc0586dc50ac36ca5a6ca4646812ac7433bc306e9c4cd750ca4b8", diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/results/direct-stock-packed.json b/evidence/glm-image-vllm-omni-910b1-20261125/results/direct-stock-packed.json new file mode 100644 index 000000000..735c601f5 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/results/direct-stock-packed.json @@ -0,0 +1,214 @@ +{ + "stock_revision": "21a1d1bcc99de83cc23dadbb323dbe82133097df", + "packed_revision": "d36dbd5de794aa94fd6e561f3bde7c8903a28fc5", + "stock_s": 57.57967490633018, + "packed_s": 49.18542876833817, + "latency_reduction_pct": 14.578488245457544, + "speedup": 1.1706653036924544, + "trials": [ + { + "arm": "01-stock", + "result_file_sha256": "699993c11f65a63adb3e63aa5792d08d2a6692fcb93acb1f011613c5d8b7858b", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": null, + "warmup_control": { + "seed": 107, + "elapsed_s": 79.54159247805364, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.0115071199834347, + "preprocess_ms": 2.843905007466674, + "ar2diffusion_ms": 3.337566973641515, + "stage_0_gen_ms": 75279.34029698372, + "stage_1_gen_ms": 4249.797153985128 + } + }, + "latency_s": 58.4413702004822, + "images": [ + { + "seed": 42, + "elapsed_s": 59.45440984889865, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.057277200743556, + "preprocess_ms": 2.967128064483404, + "ar2diffusion_ms": 1.8520590383559465, + "stage_0_gen_ms": 54459.966491907835, + "stage_1_gen_ms": 4983.953401912004 + } + }, + { + "seed": 771, + "elapsed_s": 57.428330552065745, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.9705850388854742, + "preprocess_ms": 2.883116016164422, + "ar2diffusion_ms": 1.8353781197220087, + "stage_0_gen_ms": 52344.867494888604, + "stage_1_gen_ms": 5073.809054912999 + } + } + ] + } + }, + { + "arm": "02-packed", + "result_file_sha256": "6710f6573330420707ae8929edab50f997e8e7e63d51e580ff2ae5830de6a15c", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": null, + "warmup_control": { + "seed": 107, + "elapsed_s": 68.85942715615965, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 0.9575951844453812, + "preprocess_ms": 2.827974036335945, + "ar2diffusion_ms": 3.4466900397092104, + "stage_0_gen_ms": 64720.155868912116, + "stage_1_gen_ms": 4126.327917911112 + } + }, + "latency_s": 48.8933638256276, + "images": [ + { + "seed": 42, + "elapsed_s": 49.07710554404184, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.0393981356173754, + "preprocess_ms": 2.945678075775504, + "ar2diffusion_ms": 1.9584721885621548, + "stage_0_gen_ms": 44978.65079785697, + "stage_1_gen_ms": 4087.2624630574137 + } + }, + { + "seed": 771, + "elapsed_s": 48.70962210721336, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 1.1496099177747965, + "preprocess_ms": 5.261917831376195, + "ar2diffusion_ms": 1.7964569851756096, + "stage_0_gen_ms": 43832.3640669696, + "stage_1_gen_ms": 4864.915505982935 + } + } + ] + } + }, + { + "arm": "03-packed", + "result_file_sha256": "340f8957acd9745380a6a795039a8fe18b762b061884a294f61367635acdcf79", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": null, + "warmup_control": { + "seed": 107, + "elapsed_s": 71.55653668101877, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.1951408814638853, + "preprocess_ms": 2.681559883058071, + "ar2diffusion_ms": 3.2841460779309273, + "stage_0_gen_ms": 66466.0404289607, + "stage_1_gen_ms": 5077.350278152153 + } + }, + "latency_s": 49.47749371104874, + "images": [ + { + "seed": 42, + "elapsed_s": 49.68776113400236, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.067248173058033, + "preprocess_ms": 3.192682983353734, + "ar2diffusion_ms": 1.6735938843339682, + "stage_0_gen_ms": 44664.16296781972, + "stage_1_gen_ms": 5013.358187861741 + } + }, + { + "seed": 771, + "elapsed_s": 49.26722628809512, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.9873469825834036, + "preprocess_ms": 3.1006319914013147, + "ar2diffusion_ms": 1.6331428196281195, + "stage_0_gen_ms": 44773.50816689432, + "stage_1_gen_ms": 4483.767688041553 + } + } + ] + } + }, + { + "arm": "04-stock", + "result_file_sha256": "f081539cefefbad8cccff7c1d0e323fd700c31d5c61d2074894de88e7bf9be03", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": null, + "warmup_control": { + "seed": 107, + "elapsed_s": 79.69379393802956, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 0.9912068489938974, + "preprocess_ms": 2.7967828791588545, + "ar2diffusion_ms": 3.6095951218158007, + "stage_0_gen_ms": 74660.86055897176, + "stage_1_gen_ms": 5020.099062938243 + } + }, + "latency_s": 56.71797961217817, + "images": [ + { + "seed": 42, + "elapsed_s": 56.372612729202956, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.0658579412847757, + "preprocess_ms": 3.182453103363514, + "ar2diffusion_ms": 1.8595480360090733, + "stage_0_gen_ms": 51668.374818051234, + "stage_1_gen_ms": 4693.593739997596 + } + }, + { + "seed": 771, + "elapsed_s": 57.06334649515338, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 1.073008868843317, + "preprocess_ms": 2.9988090973347425, + "ar2diffusion_ms": 1.6892750281840563, + "stage_0_gen_ms": 52379.53924294561, + "stage_1_gen_ms": 4673.449449939653 + } + } + ] + } + } + ] +} From e3f709e2ddb5202ebf0573ce1617c16756aaa769 Mon Sep 17 00:00:00 2001 From: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> Date: Wed, 25 Nov 2026 15:37:52 +0800 Subject: [PATCH 5/7] test: include the GLM-Image bundle in evidence inventory expectations Agent-assisted-by: Codex (inventory validation) Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> --- tests/repository/test_evidence_inventory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/repository/test_evidence_inventory.py b/tests/repository/test_evidence_inventory.py index cc4a37d3e..57d8c92a8 100644 --- a/tests/repository/test_evidence_inventory.py +++ b/tests/repository/test_evidence_inventory.py @@ -145,6 +145,6 @@ def test_checked_in_inventory(): repo = Path(__file__).resolve().parents[2] result = validate_inventory(repo) assert result["errors"] == [] - assert len(result["bundles"]) == 28 - assert result["checked_hashes"] == 485 + assert len(result["bundles"]) == 29 + assert result["checked_hashes"] == 513 assert result["unavailable"] # Historical raw artifacts are not in this checkout. From d0ccad1e3a19ad8a5a7aefa4b6bb00f870a7e008 Mon Sep 17 00:00:00 2001 From: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> Date: Wed, 25 Nov 2026 16:00:41 +0800 Subject: [PATCH 6/7] evidence: retain verified GLM-Image input pins and shared-table final Agent-assisted-by: Codex (replay receipts, aggregation and tests) Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> --- .../README.md | 6 +- .../plan/README.md | 2 + .../plan/preflight.py | 27 +- .../plan/replay.sh | 14 +- .../plan/retained-sha256.json | 17 +- .../results/archive.md | 2 + .../results/direct-stock-packed.json | 12 +- .../results/input-pins-direct.json | 20 + .../results/input-pins-packed.json | 20 + .../results/input-pins-shared.json | 20 + .../results/summary.json | 36 ++ .../results/trials.json | 600 ++++++++++++++++++ tests/repository/test_evidence_inventory.py | 2 +- 13 files changed, 762 insertions(+), 16 deletions(-) create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/results/input-pins-direct.json create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/results/input-pins-packed.json create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/results/input-pins-shared.json create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/results/summary.json create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/results/trials.json diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/README.md b/evidence/glm-image-vllm-omni-910b1-20261125/README.md index fe9ae1c1a..1613e0ead 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/README.md +++ b/evidence/glm-image-vllm-omni-910b1-20261125/README.md @@ -8,4 +8,8 @@ The original quality attempt stopped because the stock blue-cover image at seed The incremental protocol also renders the teapot at seed 43 in both quality arms, verifies that changing the seed changes the stock RGB output, and compares all four baseline/candidate arrays. The engine hashes the RGB bytes after decoding. PNG compression and engine initialization are outside the timed interval. -The source snapshots, runtime, weights, workload, output oracle and acceptance gates are recorded in `plan/`. The incremental selection and its two alternatives are in `incremental/decision.json`. The 40-layer diagnostics describe the rotary region only. End-to-end AB/BA and independent-final receipts are pending. +The source snapshots, runtime, weights, workload, output oracle and acceptance gates are recorded in `plan/`. The incremental selection and its two alternatives are in `incremental/decision.json`. The 40-layer diagnostics describe the rotary region only. + +### Comparison status + +The direct stock-to-packed AB/BA comparison is complete at **57.58 → 49.19 s/image (14.58% less time)**. The shared-table implementation passed its independent final at 59.05 → 49.20 s/image. The incremental packed-Q/K search round passed at 50.93 → 47.97 s/image; its independent final is running. [Direct per-invocation receipts](https://github.com/InferMatrixLab/InferRSI/blob/7eb162aef0d280f2d13db34bda7c742bc736821f/evidence/glm-image-vllm-omni-910b1-20261125/results/direct-stock-packed.json). diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md b/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md index 31dc7b07b..432a59df9 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/README.md @@ -13,3 +13,5 @@ Set `GLM_COHORT=packed` for the incremental comparison. Use the InferRSI revisio Before creating a campaign, the replay checks both Git revisions and the exact retained `vllm_omni` source bytes and modes. It verifies the installed InferRSI build and package files, the frozen evaluation protocol, the Docker image ID and every staged checkpoint file against its recorded size and SHA-256. The replay then passes the immutable image ID to the engine launcher. The weight directory should contain the 25 files listed in `weights.json`. The same interpreter runs the preflight and the campaign. Run `python -B test_preflight.py` in the pinned InferRSI environment to exercise the identical-tree and dirty-source checks on CPU. To check real inputs alone, set the same environment variables and run `python -B preflight.py packed` or `python -B preflight.py shared`; a successful check prints the Docker image ID. + +The replay writes a timestamped input verification record to `$GLM_RSI_WORKSPACE/preflight-$GLM_COHORT.json`. The bundle retains independent host checks in `results/input-pins-shared.json`, `results/input-pins-packed.json` and `results/input-pins-direct.json`. These records were collected against the pinned inputs after the original measurements had started. Each contains the two revisions and source digests, installed InferRSI build and package digest, protocol hashes, runtime image ID and checkpoint manifest hash. The cumulative direct run used the incremental protocol on stock and packed source revisions. diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/preflight.py b/evidence/glm-image-vllm-omni-910b1-20261125/plan/preflight.py index b70c4fbd4..e4075561a 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/plan/preflight.py +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/preflight.py @@ -5,6 +5,7 @@ import json import os import subprocess +from datetime import datetime, timezone from pathlib import Path from inferrsi._version import __commit_id__ @@ -70,11 +71,18 @@ def check_weights(root, manifest_digest): def main(): parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("cohort", choices=("shared", "packed")) + parser.add_argument("cohort", choices=("shared", "packed", "direct")) + parser.add_argument("--receipt", type=Path, help="Save a JSON record of the checked inputs") args = parser.parse_args() common = read(PLAN / "runspec.json") increment = read(PLAN.parent / "incremental/decision.json") spec = common if args.cohort == "shared" else increment + if args.cohort == "direct": + spec = { + **increment, + "baseline": common["baseline"], + "baseline_snapshot_sha256": common["baseline_snapshot_sha256"], + } candidate_digest = ( increment["baseline_snapshot_sha256"] if args.cohort == "shared" @@ -95,6 +103,23 @@ def main(): ).strip() require_match(image_id, common["runtime_image_id"], "Docker runtime image") check_weights(Path(os.environ["GLM_IMAGE_WEIGHTS"]), common["weight_file_manifest_sha256"]) + if args.receipt: + receipt = { + "cohort": args.cohort, + "verified_at_utc": datetime.now(timezone.utc).isoformat(), + "baseline_revision": spec["baseline"], + "candidate_revision": spec["candidate"], + "baseline_snapshot_sha256": spec["baseline_snapshot_sha256"], + "candidate_snapshot_sha256": candidate_digest, + "inferrsi_revision": spec["inferrsi"], + "inferrsi_scm_commit_id": __commit_id__, + "inferrsi_package_sha256": package_pin["files_sha256"], + "protocol_sha256": spec["protocol_sha256"], + "runtime_image_id": image_id, + "weight_manifest_sha256": common["weight_file_manifest_sha256"], + "weight_file_count": len(read(PLAN / "weights.json")), + } + args.receipt.write_text(json.dumps(receipt, indent=2) + "\n") print(image_id) diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh b/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh index b9cb4e1e5..49997b556 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/replay.sh @@ -9,6 +9,7 @@ set -euo pipefail : "${GLM_OMNI_IMAGE:?Set the compatible local Ascend runtime image}" bundle=$(cd "$(dirname "$0")/.." && pwd -P) cohort=${GLM_COHORT:-shared} +rsi_python=${GLM_RSI_PYTHON:-python} case "$cohort" in shared) data="$bundle" @@ -26,9 +27,9 @@ case "$cohort" in task="$data/criteria.md" diagnosis="$data/diagnosis.md" query='Ascend rotary embedding fuse Q and K BF16 kernel dispatch exact rounding group query attention fused QKV layout partial rotary batch token' - hypothesis=$(python -c 'import json,sys; print(json.load(open(sys.argv[1]))["hypothesis"])' "$data/decision.json") - strategy=$(python -c 'import json,sys; print(json.load(open(sys.argv[1]))["strategy"])' "$data/decision.json") - mapfile -t extra < <(python - "$data/decision.json" <<'PYTHON' + hypothesis=$("$rsi_python" -c 'import json,sys; print(json.load(open(sys.argv[1]))["hypothesis"])' "$data/decision.json") + strategy=$("$rsi_python" -c 'import json,sys; print(json.load(open(sys.argv[1]))["strategy"])' "$data/decision.json") + mapfile -t extra < <("$rsi_python" - "$data/decision.json" <<'PYTHON' import json import sys @@ -45,8 +46,9 @@ PYTHON ;; *) echo 'GLM_COHORT must be shared or packed' >&2; exit 2 ;; esac -rsi_python=${GLM_RSI_PYTHON:-python} -GLM_OMNI_IMAGE=$("$rsi_python" -B "$bundle/plan/preflight.py" "$cohort") +mkdir -p "$GLM_RSI_WORKSPACE" +GLM_OMNI_IMAGE=$("$rsi_python" -B "$bundle/plan/preflight.py" "$cohort" \ + --receipt "$GLM_RSI_WORKSPACE/preflight-$cohort.json") export GLM_OMNI_IMAGE session="$GLM_RSI_WORKSPACE/campaign-$cohort" "$rsi_python" -m inferrsi campaign start --directory "$session" --repo "$GLM_BASELINE" --include vllm_omni \ @@ -60,7 +62,7 @@ session="$GLM_RSI_WORKSPACE/campaign-$cohort" "$rsi_python" -m inferrsi campaign diagnose --directory "$session" --bottleneck 'GLM-Image autoregressive position-embedding overhead' --evidence "$diagnosis" "$rsi_python" -m inferrsi campaign knowledge --directory "$session" \ --query "$query" --context-bytes "$knowledge_bytes" --limit 6 > "$GLM_RSI_WORKSPACE/knowledge.json" -ref=$(python -c 'import json,sys; print(json.load(open(sys.argv[1]))["reference"]["path"])' "$GLM_RSI_WORKSPACE/knowledge.json") +ref=$("$rsi_python" -c 'import json,sys; print(json.load(open(sys.argv[1]))["reference"]["path"])' "$GLM_RSI_WORKSPACE/knowledge.json") "$rsi_python" -m inferrsi campaign round --directory "$session" --candidate "$GLM_CANDIDATE" \ --hypothesis "$hypothesis" --strategy "$strategy" "${extra[@]}" \ --knowledge-ref "$ref#package:vllm_omni.ascend.diffusion.qwen_image_21_eager_t2i" diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json b/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json index 679a2e861..c45c9324a 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json @@ -1,5 +1,5 @@ { - "README.md": "e6e1863a9168f4c49abdd7602f0560d303b947890c46e8acefe82e5184cf90c4", + "README.md": "f4f7ce54f883747af03852af3e03cdd22e7c5ca558916f153b1f8608b2dcadcf", "incremental/criteria.md": "166eddb4c04c1d5cd8a861176ee20baa1d3e28a9f4866f5ca47d6f1d9883591e", "incremental/decision.json": "36fb5341fe8b1083428796a5746d0c11bdc8c8744bd798e32f2e36d85bbd9753", "incremental/diagnosis.md": "f07da215e9939c48cffbf38aad7760c1301ecac974f8299548359d07c8340753", @@ -9,20 +9,25 @@ "incremental/validator/engine.py": "bd611d3b3d8b0b563005da02c56b4d49c6ca23b9c193141df9fc03eca3936d7c", "incremental/validator/reference.json": "af459c286ca5beaedbda6cb009237c7fdc43578890726f3b90167cbe7406f404", "patch/README.md": "ddaa4e4209c37d0f286661147498681875a15b8f1123626fababc315475bd4b1", - "plan/README.md": "1666de8164f72deaba4e762c5ae1fe962dc5e042bd818641661e28f93f18d7fe", + "plan/README.md": "396a81e4d0ff5204301db050f3139a5d46178350baaeea6437bd273d892dd6b9", "plan/TASK.md": "24abcb003e945bbdc6c6e0d078ece978f3098dc378cc10a5f849cef66864cdb7", "plan/diagnosis.md": "4d95bef719304cd2a27010676022cdd616b1080199936bc8e487b00a6406a9e9", "plan/direct-comparison.md": "39fcb154ad820bcb76b0206194881fd1fd4bb0da45552f853a93b31735a4877c", "plan/package-pins.json": "fe0bc1553e951a9bfc76ac2044f6f3524c8c8c1037bbef00d63550f407d01bf4", - "plan/preflight.py": "64323092cb4d24b3beb58f56c33fee7feace45073b573aaf6a25ab4ea46233a4", - "plan/replay.sh": "5362b395aa519d310ca96f13a79ed0078c532533674ec307c34d780fd5ea14ff", + "plan/preflight.py": "c88d3c3799fef9b5d88c0105be1fe38df6cddbbd6e3c209a52fa780b54e4b890", + "plan/replay.sh": "23e8d6fbd91413c7f003097da66eaa1ad596b0cf5e2eba4fdee6373584805976", "plan/runspec.json": "bb473fbc83cc71e62b5ef4901efd571a35846cdbb358860e6749c972b7d191bf", "plan/test_preflight.py": "3ffe8f4015c9c7cf3fe3e60af1bf9ada5d3957f3a5c54108ff7c50dea788c30d", "plan/weights.json": "bb257eff27189a25113d935292563659738198b5ffc25b32945c5032ccece774", - "results/archive.md": "f0e0d6a2826dcdf83b8ac8efbaa79cab0430d0af9c160b43a010c7655db20793", - "results/direct-stock-packed.json": "9f7c9cc6557cb0773df997a6e93fe082ba11ec792a69161475c878fc4b602ffd", + "results/archive.md": "27e41552adb538f4fc52bc9016101b14da73e156bc73f5ee032ad240f9195071", + "results/direct-stock-packed.json": "86d6c15489527203ed6bfa0dce0ce766e8f141c345c91e02dcf7fdade73a3848", + "results/input-pins-direct.json": "3c90382ebd846848921f94745b47c2164550efa2276f707c4ffe80fb05076514", + "results/input-pins-packed.json": "db5ed25e770efa394cda64c7d749f313acf0c280d75d433b5216657142e07241", + "results/input-pins-shared.json": "9228b28cf21e5e5d2a891c121052e0841e1f0c956284b568b2792ea566ff03e6", "results/preflight.json": "e055218bbf98b83dc41dcdc74882cf792cba3df846cc25a72ef3e77d23467afd", "results/rotary-decode.json": "fc2dfc2822b23d75a02b4da799b1b6b5511a7ad77ce3e310dfc1186a682bb54d", + "results/summary.json": "abd3caeb6170a14656c2ab140b285c2e2d1136e98275e8058cf237de11ae0667", + "results/trials.json": "188b502099bd6c6bd533789c8544f422406906a06664162d8ce2f4b4dbc1ee5e", "validator/container.sh": "43363892249dc0586dc50ac36ca5a6ca4646812ac7433bc306e9c4cd750ca4b8", "validator/deploy.yaml": "75ecf5716e03215701dcb096377898d4b420ed04c59d1adbaef4c1d94eab0141", "validator/engine.py": "b6a2e88e31f6321d127fdc9b143769ddc599fe7b667c28a2771947a9acd33e5f", diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/results/archive.md b/evidence/glm-image-vllm-omni-910b1-20261125/results/archive.md index 77066dd9c..13cc5dc95 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/results/archive.md +++ b/evidence/glm-image-vllm-omni-910b1-20261125/results/archive.md @@ -1 +1,3 @@ The source campaign retains frozen snapshots, per-invocation logs, quality PNGs and assessment records locally. The public trial export uses timestamp-free step names, decoded RGB hashes, stage durations and scoped verdicts. Model weights and host-specific logs are retained outside the repository. + +Measurement invocations check the three frozen RGB hashes. They record empty per-pixel comparisons because the four-image array comparison and changed-seed control run in the two quality invocations. The trial envelope names the invocation or marks the direct timing phase explicitly. diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/results/direct-stock-packed.json b/evidence/glm-image-vllm-omni-910b1-20261125/results/direct-stock-packed.json index 735c601f5..e85553cc3 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/results/direct-stock-packed.json +++ b/evidence/glm-image-vllm-omni-910b1-20261125/results/direct-stock-packed.json @@ -8,6 +8,7 @@ "trials": [ { "arm": "01-stock", + "phase": "measurement", "result_file_sha256": "699993c11f65a63adb3e63aa5792d08d2a6692fcb93acb1f011613c5d8b7858b", "result": { "quality": true, @@ -59,6 +60,7 @@ }, { "arm": "02-packed", + "phase": "measurement", "result_file_sha256": "6710f6573330420707ae8929edab50f997e8e7e63d51e580ff2ae5830de6a15c", "result": { "quality": true, @@ -110,6 +112,7 @@ }, { "arm": "03-packed", + "phase": "measurement", "result_file_sha256": "340f8957acd9745380a6a795039a8fe18b762b061884a294f61367635acdcf79", "result": { "quality": true, @@ -161,6 +164,7 @@ }, { "arm": "04-stock", + "phase": "measurement", "result_file_sha256": "f081539cefefbad8cccff7c1d0e323fd700c31d5c61d2074894de88e7bf9be03", "result": { "quality": true, @@ -210,5 +214,11 @@ ] } } - ] + ], + "inputs": { + "receipt": "results/input-pins-direct.json", + "receipt_sha256": "3c90382ebd846848921f94745b47c2164550efa2276f707c4ffe80fb05076514", + "runtime_image_id": "sha256:a1abda7da5d6acdb2523f9521fd234fc0b07b98f87bd416b2d1b511f5642e75b", + "protocol_inferrsi_revision": "1c235ec9d5be686b23107cf50f457577e68305d5" + } } diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/results/input-pins-direct.json b/evidence/glm-image-vllm-omni-910b1-20261125/results/input-pins-direct.json new file mode 100644 index 000000000..13db15ea3 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/results/input-pins-direct.json @@ -0,0 +1,20 @@ +{ + "cohort": "direct", + "verified_at_utc": "2026-11-25T07:57:28.518990+00:00", + "baseline_revision": "21a1d1bcc99de83cc23dadbb323dbe82133097df", + "candidate_revision": "d36dbd5de794aa94fd6e561f3bde7c8903a28fc5", + "baseline_snapshot_sha256": "bab1b7a5e4dc9cb16edf3765b159b892beb65a18083bd8e5747d58b41501440d", + "candidate_snapshot_sha256": "902bc7709fd982056bda66bb0375f71486af674543dd2fb4d8dc04078a79443a", + "inferrsi_revision": "1c235ec9d5be686b23107cf50f457577e68305d5", + "inferrsi_scm_commit_id": "g1c235ec9d", + "inferrsi_package_sha256": "fb294aaf5ec4d086824b7435b079ca4fcc10318b3bf41917bb7b017a6919d52f", + "protocol_sha256": { + "container.sh": "43363892249dc0586dc50ac36ca5a6ca4646812ac7433bc306e9c4cd750ca4b8", + "deploy.yaml": "75ecf5716e03215701dcb096377898d4b420ed04c59d1adbaef4c1d94eab0141", + "engine.py": "bd611d3b3d8b0b563005da02c56b4d49c6ca23b9c193141df9fc03eca3936d7c", + "reference.json": "af459c286ca5beaedbda6cb009237c7fdc43578890726f3b90167cbe7406f404" + }, + "runtime_image_id": "sha256:a1abda7da5d6acdb2523f9521fd234fc0b07b98f87bd416b2d1b511f5642e75b", + "weight_manifest_sha256": "bb257eff27189a25113d935292563659738198b5ffc25b32945c5032ccece774", + "weight_file_count": 25 +} diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/results/input-pins-packed.json b/evidence/glm-image-vllm-omni-910b1-20261125/results/input-pins-packed.json new file mode 100644 index 000000000..254cae506 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/results/input-pins-packed.json @@ -0,0 +1,20 @@ +{ + "cohort": "packed", + "verified_at_utc": "2026-11-25T07:58:39.584086+00:00", + "baseline_revision": "f7c891db411dd75572169c163c4f967fc326a4c9", + "candidate_revision": "d36dbd5de794aa94fd6e561f3bde7c8903a28fc5", + "baseline_snapshot_sha256": "1f862afc5d564dd81b14f55cddcf66a2b5b102f13ebed02d38cc57d60513d397", + "candidate_snapshot_sha256": "902bc7709fd982056bda66bb0375f71486af674543dd2fb4d8dc04078a79443a", + "inferrsi_revision": "1c235ec9d5be686b23107cf50f457577e68305d5", + "inferrsi_scm_commit_id": "g1c235ec9d", + "inferrsi_package_sha256": "fb294aaf5ec4d086824b7435b079ca4fcc10318b3bf41917bb7b017a6919d52f", + "protocol_sha256": { + "container.sh": "43363892249dc0586dc50ac36ca5a6ca4646812ac7433bc306e9c4cd750ca4b8", + "deploy.yaml": "75ecf5716e03215701dcb096377898d4b420ed04c59d1adbaef4c1d94eab0141", + "engine.py": "bd611d3b3d8b0b563005da02c56b4d49c6ca23b9c193141df9fc03eca3936d7c", + "reference.json": "af459c286ca5beaedbda6cb009237c7fdc43578890726f3b90167cbe7406f404" + }, + "runtime_image_id": "sha256:a1abda7da5d6acdb2523f9521fd234fc0b07b98f87bd416b2d1b511f5642e75b", + "weight_manifest_sha256": "bb257eff27189a25113d935292563659738198b5ffc25b32945c5032ccece774", + "weight_file_count": 25 +} diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/results/input-pins-shared.json b/evidence/glm-image-vllm-omni-910b1-20261125/results/input-pins-shared.json new file mode 100644 index 000000000..80a0373d7 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/results/input-pins-shared.json @@ -0,0 +1,20 @@ +{ + "cohort": "shared", + "verified_at_utc": "2026-11-25T07:59:48.140490+00:00", + "baseline_revision": "21a1d1bcc99de83cc23dadbb323dbe82133097df", + "candidate_revision": "f7c891db411dd75572169c163c4f967fc326a4c9", + "baseline_snapshot_sha256": "bab1b7a5e4dc9cb16edf3765b159b892beb65a18083bd8e5747d58b41501440d", + "candidate_snapshot_sha256": "1f862afc5d564dd81b14f55cddcf66a2b5b102f13ebed02d38cc57d60513d397", + "inferrsi_revision": "5058434f00c74fd942db56d1a2265ccde6669a0c", + "inferrsi_scm_commit_id": "g5058434f0", + "inferrsi_package_sha256": "7996b3bcb0e4f37e450958bdbb47519cf3ccd57a3dd7bd7f68a66203c4e2d782", + "protocol_sha256": { + "engine.py": "b6a2e88e31f6321d127fdc9b143769ddc599fe7b667c28a2771947a9acd33e5f", + "deploy.yaml": "75ecf5716e03215701dcb096377898d4b420ed04c59d1adbaef4c1d94eab0141", + "container.sh": "43363892249dc0586dc50ac36ca5a6ca4646812ac7433bc306e9c4cd750ca4b8", + "reference.json": "af459c286ca5beaedbda6cb009237c7fdc43578890726f3b90167cbe7406f404" + }, + "runtime_image_id": "sha256:a1abda7da5d6acdb2523f9521fd234fc0b07b98f87bd416b2d1b511f5642e75b", + "weight_manifest_sha256": "bb257eff27189a25113d935292563659738198b5ffc25b32945c5032ccece774", + "weight_file_count": 25 +} diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/results/summary.json b/evidence/glm-image-vllm-omni-910b1-20261125/results/summary.json new file mode 100644 index 000000000..912a477ce --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/results/summary.json @@ -0,0 +1,36 @@ +{ + "initial_stock_qualification": { + "verdict": "INCONCLUSIVE", + "reason": "The stock seed-771 image had maximum channel standard deviation 1.43152, below the initial threshold of 2. No candidate was scored.", + "observation_sha256": "fb8ede1c0fb5e8b4863147867ef27e3027516b7fa1f01135dd5dfc90fad58cae" + }, + "round": { + "verdict": "PASS", + "baseline_s": 58.41938050376484, + "candidate_s": 49.981541807588656, + "speedup": 1.1688190958305946, + "latency_reduction_pct": 14.443560721484216, + "quality_passed": true, + "candidate_snapshot_sha256": "1f862afc5d564dd81b14f55cddcf66a2b5b102f13ebed02d38cc57d60513d397", + "observation_sha256": "3e14d3c56e526e0399194fc6322ff4c5b972f6707b23e59455c293d4f7042f6f" + }, + "independent_final": { + "verdict": "PASS", + "baseline_s": 59.04794324346585, + "candidate_s": 49.19841020362219, + "speedup": 1.2002002300293537, + "latency_reduction_pct": 16.680569210060668, + "quality_passed": true, + "candidate_snapshot_sha256": "1f862afc5d564dd81b14f55cddcf66a2b5b102f13ebed02d38cc57d60513d397", + "observation_sha256": "af8bec064a60ae43b376adb281d4abde568cd2d38354f63cab832de5c01be234" + }, + "image_rgb_sha256": { + "107": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "42": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "771": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d" + }, + "source": "native Omni.generate on two reserved Ascend 910B1s", + "quality_scope": "Exact reproduction of three stock images. The native stock blue-cover output is near white. Semantic image quality is not qualified.", + "selection_threshold_pct": 3, + "decision": "Point comparison with two AB/BA repetitions per side. No statistical confidence interval." +} diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/results/trials.json b/evidence/glm-image-vllm-omni-910b1-20261125/results/trials.json new file mode 100644 index 000000000..5c2450b51 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/results/trials.json @@ -0,0 +1,600 @@ +[ + { + "cohort": "round", + "trials": [ + { + "invocation": "quality-baseline", + "result_file_sha256": "307e3a243583f2b22406b83d0a7c38948d9c803d70ce8ccb4190f74cda802a3e", + "result": { + "quality": true, + "warmup_control": { + "seed": 107, + "elapsed_s": 79.11376496218145, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.1363797821104527, + "preprocess_ms": 2.7264610398560762, + "ar2diffusion_ms": 3.3052461221814156, + "stage_0_gen_ms": 74314.868634101, + "stage_1_gen_ms": 4786.325789056718 + } + }, + "latency_s": 57.269844783935696, + "images": [ + { + "seed": 42, + "elapsed_s": 56.82149544078857, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.0298371780663729, + "preprocess_ms": 2.967736916616559, + "ar2diffusion_ms": 1.782695995643735, + "stage_0_gen_ms": 52591.7503379751, + "stage_1_gen_ms": 4219.628667924553 + } + }, + { + "seed": 771, + "elapsed_s": 57.718194127082825, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 1.0234869550913572, + "preprocess_ms": 2.7734730392694473, + "ar2diffusion_ms": 1.7088749445974827, + "stage_0_gen_ms": 52606.389842927456, + "stage_1_gen_ms": 5102.383518125862 + } + } + ] + } + }, + { + "invocation": "quality-candidate", + "result_file_sha256": "ecd5b2f5b36e559f10e7c948311d1bd91a2193348cc976bb1bfd690f456f7aab", + "result": { + "quality": true, + "warmup_control": { + "seed": 107, + "elapsed_s": 73.38437337684445, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 0.9774458594620228, + "preprocess_ms": 2.7187210507690907, + "ar2diffusion_ms": 3.166362876072526, + "stage_0_gen_ms": 68285.7360120397, + "stage_1_gen_ms": 5086.22818114236 + } + }, + "latency_s": 51.3564648629399, + "images": [ + { + "seed": 42, + "elapsed_s": 51.02416352392174, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.0027959942817688, + "preprocess_ms": 3.110312158241868, + "ar2diffusion_ms": 1.7556159291416407, + "stage_0_gen_ms": 46665.05252290517, + "stage_1_gen_ms": 4349.024747032672 + } + }, + { + "seed": 771, + "elapsed_s": 51.68876620195806, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.8735330775380135, + "preprocess_ms": 2.7457319665700197, + "ar2diffusion_ms": 1.7505250871181488, + "stage_0_gen_ms": 46639.615626074374, + "stage_1_gen_ms": 5040.018606930971 + } + } + ] + } + }, + { + "invocation": "measurement-001-baseline", + "result_file_sha256": "d8d1d95bdbaf7e8d9e580dff587aee2927665a3dc59f0be226b1123fc643974a", + "result": { + "quality": true, + "warmup_control": { + "seed": 107, + "elapsed_s": 79.69361431407742, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 0.9244340471923351, + "preprocess_ms": 2.4614438880234957, + "ar2diffusion_ms": 3.099201014265418, + "stage_0_gen_ms": 74587.01527514495, + "stage_1_gen_ms": 5095.4478268977255 + } + }, + "latency_s": 57.958933578571305, + "images": [ + { + "seed": 42, + "elapsed_s": 58.3601252080407, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 0.8288009557873011, + "preprocess_ms": 2.567647024989128, + "ar2diffusion_ms": 1.3108339626342058, + "stage_0_gen_ms": 53348.790685180575, + "stage_1_gen_ms": 5003.117837244645 + } + }, + { + "seed": 771, + "elapsed_s": 57.55774194910191, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.7282688748091459, + "preprocess_ms": 2.1257849875837564, + "ar2diffusion_ms": 1.1720808688551188, + "stage_0_gen_ms": 52509.19363414869, + "stage_1_gen_ms": 5041.564611950889 + } + } + ] + } + }, + { + "invocation": "measurement-001-candidate", + "result_file_sha256": "c154ff18a75dacc51adf91717e842a29024cf803ee3f721a49e9bcf925a6b01d", + "result": { + "quality": true, + "warmup_control": { + "seed": 107, + "elapsed_s": 72.44218831206672, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.1673800181597471, + "preprocess_ms": 2.624527784064412, + "ar2diffusion_ms": 3.201044164597988, + "stage_0_gen_ms": 68121.46444409154, + "stage_1_gen_ms": 4308.334162924439 + } + }, + "latency_s": 51.2683384376578, + "images": [ + { + "seed": 42, + "elapsed_s": 50.92875836812891, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.1113088112324476, + "preprocess_ms": 2.895464887842536, + "ar2diffusion_ms": 1.8035571556538343, + "stage_0_gen_ms": 46458.871578099206, + "stage_1_gen_ms": 4459.664303110912 + } + }, + { + "seed": 771, + "elapsed_s": 51.607918507186696, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.9404551237821579, + "preprocess_ms": 2.856204053387046, + "ar2diffusion_ms": 1.6142318490892649, + "stage_0_gen_ms": 47308.75981692225, + "stage_1_gen_ms": 4289.931439096108 + } + } + ] + } + }, + { + "invocation": "measurement-002-candidate", + "result_file_sha256": "ae8b489d3c1d3bd55048080b9f23292bd28079c222ae53b504257121bfc275c5", + "result": { + "quality": true, + "warmup_control": { + "seed": 107, + "elapsed_s": 69.78895654086955, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.329313963651657, + "preprocess_ms": 3.01005900837481, + "ar2diffusion_ms": 3.21215414442122, + "stage_0_gen_ms": 64730.64688802697, + "stage_1_gen_ms": 5045.226210029796 + } + }, + "latency_s": 48.69474517751951, + "images": [ + { + "seed": 42, + "elapsed_s": 48.88548201392405, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.0600569657981396, + "preprocess_ms": 2.841134089976549, + "ar2diffusion_ms": 1.6944441013038158, + "stage_0_gen_ms": 44300.82202912308, + "stage_1_gen_ms": 4574.990272056311 + } + }, + { + "seed": 771, + "elapsed_s": 48.50400834111497, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.768669880926609, + "preprocess_ms": 2.7083910536020994, + "ar2diffusion_ms": 1.6324631869792938, + "stage_0_gen_ms": 44090.72268009186, + "stage_1_gen_ms": 4404.461738886312 + } + } + ] + } + }, + { + "invocation": "measurement-002-baseline", + "result_file_sha256": "91c56d342b8f8e2739d33614f88ecc49763d7b8ea08a0e6db0ec52626ad713c8", + "result": { + "quality": true, + "warmup_control": { + "seed": 107, + "elapsed_s": 79.4207006318029, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.1558711994439363, + "preprocess_ms": 2.5938681792467833, + "ar2diffusion_ms": 3.456719918176532, + "stage_0_gen_ms": 75018.40306119993, + "stage_1_gen_ms": 4389.634337741882 + } + }, + "latency_s": 58.87982742895838, + "images": [ + { + "seed": 42, + "elapsed_s": 59.646434623980895, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.066708005964756, + "preprocess_ms": 3.0415391083806753, + "ar2diffusion_ms": 1.9074000883847475, + "stage_0_gen_ms": 54619.93946810253, + "stage_1_gen_ms": 5016.054512932897 + } + }, + { + "seed": 771, + "elapsed_s": 58.11322023393586, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.8943441789597273, + "preprocess_ms": 2.8071929700672626, + "ar2diffusion_ms": 1.8499379511922598, + "stage_0_gen_ms": 53036.60424705595, + "stage_1_gen_ms": 5067.239572061226 + } + } + ] + } + } + ] + }, + { + "cohort": "independent_final", + "trials": [ + { + "invocation": "quality-baseline", + "result_file_sha256": "ba2e48457e25d1c5da3cff6f9e14715635ef0797b8feceeb892834dfde5d5c89", + "result": { + "quality": true, + "warmup_control": { + "seed": 107, + "elapsed_s": 79.56205469998531, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 0.9672751184552908, + "preprocess_ms": 3.1162418890744448, + "ar2diffusion_ms": 11.692315805703402, + "stage_0_gen_ms": 75203.55303981341, + "stage_1_gen_ms": 4333.143784897402 + } + }, + "latency_s": 56.88151781493798, + "images": [ + { + "seed": 42, + "elapsed_s": 56.3855838929303, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.840478042140603, + "preprocess_ms": 9.285362903028727, + "ar2diffusion_ms": 2.353732008486986, + "stage_0_gen_ms": 52243.02766285837, + "stage_1_gen_ms": 4121.08415691182 + } + }, + { + "seed": 771, + "elapsed_s": 57.37745173694566, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.9854061063379049, + "preprocess_ms": 5.845793057233095, + "ar2diffusion_ms": 1.844298094511032, + "stage_0_gen_ms": 52857.35573596321, + "stage_1_gen_ms": 4506.015880033374 + } + } + ] + } + }, + { + "invocation": "quality-candidate", + "result_file_sha256": "7f3c0c0dd0158e38e791b0f2a6d8139392038ce3bd8a3f6bbf0ec2e2d3f2e4f5", + "result": { + "quality": true, + "warmup_control": { + "seed": 107, + "elapsed_s": 71.98753125406802, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.1944009456783533, + "preprocess_ms": 2.9078759253025055, + "ar2diffusion_ms": 3.5065121483057737, + "stage_0_gen_ms": 67126.89003185369, + "stage_1_gen_ms": 4847.442376194522 + } + }, + "latency_s": 50.16225910256617, + "images": [ + { + "seed": 42, + "elapsed_s": 50.098099555121735, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.0739080607891083, + "preprocess_ms": 3.1594131141901016, + "ar2diffusion_ms": 1.938150031492114, + "stage_0_gen_ms": 45631.67848205194, + "stage_1_gen_ms": 4455.944728804752 + } + }, + { + "seed": 771, + "elapsed_s": 50.2264186500106, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.9580058977007866, + "preprocess_ms": 2.8858960140496492, + "ar2diffusion_ms": 1.9855729769915342, + "stage_0_gen_ms": 45805.93331204727, + "stage_1_gen_ms": 4407.079834956676 + } + } + ] + } + }, + { + "invocation": "measurement-001-baseline", + "result_file_sha256": "0ab516b54ac05af3bd90deff8bfdbac3518a0d21dacfc0e5d458d19173648d90", + "result": { + "quality": true, + "warmup_control": { + "seed": 107, + "elapsed_s": 81.19886039686389, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.2181827332824469, + "preprocess_ms": 2.792683895677328, + "ar2diffusion_ms": 3.3794979099184275, + "stage_0_gen_ms": 76219.72363092937, + "stage_1_gen_ms": 4966.327010188252 + } + }, + "latency_s": 59.71828023553826, + "images": [ + { + "seed": 42, + "elapsed_s": 59.025783377932385, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.130059827119112, + "preprocess_ms": 5.234556971117854, + "ar2diffusion_ms": 1.7400749493390322, + "stage_0_gen_ms": 54603.856591973454, + "stage_1_gen_ms": 4409.476750064641 + } + }, + { + "seed": 771, + "elapsed_s": 60.410777093144134, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 1.244403189048171, + "preprocess_ms": 3.463881090283394, + "ar2diffusion_ms": 1.6957148909568787, + "stage_0_gen_ms": 56104.364407015964, + "stage_1_gen_ms": 4295.82764999941 + } + } + ] + } + }, + { + "invocation": "measurement-001-candidate", + "result_file_sha256": "05bba0d3468b6da71e1f2e8a761be0790197453a0edafac5e7090b3c3b7926a3", + "result": { + "quality": true, + "warmup_control": { + "seed": 107, + "elapsed_s": 70.4818932369817, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 0.9591348934918642, + "preprocess_ms": 2.9846979305148125, + "ar2diffusion_ms": 3.5262329038232565, + "stage_0_gen_ms": 66169.72096590325, + "stage_1_gen_ms": 4299.1727609187365 + } + }, + "latency_s": 47.08355114317965, + "images": [ + { + "seed": 42, + "elapsed_s": 47.194344197167084, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 0.9495150297880173, + "preprocess_ms": 3.1485131476074457, + "ar2diffusion_ms": 1.8728692084550858, + "stage_0_gen_ms": 42775.59942402877, + "stage_1_gen_ms": 4408.562286058441 + } + }, + { + "seed": 771, + "elapsed_s": 46.97275808919221, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.9812861680984497, + "preprocess_ms": 2.8254040516912937, + "ar2diffusion_ms": 1.7472549807280302, + "stage_0_gen_ms": 42306.617981987074, + "stage_1_gen_ms": 4656.426920788363 + } + } + ] + } + }, + { + "invocation": "measurement-002-candidate", + "result_file_sha256": "16516042639f10262e98c34173ec6df757f04bfc01a967eb4fdf93d2ee9884da", + "result": { + "quality": true, + "warmup_control": { + "seed": 107, + "elapsed_s": 72.97364458395168, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.2248922139406204, + "preprocess_ms": 2.7384120039641857, + "ar2diffusion_ms": 3.333937842398882, + "stage_0_gen_ms": 68056.43451912329, + "stage_1_gen_ms": 4904.245194047689 + } + }, + "latency_s": 51.31326926406473, + "images": [ + { + "seed": 42, + "elapsed_s": 50.90791318193078, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.1285098735243082, + "preprocess_ms": 2.9649080242961645, + "ar2diffusion_ms": 1.7623559106141329, + "stage_0_gen_ms": 46073.6194010824, + "stage_1_gen_ms": 4822.948513086885 + } + }, + { + "seed": 771, + "elapsed_s": 51.71862534619868, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 1.2618640903383493, + "preprocess_ms": 3.937243949621916, + "ar2diffusion_ms": 1.7220850568264723, + "stage_0_gen_ms": 47260.52456605248, + "stage_1_gen_ms": 4446.91524701193 + } + } + ] + } + }, + { + "invocation": "measurement-002-baseline", + "result_file_sha256": "503df6e39b36bf28b334b8f15115653df16fc0891b9e5b67e6d989b9a1d67f4f", + "result": { + "quality": true, + "warmup_control": { + "seed": 107, + "elapsed_s": 79.59582186304033, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.1068200692534447, + "preprocess_ms": 2.434744033962488, + "ar2diffusion_ms": 3.356517991051078, + "stage_0_gen_ms": 75193.01381218247, + "stage_1_gen_ms": 4390.524939168245 + } + }, + "latency_s": 58.377606251393445, + "images": [ + { + "seed": 42, + "elapsed_s": 59.333581948885694, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.0586269199848175, + "preprocess_ms": 3.1103319488465786, + "ar2diffusion_ms": 1.7608169000595808, + "stage_0_gen_ms": 54369.74824103527, + "stage_1_gen_ms": 4953.564249211922 + } + }, + { + "seed": 771, + "elapsed_s": 57.421630553901196, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.9055349510163069, + "preprocess_ms": 2.7723030652850866, + "ar2diffusion_ms": 1.6970150172710419, + "stage_0_gen_ms": 53024.61535600014, + "stage_1_gen_ms": 4386.955933878198 + } + } + ] + } + } + ] + } +] diff --git a/tests/repository/test_evidence_inventory.py b/tests/repository/test_evidence_inventory.py index 57d8c92a8..428e92d3f 100644 --- a/tests/repository/test_evidence_inventory.py +++ b/tests/repository/test_evidence_inventory.py @@ -146,5 +146,5 @@ def test_checked_in_inventory(): result = validate_inventory(repo) assert result["errors"] == [] assert len(result["bundles"]) == 29 - assert result["checked_hashes"] == 513 + assert result["checked_hashes"] == 518 assert result["unavailable"] # Historical raw artifacts are not in this checkout. From db6c5ed7715ee20c587efac622511b588adca385 Mon Sep 17 00:00:00 2001 From: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> Date: Wed, 25 Nov 2026 16:17:35 +0800 Subject: [PATCH 7/7] evidence: retain native GLM-Image Q/K independent final and offline checks Agent-assisted-by: Codex (result verification and experiment reporting) Signed-off-by: amy-why-3459 <221522807+amy-why-3459@users.noreply.github.com> --- .../README.md | 19 +- .../incremental/summary.json | 20 + .../incremental/trials.json | 718 ++++++++++++++++++ .../plan/retained-sha256.json | 5 +- .../results/verify.py | 132 ++++ tests/repository/test_evidence_inventory.py | 2 +- 6 files changed, 891 insertions(+), 5 deletions(-) create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/incremental/summary.json create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/incremental/trials.json create mode 100644 evidence/glm-image-vllm-omni-910b1-20261125/results/verify.py diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/README.md b/evidence/glm-image-vllm-omni-910b1-20261125/README.md index 1613e0ead..eaa7fd427 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/README.md +++ b/evidence/glm-image-vllm-omni-910b1-20261125/README.md @@ -4,12 +4,25 @@ The performance comparison uses the public vLLM-Omni `Omni.generate` entry point The first candidate shares the position tables across local decoder layers. The incremental candidate applies the same rotation to adjacent Q/K heads. The model implementations and focused regression tests are in [vLLM-Omni #11130](https://github.com/vllm-project/vllm-omni/pull/11130). The governing [issue #668](https://github.com/InferMatrixLab/InferRSI/issues/668) records the acceptance conditions and the initial rejected baseline qualification. The [InferRSI decision-view changes](https://github.com/InferMatrixLab/InferRSI/pull/663) are pinned for the incremental round. -The original quality attempt stopped because the stock blue-cover image at seed 771 has very low contrast. The parity cohorts retain the prompt and compare its exact RGB pixels against an independently rendered stock fixture. The benchmark measures latency and preservation of engine output. It does not evaluate prompt adherence or generation quality. +The original quality attempt stopped because the stock blue-cover image at seed 771 has very low contrast. The parity cohorts retain the prompt and compare its exact RGB pixels against an independently rendered stock fixture. The benchmark measures latency and preservation of engine output. Prompt adherence remains unqualified. The incremental protocol also renders the teapot at seed 43 in both quality arms, verifies that changing the seed changes the stock RGB output, and compares all four baseline/candidate arrays. The engine hashes the RGB bytes after decoding. PNG compression and engine initialization are outside the timed interval. The source snapshots, runtime, weights, workload, output oracle and acceptance gates are recorded in `plan/`. The incremental selection and its two alternatives are in `incremental/decision.json`. The 40-layer diagnostics describe the rotary region only. -### Comparison status +### End-to-end results on two Ascend 910B1s -The direct stock-to-packed AB/BA comparison is complete at **57.58 → 49.19 s/image (14.58% less time)**. The shared-table implementation passed its independent final at 59.05 → 49.20 s/image. The incremental packed-Q/K search round passed at 50.93 → 47.97 s/image; its independent final is running. [Direct per-invocation receipts](https://github.com/InferMatrixLab/InferRSI/blob/7eb162aef0d280f2d13db34bda7c742bc736821f/evidence/glm-image-vllm-omni-910b1-20261125/results/direct-stock-packed.json). +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. + +From this evidence directory, run `python results/verify.py` to verify the saved result hashes, RGB checks, AB/BA order, summary statistics and comparison verdicts. The per-request stage times and image hashes are in `results/trials.json`, `incremental/trials.json` and `results/direct-stock-packed.json`. diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/incremental/summary.json b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/summary.json new file mode 100644 index 000000000..723c2a4f5 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/summary.json @@ -0,0 +1,20 @@ +[ + { + "cohort": "round", + "verdict": "PASS", + "baseline_s": 50.931881911703385, + "candidate_s": 47.96619558351813, + "latency_reduction_pct": 5.822848512306368, + "speedup": 1.0618286752181845, + "observation_sha256": "0058fc2ba394de2dae11b12c4528941753571cd3785aa205e55d7a5336859183" + }, + { + "cohort": "independent_final", + "verdict": "PASS", + "baseline_s": 51.98823849251494, + "candidate_s": 48.77053427445935, + "latency_reduction_pct": 6.189292638793406, + "speedup": 1.0659763987810293, + "observation_sha256": "e0e8f9ca39def0e1ca0e6a23c1d832ee219de7b807294580dabd6b19127c862b" + } +] diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/incremental/trials.json b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/trials.json new file mode 100644 index 000000000..8c3c13209 --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/incremental/trials.json @@ -0,0 +1,718 @@ +[ + { + "cohort": "round", + "verdict": "PASS", + "baseline_s": 50.931881911703385, + "candidate_s": 47.96619558351813, + "latency_reduction_pct": 5.822848512306368, + "speedup": 1.0618286752181845, + "observation_sha256": "0058fc2ba394de2dae11b12c4528941753571cd3785aa205e55d7a5336859183", + "trials": [ + { + "invocation": "quality-baseline", + "result_file_sha256": "eec3a5789c28b52d284eabed01e55b835409c0945ca64e74f6bf3bb07ecfda25", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": { + "seed": 43, + "elapsed_s": 48.43556215800345, + "sha256": "6ea2af8df2d86b2029cef035724a052438f4717b27cb7abaa581d7a2d670fad8", + "max_channel_std": 67.20111246037163, + "stage_durations": { + "queue_wait_ms": 0.9392548818141222, + "preprocess_ms": 4.216731060296297, + "ar2diffusion_ms": 1.7876469064503908, + "stage_0_gen_ms": 43650.902044028044, + "stage_1_gen_ms": 4773.870462086052 + } + }, + "warmup_control": { + "seed": 107, + "elapsed_s": 71.84000426204875, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.3155038468539715, + "preprocess_ms": 3.0166590586304665, + "ar2diffusion_ms": 9.074627188965678, + "stage_0_gen_ms": 67135.149451904, + "stage_1_gen_ms": 4685.724490089342 + } + }, + "latency_s": 50.149500274448656, + "images": [ + { + "seed": 42, + "elapsed_s": 50.294224560959265, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.250342931598425, + "preprocess_ms": 4.972471157088876, + "ar2diffusion_ms": 1.9435510039329529, + "stage_0_gen_ms": 45991.902197944, + "stage_1_gen_ms": 4289.1362379305065 + } + }, + { + "seed": 771, + "elapsed_s": 50.00477598793805, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.9573849383741617, + "preprocess_ms": 2.8839760925620794, + "ar2diffusion_ms": 1.9489009864628315, + "stage_0_gen_ms": 45056.18634982966, + "stage_1_gen_ms": 4938.493922818452 + } + } + ] + } + }, + { + "invocation": "quality-candidate", + "result_file_sha256": "296cebfcf4fb0c2fcd4438a446998e41638176238ea41d69cd4b0ba4aebc86d5", + "result": { + "quality": true, + "comparisons": { + "107": { + "max_channel_delta": 0, + "differing_pixels": 0 + }, + "42": { + "max_channel_delta": 0, + "differing_pixels": 0 + }, + "771": { + "max_channel_delta": 0, + "differing_pixels": 0 + }, + "43": { + "max_channel_delta": 0, + "differing_pixels": 0 + } + }, + "different_seed_control": { + "seed": 43, + "elapsed_s": 46.94540692795999, + "sha256": "6ea2af8df2d86b2029cef035724a052438f4717b27cb7abaa581d7a2d670fad8", + "max_channel_std": 67.20111246037163, + "stage_durations": { + "queue_wait_ms": 0.8341807406395674, + "preprocess_ms": 2.7564018964767456, + "ar2diffusion_ms": 1.7669661901891232, + "stage_0_gen_ms": 41918.79594302736, + "stage_1_gen_ms": 5017.125837039202 + } + }, + "warmup_control": { + "seed": 107, + "elapsed_s": 68.46262421901338, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 0.9285139385610819, + "preprocess_ms": 2.7487720362842083, + "ar2diffusion_ms": 3.522183047607541, + "stage_0_gen_ms": 63553.607379086316, + "stage_1_gen_ms": 4896.084822015837 + } + }, + "latency_s": 46.55018526350614, + "images": [ + { + "seed": 42, + "elapsed_s": 46.88796020997688, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.0221567936241627, + "preprocess_ms": 3.190463874489069, + "ar2diffusion_ms": 1.8228180706501007, + "stage_0_gen_ms": 41870.81674719229, + "stage_1_gen_ms": 5006.377620156854 + } + }, + { + "seed": 771, + "elapsed_s": 46.21241031703539, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 1.0183171834796667, + "preprocess_ms": 2.8713149949908257, + "ar2diffusion_ms": 1.7758971080183983, + "stage_0_gen_ms": 42017.70631596446, + "stage_1_gen_ms": 4184.952013893053 + } + } + ] + } + }, + { + "invocation": "measurement-001-baseline", + "result_file_sha256": "09703aa1e7b7504addd99c9fc4bac16e250c60fe1d4932fe0078fcebfb56bfd5", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": null, + "warmup_control": { + "seed": 107, + "elapsed_s": 72.90117507008836, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.1714610736817122, + "preprocess_ms": 2.7034010272473097, + "ar2diffusion_ms": 3.3530581276863813, + "stage_0_gen_ms": 68200.65810694359, + "stage_1_gen_ms": 4687.996495049447 + } + }, + "latency_s": 50.33014591841493, + "images": [ + { + "seed": 42, + "elapsed_s": 50.90923822694458, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 0.9626948740333319, + "preprocess_ms": 2.965637017041445, + "ar2diffusion_ms": 1.8545880448073149, + "stage_0_gen_ms": 46032.18438685872, + "stage_1_gen_ms": 4867.0491660013795 + } + }, + { + "seed": 771, + "elapsed_s": 49.751053609885275, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.8903238922357559, + "preprocess_ms": 2.829764038324356, + "ar2diffusion_ms": 1.674913801252842, + "stage_0_gen_ms": 45476.5546140261, + "stage_1_gen_ms": 4264.917303342372 + } + } + ] + } + }, + { + "invocation": "measurement-001-candidate", + "result_file_sha256": "55d77735044d8b2e769e35878cf5959ffa812b98adc0758da45ec4abd65ebe98", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": null, + "warmup_control": { + "seed": 107, + "elapsed_s": 66.44762003282085, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 0.9369438048452139, + "preprocess_ms": 2.5333561934530735, + "ar2diffusion_ms": 3.1137410551309586, + "stage_0_gen_ms": 61359.63655891828, + "stage_1_gen_ms": 5075.955098262057 + } + }, + "latency_s": 45.59479198802728, + "images": [ + { + "seed": 42, + "elapsed_s": 45.185978619148955, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.0695790406316519, + "preprocess_ms": 2.8124041855335236, + "ar2diffusion_ms": 1.59239093773067, + "stage_0_gen_ms": 40323.325011879206, + "stage_1_gen_ms": 4852.8470390010625 + } + }, + { + "seed": 771, + "elapsed_s": 46.00360535690561, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.9043943136930466, + "preprocess_ms": 2.699970966205001, + "ar2diffusion_ms": 1.553740818053484, + "stage_0_gen_ms": 41470.80514486879, + "stage_1_gen_ms": 4523.743093712255 + } + } + ] + } + }, + { + "invocation": "measurement-002-candidate", + "result_file_sha256": "4d1e779632b7982db24e766b72693756e4b476f08684dfaacea2f92bda7b4f16", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": null, + "warmup_control": { + "seed": 107, + "elapsed_s": 73.73414331511594, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.0043168440461159, + "preprocess_ms": 3.0048289336264133, + "ar2diffusion_ms": 3.535432042554021, + "stage_0_gen_ms": 69462.77579898015, + "stage_1_gen_ms": 4258.297133026645 + } + }, + "latency_s": 50.337599179008976, + "images": [ + { + "seed": 42, + "elapsed_s": 50.66310163005255, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.0218657553195953, + "preprocess_ms": 3.0792509205639362, + "ar2diffusion_ms": 1.8984791822731495, + "stage_0_gen_ms": 46163.137156981975, + "stage_1_gen_ms": 4489.413407165557 + } + }, + { + "seed": 771, + "elapsed_s": 50.0120967279654, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 1.027426915243268, + "preprocess_ms": 3.022309159860015, + "ar2diffusion_ms": 1.9070198759436607, + "stage_0_gen_ms": 45558.99944389239, + "stage_1_gen_ms": 4442.8003542125225 + } + } + ] + } + }, + { + "invocation": "measurement-002-baseline", + "result_file_sha256": "d842a0491808b14d22c20a6017ccd2c5096e4ba5c749b686774f0da4ef263122", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": null, + "warmup_control": { + "seed": 107, + "elapsed_s": 73.36647041584365, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 0.9716260246932507, + "preprocess_ms": 2.9179768171161413, + "ar2diffusion_ms": 3.3472878858447075, + "stage_0_gen_ms": 68461.18041616865, + "stage_1_gen_ms": 4892.6531590987 + } + }, + "latency_s": 51.53361790499184, + "images": [ + { + "seed": 42, + "elapsed_s": 51.45181151502766, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.0260578710585833, + "preprocess_ms": 3.06513998657465, + "ar2diffusion_ms": 1.841817982494831, + "stage_0_gen_ms": 47251.84100912884, + "stage_1_gen_ms": 4189.90529095754 + } + }, + { + "seed": 771, + "elapsed_s": 51.61542429495603, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.949435168877244, + "preprocess_ms": 2.804183168336749, + "ar2diffusion_ms": 1.74883590079844, + "stage_0_gen_ms": 46974.67045392841, + "stage_1_gen_ms": 4631.367203779519 + } + } + ] + } + } + ] + }, + { + "cohort": "independent_final", + "verdict": "PASS", + "baseline_s": 51.98823849251494, + "candidate_s": 48.77053427445935, + "latency_reduction_pct": 6.189292638793406, + "speedup": 1.0659763987810293, + "observation_sha256": "e0e8f9ca39def0e1ca0e6a23c1d832ee219de7b807294580dabd6b19127c862b", + "trials": [ + { + "invocation": "quality-baseline", + "result_file_sha256": "73ddb349bda4716665d0ab8a08c338e99680c36b80cab9662f308286a48694c9", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": { + "seed": 43, + "elapsed_s": 51.103625590913, + "sha256": "6ea2af8df2d86b2029cef035724a052438f4717b27cb7abaa581d7a2d670fad8", + "max_channel_std": 67.20111246037163, + "stage_durations": { + "queue_wait_ms": 0.8841629605740309, + "preprocess_ms": 2.7983831241726875, + "ar2diffusion_ms": 1.7579060513526201, + "stage_0_gen_ms": 46213.44392700121, + "stage_1_gen_ms": 4880.688954843208 + } + }, + "warmup_control": { + "seed": 107, + "elapsed_s": 74.24088425189257, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.1295098811388016, + "preprocess_ms": 2.7860228437930346, + "ar2diffusion_ms": 3.2737560104578733, + "stage_0_gen_ms": 69126.9292589277, + "stage_1_gen_ms": 5101.231409236789 + } + }, + "latency_s": 51.71333896298893, + "images": [ + { + "seed": 42, + "elapsed_s": 51.616225994890556, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 0.9965258650481701, + "preprocess_ms": 2.85583408549428, + "ar2diffusion_ms": 1.8858290277421474, + "stage_0_gen_ms": 46587.07159594633, + "stage_1_gen_ms": 5019.084504107013 + } + }, + { + "seed": 771, + "elapsed_s": 51.8104519310873, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.9574349969625473, + "preprocess_ms": 2.7688320260494947, + "ar2diffusion_ms": 1.8968400545418262, + "stage_0_gen_ms": 46784.232150996104, + "stage_1_gen_ms": 5016.688481206074 + } + } + ] + } + }, + { + "invocation": "quality-candidate", + "result_file_sha256": "b360bc45cd27262e7dde1e78907b52691d76d69f38ba37abf62d2cacc501d14c", + "result": { + "quality": true, + "comparisons": { + "107": { + "max_channel_delta": 0, + "differing_pixels": 0 + }, + "42": { + "max_channel_delta": 0, + "differing_pixels": 0 + }, + "771": { + "max_channel_delta": 0, + "differing_pixels": 0 + }, + "43": { + "max_channel_delta": 0, + "differing_pixels": 0 + } + }, + "different_seed_control": { + "seed": 43, + "elapsed_s": 47.450217270990834, + "sha256": "6ea2af8df2d86b2029cef035724a052438f4717b27cb7abaa581d7a2d670fad8", + "max_channel_std": 67.20111246037163, + "stage_durations": { + "queue_wait_ms": 0.8916039951145649, + "preprocess_ms": 2.7690520510077477, + "ar2diffusion_ms": 1.7183050513267517, + "stage_0_gen_ms": 42952.57713110186, + "stage_1_gen_ms": 4488.359856186435 + } + }, + "warmup_control": { + "seed": 107, + "elapsed_s": 67.91555869020522, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 0.9419729467481375, + "preprocess_ms": 2.766821999102831, + "ar2diffusion_ms": 3.386599011719227, + "stage_0_gen_ms": 63630.706982919946, + "stage_1_gen_ms": 4272.150074131787 + } + }, + "latency_s": 47.30559502192773, + "images": [ + { + "seed": 42, + "elapsed_s": 47.67919417284429, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.1065700091421604, + "preprocess_ms": 3.093661041930318, + "ar2diffusion_ms": 1.7997280228883028, + "stage_0_gen_ms": 43084.432244999334, + "stage_1_gen_ms": 4584.200670011342 + } + }, + { + "seed": 771, + "elapsed_s": 46.93199587101117, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.9425051975995302, + "preprocess_ms": 2.854113932698965, + "ar2diffusion_ms": 1.7207460477948189, + "stage_0_gen_ms": 42366.236513946205, + "stage_1_gen_ms": 4556.371069978923 + } + } + ] + } + }, + { + "invocation": "measurement-001-baseline", + "result_file_sha256": "e2f85be48311dd394a3694ec08c41fcbec7897199de8026635ee0f9a14406265", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": null, + "warmup_control": { + "seed": 107, + "elapsed_s": 73.23805671208538, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 0.9372839704155922, + "preprocess_ms": 2.893636003136635, + "ar2diffusion_ms": 3.1648229341953993, + "stage_0_gen_ms": 68083.07591406628, + "stage_1_gen_ms": 5142.581774154678 + } + }, + "latency_s": 52.334175925469026, + "images": [ + { + "seed": 42, + "elapsed_s": 53.04693541582674, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.02631701156497, + "preprocess_ms": 2.9048959258943796, + "ar2diffusion_ms": 1.8448091577738523, + "stage_0_gen_ms": 48118.58305498026, + "stage_1_gen_ms": 4917.277941247448 + } + }, + { + "seed": 771, + "elapsed_s": 51.621416435111314, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.9815250523388386, + "preprocess_ms": 2.813583007082343, + "ar2diffusion_ms": 1.825008075684309, + "stage_0_gen_ms": 46978.868072154, + "stage_1_gen_ms": 4632.891109911725 + } + } + ] + } + }, + { + "invocation": "measurement-001-candidate", + "result_file_sha256": "a899ffc71970e7a6e0ff89564120dc6d846351e5ad970d7124f00900f1eeec74", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": null, + "warmup_control": { + "seed": 107, + "elapsed_s": 70.93575152009726, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.1915010400116444, + "preprocess_ms": 2.974347909912467, + "ar2diffusion_ms": 3.1918231397867203, + "stage_0_gen_ms": 66190.3895190917, + "stage_1_gen_ms": 4732.425971888006 + } + }, + "latency_s": 49.478746631531976, + "images": [ + { + "seed": 42, + "elapsed_s": 49.4790229559876, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.0745588224381208, + "preprocess_ms": 2.987129148095846, + "ar2diffusion_ms": 1.7346448730677366, + "stage_0_gen_ms": 44598.31120003946, + "stage_1_gen_ms": 4870.52250909619 + } + }, + { + "seed": 771, + "elapsed_s": 49.47847030707635, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.8911441545933485, + "preprocess_ms": 2.7502519078552723, + "ar2diffusion_ms": 1.772165996953845, + "stage_0_gen_ms": 44851.79957607761, + "stage_1_gen_ms": 4617.205822840333 + } + } + ] + } + }, + { + "invocation": "measurement-002-candidate", + "result_file_sha256": "4ae8e3b78ba0c62e177f2a7a5d0c443d594ce3ff68a3e7e5289450cb960eb6ed", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": null, + "warmup_control": { + "seed": 107, + "elapsed_s": 70.27746673999354, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.0119660291820765, + "preprocess_ms": 3.004389116540551, + "ar2diffusion_ms": 3.4126699902117252, + "stage_0_gen_ms": 65163.980908924714, + "stage_1_gen_ms": 5100.293037015945 + } + }, + "latency_s": 48.062321917386726, + "images": [ + { + "seed": 42, + "elapsed_s": 48.32083955290727, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.0786880739033222, + "preprocess_ms": 3.0073788948357105, + "ar2diffusion_ms": 1.8700589425861835, + "stage_0_gen_ms": 43490.208097035065, + "stage_1_gen_ms": 4820.423528784886 + } + }, + { + "seed": 771, + "elapsed_s": 47.80380428186618, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 0.9117838926613331, + "preprocess_ms": 2.7940028812736273, + "ar2diffusion_ms": 1.7431559972465038, + "stage_0_gen_ms": 43222.71341714077, + "stage_1_gen_ms": 4571.672467049211 + } + } + ] + } + }, + { + "invocation": "measurement-002-baseline", + "result_file_sha256": "70b242e4caf43675c7a34a86e2f74a650713acb94ca39c08ffd30091591b5db3", + "result": { + "quality": true, + "comparisons": {}, + "different_seed_control": null, + "warmup_control": { + "seed": 107, + "elapsed_s": 71.84131533792242, + "sha256": "052f485d0761ad976359e77cad7eb61fcb22326d89a68b5d90a5597f63d40e74", + "max_channel_std": 47.931579441049166, + "stage_durations": { + "queue_wait_ms": 1.0964481625705957, + "preprocess_ms": 2.4196237791329622, + "ar2diffusion_ms": 3.2722961623221636, + "stage_0_gen_ms": 67090.1549870614, + "stage_1_gen_ms": 4738.936112029478 + } + }, + "latency_s": 51.64230105956085, + "images": [ + { + "seed": 42, + "elapsed_s": 50.91631852206774, + "sha256": "bab7c0b8242e15170a8a2cab728228ec364db1174a6c7538b4eef066b84417d2", + "max_channel_std": 35.56944368383775, + "stage_durations": { + "queue_wait_ms": 1.018195878714323, + "preprocess_ms": 2.990818116813898, + "ar2diffusion_ms": 2.732702065259218, + "stage_0_gen_ms": 45874.193642055616, + "stage_1_gen_ms": 5028.776910156012 + } + }, + { + "seed": 771, + "elapsed_s": 52.36828359705396, + "sha256": "81637be4d4decc1f3d323a0829c7f87e17a9c0b0aa8e81fb59ad5c840b36af4d", + "max_channel_std": 1.4315209881727562, + "stage_durations": { + "queue_wait_ms": 1.0596069041639566, + "preprocess_ms": 5.191565025597811, + "ar2diffusion_ms": 7.314711110666394, + "stage_0_gen_ms": 47336.68430102989, + "stage_1_gen_ms": 5005.274216178805 + } + } + ] + } + } + ] + } +] diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json b/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json index c45c9324a..c8173d84f 100644 --- a/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json +++ b/evidence/glm-image-vllm-omni-910b1-20261125/plan/retained-sha256.json @@ -1,9 +1,11 @@ { - "README.md": "f4f7ce54f883747af03852af3e03cdd22e7c5ca558916f153b1f8608b2dcadcf", + "README.md": "8fef68b8fb5465638d663552c554aeb385685d29bc7ad1cb20e0513b5b1a34b2", "incremental/criteria.md": "166eddb4c04c1d5cd8a861176ee20baa1d3e28a9f4866f5ca47d6f1d9883591e", "incremental/decision.json": "36fb5341fe8b1083428796a5746d0c11bdc8c8744bd798e32f2e36d85bbd9753", "incremental/diagnosis.md": "f07da215e9939c48cffbf38aad7760c1301ecac974f8299548359d07c8340753", "incremental/rotary-dispatch.json": "6e2a9fbf61816137be539b35c732536f6b0de00336882f67bfe12fc9b96e4b8b", + "incremental/summary.json": "57997c720b711a4b77c7689a39ef65831883d6783c8a33631e5f432a77ea5ad5", + "incremental/trials.json": "ac2132674e0457e3e1bbf9ff23c56cb14bf3d07684786ab08a38f9503bf89121", "incremental/validator/container.sh": "43363892249dc0586dc50ac36ca5a6ca4646812ac7433bc306e9c4cd750ca4b8", "incremental/validator/deploy.yaml": "75ecf5716e03215701dcb096377898d4b420ed04c59d1adbaef4c1d94eab0141", "incremental/validator/engine.py": "bd611d3b3d8b0b563005da02c56b4d49c6ca23b9c193141df9fc03eca3936d7c", @@ -28,6 +30,7 @@ "results/rotary-decode.json": "fc2dfc2822b23d75a02b4da799b1b6b5511a7ad77ce3e310dfc1186a682bb54d", "results/summary.json": "abd3caeb6170a14656c2ab140b285c2e2d1136e98275e8058cf237de11ae0667", "results/trials.json": "188b502099bd6c6bd533789c8544f422406906a06664162d8ce2f4b4dbc1ee5e", + "results/verify.py": "a7f3b9e6aa1a2951e1d5706ea1e28beb9789ca29967fffcb99eeee60508b2601", "validator/container.sh": "43363892249dc0586dc50ac36ca5a6ca4646812ac7433bc306e9c4cd750ca4b8", "validator/deploy.yaml": "75ecf5716e03215701dcb096377898d4b420ed04c59d1adbaef4c1d94eab0141", "validator/engine.py": "b6a2e88e31f6321d127fdc9b143769ddc599fe7b667c28a2771947a9acd33e5f", diff --git a/evidence/glm-image-vllm-omni-910b1-20261125/results/verify.py b/evidence/glm-image-vllm-omni-910b1-20261125/results/verify.py new file mode 100644 index 000000000..6348187ec --- /dev/null +++ b/evidence/glm-image-vllm-omni-910b1-20261125/results/verify.py @@ -0,0 +1,132 @@ +"""Recompute the two managed comparisons and the direct stock/packed measurement.""" + +import hashlib +import json +import math +from pathlib import Path +from statistics import median + +ROOT = Path(__file__).resolve().parents[1] +ORDER = [ + "quality-baseline", + "quality-candidate", + "measurement-001-baseline", + "measurement-001-candidate", + "measurement-002-candidate", + "measurement-002-baseline", +] + + +def load(path): + return json.loads((ROOT / path).read_text()) + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def read_receipt(row, reference): + data = row["result"] + raw = json.dumps(data, indent=2).encode() + require(hashlib.sha256(raw).hexdigest() == row["result_file_sha256"], "Result hash") + require(data["quality"] is True, "Quality check failed") + images = [data["warmup_control"], *data["images"]] + require([p["seed"] for p in images] == [107, 42, 771], "Image seeds") + for image in images: + require(image["sha256"] == reference[str(image["seed"])], "RGB hash changed") + value = median(p["elapsed_s"] for p in data["images"]) + require(value == data["latency_s"], "Per-invocation median") + return value + + +def compare(name, before, after, summary, baseline_key, candidate_key): + reduction = 100 * (before - after) / before + for field, value in ( + (baseline_key, before), + (candidate_key, after), + ("latency_reduction_pct", reduction), + ("speedup", before / after), + ): + require(math.isclose(summary[field], value, rel_tol=1e-10), f"{name}: {field}") + if "verdict" in summary: + require(summary["verdict"] == ("PASS" if reduction >= 3 else "FAIL"), f"{name}: verdict") + print(f"{name}: {before:.3f} -> {after:.3f} s/image ({reduction:.2f}%)") + + +def check_cohorts(cohorts, summaries, reference, packed): + require([c["cohort"] for c in cohorts] == ["round", "independent_final"], "Cohort names") + for cohort in cohorts: + phase = cohort["cohort"] + rows = cohort["trials"] + require([r["invocation"] for r in rows] == ORDER, "AB/BA order") + samples = {"baseline": [], "candidate": []} + control_hash = None + for row in rows: + step = row["invocation"] + value = read_receipt(row, reference) + if step.startswith("measurement"): + samples[step.split("-")[-1]].append(value) + elif packed: + data = row["result"] + control = data["different_seed_control"] + require( + control["seed"] == 43 and control["sha256"] != reference["42"], + "Changing the teapot seed must change its RGB bytes", + ) + if step == "quality-baseline": + control_hash = control["sha256"] + else: + require(control_hash == control["sha256"], "Changed-seed parity") + exact = { + s: {"max_channel_delta": 0, "differing_pixels": 0} + for s in ("107", "42", "771", "43") + } + require(data["comparisons"] == exact, "Per-pixel comparisons") + compare( + "packed/" + phase if packed else "shared/" + phase, + median(samples["baseline"]), + median(samples["candidate"]), + summaries[phase], + "baseline_s", + "candidate_s", + ) + + +if __name__ == "__main__": + pins = load("validator/reference.json") + require(pins == load("incremental/validator/reference.json"), "Reference changed") + check_cohorts(load("results/trials.json"), load("results/summary.json"), pins, False) + inc = load("incremental/summary.json") + check_cohorts(load("incremental/trials.json"), {r["cohort"]: r for r in inc}, pins, True) + direct = load("results/direct-stock-packed.json") + inputs = direct["inputs"] + require(inputs["receipt"] == "results/input-pins-direct.json", "Direct input receipt") + receipt = load(inputs["receipt"]) + require( + hashlib.sha256((ROOT / inputs["receipt"]).read_bytes()).hexdigest() + == inputs["receipt_sha256"], + "Direct input receipt hash", + ) + for field, reference in ( + ("baseline_revision", direct["stock_revision"]), + ("candidate_revision", direct["packed_revision"]), + ("runtime_image_id", inputs["runtime_image_id"]), + ("inferrsi_revision", inputs["protocol_inferrsi_revision"]), + ): + require(receipt[field] == reference, f"Direct input: {field}") + rows = direct["trials"] + require(all(row["phase"] == "measurement" for row in rows), "Direct timing phase") + require( + [r["arm"] for r in rows] == ["01-stock", "02-packed", "03-packed", "04-stock"], + "Direct AB/BA order", + ) + values = [read_receipt(row, pins) for row in rows] + compare( + "stock to packed", + median([values[0], values[3]]), + median(values[1:3]), + direct, + "stock_s", + "packed_s", + ) diff --git a/tests/repository/test_evidence_inventory.py b/tests/repository/test_evidence_inventory.py index 428e92d3f..604af367d 100644 --- a/tests/repository/test_evidence_inventory.py +++ b/tests/repository/test_evidence_inventory.py @@ -146,5 +146,5 @@ def test_checked_in_inventory(): result = validate_inventory(repo) assert result["errors"] == [] assert len(result["bundles"]) == 29 - assert result["checked_hashes"] == 518 + assert result["checked_hashes"] == 521 assert result["unavailable"] # Historical raw artifacts are not in this checkout.