Skip to content

Add M3 Ultra Metal inference qualification and shared charts - #122

Open
i386 wants to merge 13 commits into
codex/inference-regression-checksfrom
codex/metal-inference-qualification
Open

i386 wants to merge 13 commits into
codex/inference-regression-checksfrom
codex/metal-inference-qualification

Conversation

@i386

@i386 i386 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Stack: #165 → #121 → #122 → #124 (stack #166). This PR builds on #121 and reuses #165's report design.

Original problem

The qualification ladder covered CUDA on DGX Sparks but did not qualify the native Apple Metal engine. Maintainers can now require M3 Ultra standalone results alongside CUDA standalone/split results, with the same checks and measured-health report.

Diagnostics

The native templates, device/memory admission and metric receipts were Spark-specific. A separate platform chart implementation would omit configurations and reset existing CUDA history through whole-file fingerprints.

Fix

  • Add source-pinned M3 Ultra native builds and qualification, enforcing the actual Metal GPU, working-set limit, available memory and positive offload evidence. Native jobs receive no publishing credential.
  • Require both backend matrices. Job names identify backend, model, placement and profile.
  • Use Report inference health consistently on Hugging Face and Actions #165's shared report and 1% tolerance on Hugging Face and Actions. Every measured configuration has its own panel and baseline; latest-value tables distinguish one Spark, two Sparks and M3 Ultra Metal. Release AgentX measurements remain separate from nightly baselines.
  • Preserve existing CUDA history through 52 configuration- and workload-scoped aliases covering historical and native stage-plan recipes. The old experimental split workload retains its own series. CUDA execution settings, model inputs, corpus and trials are unchanged by the backend branch. Metal has a distinct device/workload and receives no CUDA alias.
  • Scheduled and manual protected-main nightlies run the same complete matrix and require publication. Split qualification verifies the stage-admission digest recorded by the native planner.
Run CUDA Metal Total
Labeled PR or manual smoke 7 4 11
Release 12 8 20
Scheduled or manual protected-main nightly, including smoke 19 12 31

Compatibility

No Rust/runtime ABI or Parquet schema change. Backend identity is bound to receipts and recipes. Existing CUDA baselines remain comparable only through the explicit audit; new Metal measurements establish independent series.

Validation

After the stack update to 61c827b, just ci-automation passed with Python 3.12 and the pinned publication dependencies, including all 61 Node tests and the Parquet/PNG publication tests. Workflow lint and git diff --cached --check also passed.

Passed locally on Python 3.12:

  • just automation-contracts
  • uv run --python 3.12 --with-requirements ci/inference-publish-requirements.txt -- just inference-publication-test
  • bash scripts/tests/inference-report.sh
  • node --test .github/scripts/*.test.cjs — 32 passed
  • actionlint .github/workflows/inference.yml .github/workflows/ci.yml
  • git diff --check

Contracts cover device/memory admission, backend recipe isolation, all scoped CUDA aliases, the 31-job manual nightly and multi-platform card/chart publication. No new hardware qualification ran; the source-pinned Metal pilot remains required after the protected workflow/template are active.

CI repair validation

The old native package jobs were cancelled or failed in runner setup. Re-ran the two HTTP 500 failures, then ported the process-exit cleanup fix and its three regression contracts to fresh branch heads. The probe rechecks child exit before treating a permission-denied process group as live.

SKIPPY_PYTHON=/tmp/skippy-ci-repair/automation-venv312/bin/python just automation-contracts, bash -n scripts/ci-model-fetch.sh, and git diff --check passed on macOS ARM64. Fresh package/device checks remain pending in CI. Existing incomplete feature acceptance tasks remain incomplete.

Native cache validation

The v1 shared Cargo/sccache inputs omitted the native patch recipe, allowing native artifacts from another source tree to be reused. Ported main’s source-bound dependency/extra-file identity and cold-build directory fix. Native patch edits/removals now invalidate dependency caches; Rust-only changes retain their permitted dependency reuse.

SKIPPY_PYTHON=/tmp/skippy-ci-repair/automation-venv312/bin/python just automation-contracts and git diff --check passed on macOS ARM64, including the native-cache regressions. Fresh model/device qualification is pending on the new head.

Preserved the Metal build argument, SDK identity, and absence of an NVCC probe for Metal. Five focused cache/backend contracts passed, including separate CUDA/Metal dependency keys.

Main qualification fixes — 432c841048a0fff2b9df08d0efb9fbf8ae2e3745

Refreshed the stack through current #121 and main cc2a27435e798649a9cb938d600d39722e4a2263. This incorporates separate queue/execution deadlines, formation-bound peer identity, verified native child listener ownership and control availability while preparing numerical state. Earlier failed split runs predate these fixes.

Retained the Metal-specific build, memory admission, rows and shared charts. Reconciled the executor with the shared peer-control implementation and fixed both-backend summary and report fixtures. The execution contract now changes the current CUDA recipe fingerprint: historical aliases retain their audited original identity and do not claim equivalence with the new listener/peer contract. New execution results begin a distinct comparable series.

Inference workflow before (previous PR head):

flowchart LR
  T[PR / manual / nightly] --> P[Admission and matrix]
  P --> C[CUDA rows: shared job timeout]
  P --> M[Metal rows]
  C --> S[Summary and shared charts]
  M --> S
  S --> H[Nightly publication gate]
Loading

Inference workflow after:

flowchart LR
  T[Matching PR / approved fork / manual / nightly] --> P[Protected admission and matrix]
  P --> C[CUDA rows: separate queue and execution budgets]
  P --> M[Metal rows: backend-specific admission]
  C --> E[Evidence: verified peer and listener ownership]
  M --> E
  E --> S[Summary requires successful CUDA and Metal]
  S --> H[Comparison and nightly publication gates]
Loading

Validation: SKIPPY_PYTHON=/tmp/skippy-ci-repair/automation-venv312/bin/python just ci-automation passed on the final merged tree, including 103 Node contracts, offline Python suites and shell reporting tests. git diff --check passed. All-workflow actionlint passed with two narrowly scoped exceptions for documented GitHub keys unsupported by local actionlint 1.7.12: job cache-mode and concurrency queue: max. No repository validation rule was weakened. Fresh exact-head hosted and native qualification remain pending; local offline tests do not establish model/hardware qualification.

Split preparation rendezvous repair

The follow-up to main's peer lifecycle improvements is included at b91f602e70126a231f2256cbee8c8f1655fab356. The failed #239 split attempt showed a late-starting peer remained invisible during model admission and stage planning. Control now exposes the matching formation/source/attempt in the preparing phase during those operations. Native-child readiness, listener ownership and completion evidence remain required; timeouts and qualification policy are unchanged.

Validation for this head: git diff --check, just --command env PYTHONPATH=scripts /tmp/skippy-ci-repair/automation-venv312/bin/python scripts/tests/inference_peer.py (12 tests), and SKIPPY_PYTHON=/tmp/skippy-ci-repair/automation-venv312/bin/python just ci-automation all passed. The new real-loopback regression covers both roles and both preparation operations, rejects premature readiness, and verifies cleanup on preparation failure. Exact-head hardware qualification is pending CI.

The latest stacked-parent reconciliation is 54ad82a3aa206deed9cdb806b3ba0a8d4e1b2212. Merging the current #121 head preserves the exact previously validated Metal source tree; the overlap is solely the same peer preparation fix with Metal-specific authority, memory-budget, logging and offload handling retained. git diff --cached --exit-code HEAD before the merge commit confirmed no source-tree changes, and the 12 peer regressions passed again. CI is running for the new merge head.

Acceptance criteria

  • I ran the relevant local checks, or explained why they do not apply.
  • I agree to license my contributions under the Apache License, Version 2.0.

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c77cea04-6cfe-4a0a-9a37-32bd559a622f
Commits

Reviewing files that changed from the base of the PR and between bf065ba and 54ad82a.

Files selected for processing: 36

  • .gi/templates.yaml
  • .github/scripts/inference-publication.test.cjs
  • .github/scripts/inference-schedule.test.cjs
  • .github/workflows/inference.yml
  • Justfile
  • ci/INFERENCE_QUALIFICATION.md
  • ci/README.md
  • ci/inference-comparability.json
  • docs/design/inference-qualification-examples/README.md
  • docs/design/inference-qualification-examples/main-smoke-recorded.md
  • docs/design/inference-qualification-examples/nightly-promotion.md
  • docs/design/inference-qualification-examples/nightly-regression.md
  • docs/design/inference-qualification-examples/nightly-seed.md
  • docs/design/inference-qualification-examples/pr-pass.md
  • docs/design/inference-qualification-examples/pr-regression.md
  • scripts/inference-build.py
  • scripts/inference-compare.py
  • scripts/inference-dispatch.py
  • scripts/inference-execute.py
  • scripts/inference-plan.py
  • scripts/inference-report.sh
  • scripts/lib/inference_comparability.py
  • scripts/lib/inference_inputs.py
  • scripts/lib/inference_labels.py
  • scripts/lib/inference_ladder.py
  • scripts/lib/inference_markdown.py
  • scripts/lib/inference_metal.py
  • scripts/lib/inference_nightly_metrics.py
  • scripts/lib/inference_nightly_results.py
  • scripts/tests/inference-report.sh
  • scripts/tests/inference_build.py
  • scripts/tests/inference_contracts.py
  • scripts/tests/inference_markdown.py
  • scripts/tests/inference_nightly.py
  • scripts/tests/inference_peer.py
  • scripts/tests/inference_publication.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@i386
i386 requested a review from danielwinterw November 22, 2026 01:47
@i386

i386 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Needs @danielwinterw eyes and ✝️

@i386 i386 assigned i386 and danielwinterw and unassigned i386 Nov 22, 2026

@i386 i386 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Commented at head 61c827bb54 (stacked on #121) — content follows the stack design; blocked behind the stack and one lane rerun.

The Metal qualification layer (source-pinned M3 Ultra builds, actual-GPU/memory admission, backend-scoped receipts and recipes with no CUDA aliasing for Metal, the CUDA-history-preserving alias audit) is consistent with #165's identity design, and the run-count table gives reviewers the cost picture up front. No new findings of my own at this layer.

Blockers/notes:

  • Stack order: #165 → #121 → this. #165's open CodeRabbit Major applies to the shared renderer this reuses.
  • ARM64 CUDA 13 lane failed with the same 11-22 curl 500 as #121 — infra; needs a green rerun.
  • AGENTS.md Mermaid diagrams for the workflow changes still missing on this layer.
  • mergeable_state is dirty — this layer will need a rebase when the stack underneath lands anyway.

@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Skippy Lab Qualification: Passed

Commit: 54ad82a3aa206deed9cdb806b3ba0a8d4e1b2212 · PR smoke · Workflow and timings · Saved evidence

Native Spark lab qualification.

Latest successful main: run 45835599636, attempt 1, commit f243a305f497cbe5f897fdbe384235b0a62edf3f. Comparison unavailable: workload inputs changed or could not be verified.

Configuration Outcome Prefill tok/s Prefill vs main Decode tok/s Decode vs main Actions logs
qwen35-4b-standalone Passed 3766.8 Unavailable 63.1 Unavailable Logs
qwen3-coder-30b-a3b-standalone Passed 2835.5 Unavailable 85.2 Unavailable Logs
qwen3-coder-30b-a3b-split Passed 2127.7 Unavailable 55.3 Unavailable Logs
qwen36-35b-a3b-standalone Passed 1983.6 Unavailable 61.0 Unavailable Logs
qwen36-35b-a3b-split Passed 1811.5 Unavailable 41.6 Unavailable Logs
qwen38-flash-next-standalone Passed 709.1 Unavailable 23.9 Unavailable Logs
qwen38-flash-next-split Passed 527.8 Unavailable 26.3 Unavailable Logs

TPS comes from three separate warmed, uncached probes at concurrency 1, each generating exactly 128 tokens. The scored correctness answers and each probe's 64-token warmup are excluded. Each rate is total tokens / total server-reported phase time, not an average of request rates. Client elapsed times and raw responses are retained in throughput-probe.json. These bounded samples are not sustained benchmarks or controlled speedup comparisons. Legacy short-answer receipts and missing or invalid probe evidence show as Unavailable.

Deltas use unrounded rates from matching PR-profile smoke receipts on the latest successful main run, including the nightly smoke evidence. Positive means faster. Changed workload inputs, different serving host classes, unequal phase token counts or missing evidence show Unavailable. Physical Spark placement and runtime conditions can differ; deltas are descriptive, not controlled speedup claims.

Smoke checks cover GPU startup, deterministic endpoint repeats and bounded streaming. They do not establish an AgentX performance score. Nightly history and saved performance baselines are published separately; a saved baseline can be older than the latest successful main run used here. Native build and qualification output streams into each configuration’s Actions log, with per-attempt copies in Saved evidence. Any capture gaps are reported in the log and saved diagnostics. GitHub evidence copies expire after 30 days.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants