Make it run, make it fast: how tpu-agent-suite 0.7.0 routes onboarding, XProf triage and Pallas tuning to specialist agents, and the four checks that decide whether you should believe what they hand back.
Series: A five-part, hands-on series for PyTorch engineers moving real workloads onto Cloud TPU v6e (Trillium) and v7x (Ironwood) with TorchTPU. Part 1 builds the mental model (execution modes, memory, profiling, kernels). Part 2 runs Hugging Face Transformers v5 and Diffusers natively. Part 3 serves models in production with vLLM-TorchTPU, SGLang-TorchTPU and llm-d. Part 4 trains and post-trains at pod scale with TorchTitan, Ray and GRPO. Part 5 hands the whole workflow to the TPU Agent Suite.
This is Part 5, the capstone. Earlier: Part 1: TorchTPU Performance: Execution Modes, XProf and Pallas Kernels, Part 2: Hugging Face on TPU: Transformers v5, MoE Kernels and Diffusers, Part 3: vLLM and SGLang on TPU: Production Serving with llm-d 1.0, Part 4: TorchTitan on Cloud TPU: SimpleFSDP, Graph Trainer, Ray and GRPO.
The problem: an agent did the work, and you have to sign off on it
Over four posts you did every step of TPU bring-up yourself. You checked CPU-vs-TPU parity with cpu_vs_tpu_parity(), read an XProf trace for host syncs, planned Pallas tiles against VMEM, gated a vLLM rollout on logprob parity, and reproduced a published MFU number to two decimal places. Each of those took an afternoon the first time.
A coding agent can do the same steps in minutes. The open question is whether you should believe it. The TPU Agent Suite's own source answers that question with scars. A comment in its router skill records a long run where the agent "still executed 48 XProf invocations itself rather than delegating once". A docstring in its runtime describes "a recorded session [that] spent 33 minutes measuring, wrote no files at all, and lost every number to a context truncation four times over". Its parity reference records a deliberate 10% error in one layer that left every output token matching. None of those failures look like failures from the outside.
This post is about the machinery that turns those failure modes into checks, and about you, the reviewer, reading the hand-off. By the end you will judge an agent's TPU result the way you would judge a colleague's pull request: by the artifact, the parity verdict and the noise floor, not by the summary.
What you'll be able to do
- Explain how
tpu-agent-suite0.7.0 moves one package through a compiler, an installer and a runtime, and what each stage refuses. - Trace a request from the
tpu-agentrouter totpu-knowledge-base,tpu-model-onboarding,tpu-diagnosticsandtpu-kernel-development, and validate each payload against the suite's real JSON Schemas. - Configure a compute profile on one of five backends and predict what happens to its jobs when a session dies.
- Diagnose why an end-to-end parity check can pass a broken layer, and read a per-module parity report instead.
- Evaluate an agent's claim with four gates (schema, artifact, parity, noise floor) and decide when to step in.
- Build your own onboarding run: request payloads, budgets and gates, checked on a laptop before a chip is booked.
Setup, and what was actually run for this post
Be precise about provenance, because this whole post is about provenance. The suite runs inside a coding agent on a host with a TPU profile. We wrote this post without a TPU or an agent session attached, so nothing below is a recorded agent transcript. Here is what was run, against the 0.7.0 checkout of github.com/google-pytorch/tpu-agent-suite:
-
python3 framework/compiler.py verify package,translatefor all four targets, andlint package, with their real output quoted below. - The knowledge-base lookup script
kb_lookup.py --no-crawland the roofline scriptroofline.pyon a shipped config, both of which run on CPU. -
python3 framework/runtime.py validate --schema ...on every request payload in this post.
The walkthrough itself follows the suite's end-to-end eval brief, eval/datasets/nightly-onboard-optimize/tpu-inference-gpt-oss-20b-vllm/instruction.md, and the request and result shapes in package/schemas/. Where a value would only exist on a TPU (a per-call device time, a measured speedup), the post says so and leaves it as a placeholder rather than inventing it.
The companion code lives in code/agent_suite/ and ties the three earlier samples together:
# Every CPU-checkable step of the ladder, importing samples 01, 02 and 03. python code/agent_suite/run_workflow.py --cpu-smoke # Just validate the six request payloads against the real schemas. python code/agent_suite/run_workflow.py --validate-only # 38 CPU tests: schemas, broken payloads, journal and noise-floor rules, the driver. python -m pytest tests/test_agent_suite_workflow.py -q Part A: Grounded, bounded, checked
Google's launch video for the suite (Rob Mulla, Google Cloud Tech, October 28, 2026) frames it in two halves. "Make it run": which serving engine, does the model fit, is the output still correct. "Make it fast": is there a bottleneck, and would a custom kernel help. It also names three design choices, and they are the spine of everything below:
- Grounded. Facts about TPUs come from the knowledge base, with a source you can check.
- Bounded. "Kernel tuning runs go one attempt at a time. It records each result and stops after a certain number of attempts. Then it hands you back a table of what it tried and the best version, and the next step is your call."
- Checked. "It checks the math on the TPU against the original PyTorch model on CPU. Only then does it hand you back the endpoint."
Two scope notes before the details. The suite is a preview, and the video description says it is "currently in preview for PyTorch inference workloads". The sprint topic says "make it run, make it train, make it fast". In 0.7.0 there is no training workflow among the released agents, so "make it train" is still Part 4 by hand. And while the compiler builds for four coding agents, the README says the release works in Claude Code and Antigravity, with Codex and Cursor "coming soon".
You talk to one skill, tpu-agent, and it routes. The sprint brief names four personas for the specialists. The code names them differently, so here is the map:
| Sprint persona | Real agent (0.7.0) | Owns | Request schema | You did it by hand in |
|---|---|---|---|---|
| Setup / Librarian | tpu-knowledge-base | cited TPU facts | kb-request.json | Part 1 (spec table, ridge points) |
| Migration / Onboarding / Architect | tpu-model-onboarding (delegates CUDA rewrites to tpu-unwiring) | bring-up, serving, parity | onboarding-request.json | Parts 1 and 3 (parity gates) |
| Reliability / Diagnostics / Mechanic | tpu-diagnostics | capturing and reading XProf | profiling-request.json | Part 1 (XProf, host syncs) |
| Performance Tuning / Specialist | tpu-kernel-development (one kernel-worker per iteration) | Pallas kernels, autotuning | kernel-request.json | Part 1 (Pallas, tile planning) |
The "Setup" half of the first persona is not an agent at all: compute setup is a guided compute setup plan | apply | verify flow that the router is allowed to run with you (Part D).

The release build composes exactly these agents plus analyze-cuda-reference, which kernel-worker calls when you supply a CUDA kernel as a reference. Every other agent file in the repository is unreachable and does not ship.
That caption is checkable. python3 framework/compiler.py compose package on 0.7.0 lists the composed agents as tpu-model-onboarding, tpu-kernel-development, tpu-diagnostics, tpu-knowledge-base, tpu-unwiring, kernel-worker, analyze-cuda-reference, tpu-agent, and lint warns about the rest, for example agents/tpu-roofline.md is not reachable from any released skill and will not ship. Remember that line. It matters in Step 4.
Part B: One package, four stages
The content plan for this post called it a "4-stage agent compiler". The code is more precise: the compiler is one stage of a four-stage pipeline (docs/design/framework.md), and each stage is the cheapest place to catch a different mistake.

A delegation cycle is free to find in CI and expensive to find in your session. A file collision is invisible in CI and obvious on your machine. Each stage sees what the previous one cannot.
| Stage | Runs | What it guarantees (from docs/design/framework.md) |
|---|---|---|
| Package | the repository | skills, agents, references, scripts, schemas, data |
| Compiler | CI or the author's machine | delegation has no cycles, is at most 3 levels deep and reaches every agent; every tool is declared; every named file exists; prose names package files only through tokens; every requirement is pinned; only a skill can ask the user |
| Installer | your machine | never overwrites a file it did not add or a setting you already have; the target's version is one the package supports |
| Runtime | every session | each request matches the callee's accepts schema and each result its produces schema; a completed result points to an artifact; no path escapes its root |
framework/compiler.py has five commands: compose, verify, lint, translate and archive. make verify runs the knowledge-base validator and then compiler.py verify package. On the 0.7.0 checkout both pass:
$ python3 package/data/knowledgebase/scripts/validate_kb.py ✅ Knowledge Base is valid (94 pages cataloged in index.md, log entries well-formed). $ python3 framework/compiler.py verify package Successfully verified! make build then translates the same package once per target. We ran each translate into a scratch directory. The comments are the file counts of each build, and the warnings are the compiler's own (excerpt):
$ python3 framework/compiler.py translate package --harness claude-code --output dist/claude-code/tpu-agent-suite # 399 files $ python3 framework/compiler.py translate package --harness antigravity --output dist/antigravity/tpu-agent-suite WARNING: Skill 'tpu-agent' declares tools ['ask', 'read', 'write'], but harness 'antigravity' cannot enforce tool restrictions on skills. All tools will remain available. # 388 files $ python3 framework/compiler.py translate package --harness codex --output dist/codex/tpu-agent-suite WARNING: harness codex delegates to ['tpu-diagnostics', 'tpu-kernel-development', 'tpu-knowledge-base', 'tpu-model-onboarding'] but its delegation tool is unverified; the generated contract cannot name how to delegate. # 389 files $ python3 framework/compiler.py translate package --harness cursor --output dist/cursor/tpu-agent-suite WARNING: Skill 'tpu-agent' declares tools ['ask', 'read', 'write'], but harness 'cursor' cannot enforce tool restrictions on skills. All tools will remain available. # 380 files 
Read the warnings, not just the file counts: only the Claude Code build enforces the router's tool limit with a hook, which is one concrete reason Codex and Cursor are still "coming soon".
The translation does two things you should know as a reviewer. It expands tokens: an author writes {{runtime}} and {{script:tpu-model-onboarding/compare_parity.py}}, and the build writes absolute paths into the installed package, for example python3 ~/.tpu-agent-suite/packages/tpu-agent-suite@0.7.0/framework/runtime.py. And it appends a generated execution contract to every agent prompt, written from the agent's frontmatter, so the instructions cannot drift from the schemas. The contract in the built tpu-diagnostics.md begins its compute section with a rule worth quoting: "Whenever you need to interact with TPU or compute, execute via python3 ~/.tpu-agent-suite/packages/tpu-agent-suite@0.7.0/framework/runtime.py compute --package tpu-agent-suite@0.7.0. Every job, server, log and port-forward goes through it. Don't run kubectl, ssh, scp, xpk or gcloud compute yourself, not even to read."
Installing is one command per workspace, and uninstalling is exact because ownership.json records every file, config key and memory block the installer added:
python3 tpu-agent-suite-<harness>-<version>/framework/installer.py install --destination /path/to/project python3 tpu-agent-suite-<harness>-<version>/framework/installer.py install --scope user # every project python3 ~/.tpu-agent-suite/packages/tpu-agent-suite@0.7.0/framework/installer.py uninstall --destination /path/to/project A workspace holds one package. The experimental build (make build-experimental, package.experimental.json) is a complete package with eleven extra skills, so you install it instead of the release, never beside it.
Part C: Five invariants, and exactly where each one is enforced
The content plan lists five load-bearing rules. All five are real, but "CI-enforced via make verify" is too coarse: they are enforced at different stages, by different code, and two of them are weaker on some targets. Here is each one with its enforcement point and the failure it exists to prevent.
| Invariant | Enforced by | Where | The failure it prevents |
|---|---|---|---|
| 1. The router never executes | tpu-agent declares tools: [read, write, ask]; the record-active-skill and enforce-skill-tools hooks deny any other tool on the main thread | runtime, framework/runtime.py::_builtin_skill_tools | a router that "still executed 48 XProf invocations itself rather than delegating once" |
| 2. Only skills ask the user | compiler.py verify raises if any agent declares ask; agents return status: "needs_input" instead | compiler | a question raised by a subagent "reaches nobody", because its caller is blocked |
3. Only tpu-diagnostics touches XProf | lint checks xplane-access (scripts importing xplane_pb2 and friends) and xprof-outside-analyst (prompts calling xprof get_*) | compiler.py lint, required by the ci-gate job | a script that parses .xplane.pb itself "re-implements metrics the CLI already computes, drifts from them silently" |
| 4. Package paths only through tokens | reject_plain_package_paths in verify | compiler | prose that names a package file by a literal path, which only the token expansion turns into the installed location |
| 5. Results point at durable, measured evidence | check_completed_has_artifact and check_status_payload on every SubagentStop; study.py gates on noise floor, replicates and same-execution | runtime | "a recorded session spent 33 minutes measuring, wrote no files at all" |
Three corrections to the plan's version of these rules, each from the code:
- Rule 1 is a hook on Claude Code only.
SKILL_TOOL_RESTRICTIONincompiler.pymarksclaude-codeashookand the other three asunenforced. The router's own frontmatter comment says Antigravity enforces the list through the router's agent definition, and that on Codex "the rule rests on the prompt, not on the tool list". One exception is deliberate:_is_setup_command()lets the router runruntime.py compute setup ...andruntime.py config ..., because only the main thread can ask you setup questions. - Rule 3 lives in
lint, notverify. The Makefile callslintadvisory, but.github/workflows/ci.ymllists thelintjob among the five theci-gaterequires, so in CI it does block a merge. On 0.7.0,compiler.py lint packageprintsNo findings!(plus 226 warnings about files no released skill reaches). - Rule 5 checks presence, not existence.
check_completed_has_artifact()requires acompletedresult to carry a non-emptyartifactslist, and only for result schemas that declareartifacts. It does not open the files. That is your job, and it is the first thing to do with any hand-off.
One more knob to know so you never set it: any non-empty TPU_AGENT_SUITE_DISABLE_SCHEMA_VERIFIERS (or the DISABLE_SCHEMA_VERIFIERS constant in a built runtime.py) turns off the validate-schema hook on both sides of a delegation. The master cheatsheet names the variable without its prefix. The code wins.
You can run the runtime's validator yourself, which is how this post's payloads were checked:
$ python3 framework/runtime.py validate --schema package/schemas/kernel-request.json code/agent_suite/requests/05-kernel-request.json $ echo $? 0 $ echo '{"prompt": "x"}' > bad.json $ python3 framework/runtime.py validate --schema package/schemas/profiling-request.json bad.json $/run_id: required property is missing $ echo $? 2 Part D: Where things run: one command family, five backends
Every agent reaches hardware through runtime.py compute, so no prompt reimplements SSH, kubectl or file staging. The profile in .tpu-agent-suite/environment.json picks one of five drivers (framework/compute/drivers/).

The agents' instructions name commands, never backends. Switching from a TPU VM to a GKE Job is a profile change, not a prompt change.
| Backend | Target | Required settings | Serves an endpoint? |
|---|---|---|---|
local | the coding agent runs on the TPU VM | none | yes |
gce_tpu_vm | a Cloud TPU VM over gcloud ... ssh | tpu_name, zone, project | yes |
gke_pod | kubectl exec into a running TPU pod | pod | yes |
gke_job | a single-host TPU Job, optionally through Kueue | image, tpu_accelerator, tpu_topology | yes |
gke_xpk | multi-node workloads via xpk | cluster_name, zone, project | no (no synchronous run, no port forward) |
The commands you will see in every agent transcript:
R="python3 $HOME/.tpu-agent-suite/packages/tpu-agent-suite@0.7.0/framework/runtime.py compute --package tpu-agent-suite@0.7.0" $R setup plan --backend gke_job --json # questions with suggested answers $R setup apply --profile default --answers '{"backend": "gke_job", "image": "<your image>", "tpu_accelerator": "tpu-v6e-slice", "tpu_topology": "2x2"}' $R setup verify --profile default --smoke-test $R inspect --json # accelerator, job_devices, hbm_gb_per_device $R preflight --json # tools, credentials, target reachable $R versions --json # jax, jaxlib, libtpu, torch, torch_tpu on the target $R submit --recipe launch_vllm.sh --serve --name gpt-oss-serve -- --port 8000 $R job wait --job-id <id> --until "log:Application startup complete" --timeout 540 $R port-forward --port 8000:8000 --job-id <id> --background $R job reap --include-serving Four operational details decide what happens to your chips, so learn them before the first run:
- Staging.
gke_jobships--inputfiles in a ConfigMap up to 900 KiB (CONFIGMAP_MAX_BYTES = 900 * 1024) and returns logged output up to 1 MiB. Anything larger needs astaging_bucket, reached through GCS V4 signed URLs. - Chipless planning. A
gke_jobsubmitted with--cpu-requestsbooks a CPU node, not a TPU node, and setsTPU_AGENT_SUITE_CHIPLESS_TPUto the profile's TPU generation (v6e,tpu7x, ...). Onboarding preflight uses it throughchipless_tpu.pyto answertorch_tpu's device questions without holding a chip. A run that exits 75 is retried once on a TPU node. - Reaping. A
SessionEndhook cancels the run's active jobs. If the session is killed instead (noSessionEnd), a lease watcher cancels them afterLEASE_GRACE_SECONDS = 120inframework/compute/lease.py. The plan called thisTPU_AGENT_SUITE_LEASE_GRACE_SEC=120. There is no such environment variable in 0.7.0, it is a constant. - Serving is the exception. Jobs submitted with
--serveare exempt from reaping, so an endpoint outlives the session that started it. Cancel it yourself withcompute job cancel, orcompute job reap --include-serving.
Part E: The walkthrough: onboard, gate, profile, model, tune
The brief is the suite's own end-to-end eval task for openai/gpt-oss-20b (20.2B total, about 4B active): serve it with vLLM on torch_tpu, sweep 1k/1k and 8k/1k at doubling concurrency, capture an XProf trace at peak concurrency, write a Pallas kernel for the top operator, pass parity "L∞ ≤ 1e-2, L2 ≤ 1e-3, zero NaNs/Infs", autotune "across at least 3 distinct tile shapes", integrate it into the serving process, and show at least 10% more output throughput on the bottleneck regime. The brief also says the thing every agent brief should say: "A truthful partial result is worth more than a claimed success."
The repository ships no recorded transcript of that task, so what follows is the protocol the suite runs, with request payloads that validate against the real schemas (they are in code/agent_suite/requests/), real output where a step runs on CPU, and placeholders where only a TPU can produce the number.

A walkthrough of the protocol, not a recorded session: the schemas, the hook names and the denial message are the real ones. The statuses on the way back are examples of what each result carries.
Step 1: the Librarian answers with a source, or says it has none
Before it delegates any onboarding, the router follows references/tpu-agent/query-understanding.md: record the ask, pin the model id, ask the knowledge base every fact the plan turns on in one request, then show you a plan and wait. The plan approval in the launch video happens here, in the router, because tpu-model-onboarding cannot ask you anything.
The knowledge-base request is small. Its schema is closed (additionalProperties: false) and requires only query:
{ "query": "vmem, pallas-double-buffer: how much VMEM one TensorCore has on TPU v7x and v6e, the default scoped VMEM limit a Pallas kernel compiles against, and whether Pallas double-buffers every BlockSpec input and output", "allow_crawl": false, "run_id": "20261130T120000Z-5a0e7c3b9d21" } The agent itself "holds no knowledge" (its own prompt says so): it runs kb_lookup.py with the keys and returns the JSON. We ran that script offline with the same two keys and --no-crawl, which is what allow_crawl: false maps to. This is its complete, unedited result, saved as code/agent_suite/results/kb-result.offline.json:
{ "status": "cited-only", "summary": "vmem, pallas-double-buffer: nothing kept to serve. 2 url(s) cited but not read, because crawling was off: pallas-tpu-details, pallas-pipelining. Nothing on them is established.", "sources": [], "references": [ {"url": "https://docs.jax.dev/en/latest/pallas/tpu/details.html", "authority": "vendor-docs"}, {"url": "https://docs.jax.dev/en/latest/pallas/tpu/pipelining.html", "authority": "vendor-docs"} ], "matched": ["vmem", "pallas-double-buffer"], "suggestions": {}, "unmatched": [], "not_read": [ {"source": "https://docs.jax.dev/en/latest/pallas/tpu/details.html", "entry": "pallas-tpu-details", "keyword": "vmem"}, {"source": "https://docs.jax.dev/en/latest/pallas/tpu/pipelining.html", "entry": "pallas-pipelining", "keyword": "pallas-double-buffer"} ] } Predict, then check. Both keys matched. Is the VMEM question answered? No. cited-only means the catalog knew where to look and read nothing, and the agent's instructions say to "say nothing on them is established". The other statuses to recognize: cached and partial served pages, near served nothing and offers suggestions that are wrong "about a third of the time", and uncited means "the answer came from the model alone". A reviewer who sees a VMEM number next to a cited-only or uncited status should treat it as unverified.
run_workflow.py applies exactly that rule and prints Part 1's offline table next to it, labelled as what it is:
result.status: cited-only matched=['vmem', 'pallas-double-buffer'] unmatched=[] established by the KB in this run: False Sample 01's offline table (hand-checked in Part 1, not a KB answer): TPU v6e 32.0 GiB/device 918.0 bf16 TFLOP/s ridge 560 FLOP/B TPU v7 96.0 GiB/device 1153.5 bf16 TFLOP/s ridge 313 FLOP/B For the VMEM figures the kernel step needs, this post uses a page the suite ships as a measured reference, references/write-tpu-kernels/hardware-facts.md (TPU v7x, jax 0.10.2, libtpu 0.0.44.1): 64 MiB of VMEM per TensorCore ("there is no 128 MiB of VMEM" on that chip), and a default scoped limit of 32 MiB that pltpu.CompilerParams(vmem_limit_bytes=...) can raise.
Step 2: the Architect brings the model up, then checks the math

The order matters: the parity check sits between "it answers" and "here is your endpoint", because a server that starts and produces fluent text can still compute the wrong thing.
From the confirmed plan, the router writes the onboarding request. For an "onboard, then optimize" ask its instructions are specific: delegate only the baseline, with mode: "inference", and never let onboarding proceed to tuning.
{ "prompt": "Onboard openai/gpt-oss-20b (https://huggingface.co/openai/gpt-oss-20b) as a vLLM inference server on Cloud TPU with the torch_tpu backend, in serving mode. Run the numerical parity check against the model's own PyTorch path on CPU before reporting the endpoint. Baseline only: do not tune. Return output_files.deployments_json and output_files.launch_recipe.", "run_id": "20261130T120000Z-5a0e7c3b9d21", "model": {"model_id": "openai/gpt-oss-20b", "task": "text-generation"}, "mode": "inference", "checkpoint_bucket": "gs://your-bucket/tpu-agent-checkpoints" } tpu-model-onboarding then follows the checklist in references/tpu-model-onboarding/torch-tpu-inference.md, step by step:
- Step 0.1, hardware.
compute inspectforjob_devicesandhbm_gb_per_device. A v7x chip is two devices of 96 GB, so a 2x2x1 Job has 8 devices, not 4. Size tensor parallelism to that (the same trap Part 4's MFU section warned about). - Step 0.2, preflight.
preflight_check.pyand the vLLM engine compatibility check. If the model hard-wires CUDA kernels, preflight reportsONBOARDING_REQUIREDand Step 0.3 delegates the rewrite totpu-unwiring. - Step 1, the engine. vLLM when the architecture is supported (or patchable from a playbook). Otherwise "Automated Fallback to Native PyTorch", the
custom_fastapiengine ontorch_tpu, chosen "without asking the user". - Steps 2 and 3, deploy. Write
launch_vllm.shorfastapi_server.py, submit (with--serveonly in serving mode), wait withjob wait --until "log:WEIGHTS READY"and then--until "log:Application startup complete", never a sleep loop, and stop after two resubmissions. - Step 4, parity. "MANDATORY before concluding the model works."
- Steps 5 to 6. One test request, the benchmark if asked, then the hand-off.
The parity step is the heart of "checked", so look at what it does. capture_parity.py builds one frozen probe, runs the model twice on it teacher-forced (one forward pass over a fixed token sequence, so one flipped token cannot cascade), once as the reference on CPU in the model's own plain-PyTorch path with no patches, once as the candidate on the TPU. Forward hooks capture the modules the patches replaced. compare_parity.py then grades each tensor by max_rel, the largest absolute difference divided by that tensor's own peak magnitude, against DEFAULT_REL_TOLERANCE = 0.05. The comment above that constant explains the number: on mamba-130m, CPU bf16 against TPU v6e bf16 with identical code, "device noise alone reached 2.92% at layer 23 and 3.09% on the logits", while a deliberate 10% error in one layer read 10.85%.
This is the same idea as Part 1's cpu_vs_tpu_parity() and Part 3's verify_cpu_vs_tpu_serving_parity(), one level deeper. The driver runs all three.
Predict, then check. Take Part 1's TinyTransformerBlock(256, 4). Reference in fp32 on CPU, candidate in bf16 (a stand-in for device rounding), and then multiply the candidate's fc1 weight by 1.10. Does a check on the block's final output catch it at a 5% tolerance?
$ python code/agent_suite/run_workflow.py --cpu-smoke --steps onboard (excerpt) (a) module parity, fp32 CPU reference vs bf16 candidate, tolerance 5% max_rel module clean fc1 +10% norm1 0.40% 0.40% qkv 0.33% 0.33% proj 0.36% 0.36% norm2 0.63% 0.63% fc1 0.39% 10.01% <- breach fc2 0.52% 12.59% <- breach output 0.57% 2.23% clean: PASS fault: FAIL (first breach: fc1); output-only check on the fault: PASS (b) cpu_vs_tpu_parity on cpu: passed=True, 12 tensors (outputs + grads), max_abs=0.00e+00 (c) serving parity gate: bf16 endpoint PASS (57 tokens, max |dlogp| 0.0148); with LM-head bug FAIL (max |dlogp| 0.1238) 
The residual connection dilutes the fault to 2.2% at the output, under tolerance. Only the per-module rows catch it, and the first breach in forward order names the layer to fix.
It does not. The residual stream dilutes a 10% error in the MLP to 2.23% at the block output, under the 5% line, which is the same effect the suite's own measurement recorded. That is why the real script hooks modules, and why its reference tells you to "name the module with the highest max_rel ... That module is where to look." Notice one refinement in this example: the highest row is fc2 (12.59%), downstream of the fault, because errors compound as they flow forward. Read the rows in execution order and open the first breach, which is fc1. Two more limits the reference states plainly, which you should carry into every review: below roughly 3%, a wrong rewrite is "indistinguishable from device noise", and UNVERIFIED is not a weak pass. It means the model had no independent plain-PyTorch path, both sides ran the same rewritten code, and "the check could not be performed".
Line (b) is a reminder about what a laptop can prove: with no TPU, cpu_vs_tpu_parity() compares CPU with CPU, which checks the plumbing and nothing else. Line (c) is Part 3's gate run against a local mock endpoint serving a bf16 copy of a tiny LM. It passes the clean candidate and fails the 10% LM-head bug.
The hand-off is onboarding-result.json. Three fields matter downstream: parity_verdict (one of PASS, FAIL, UNVERIFIED, not_run), and output_files.deployments_json and output_files.launch_recipe, which the router passes verbatim to every later specialist as serving_config. One inconsistency inside the suite is worth knowing: the inference checklist calls parity mandatory, while numerical-parity.md calls it mandatory only after ONBOARDING_REQUIRED and optional otherwise. Ask for it in your prompt, as the request above does.
Step 3: the Mechanic measures before anyone optimizes
The router has a "mandatory profiling gate": it may not dispatch any optimization until tpu-diagnostics has captured the running baseline and returned ranked levers. The request points at the live server and its configuration, never at a restart:
{ "prompt": "Profile the running gpt-oss-20b server at the peak-throughput point of the 8k/1k baseline sweep, the prefill-heavy regime, and rank the bottlenecks for time to first token and output throughput. Report hot ops with their fusion context and call shapes, and say which devices the trace covers.", "run_id": "20261130T120000Z-5a0e7c3b9d21", "server": { "job_id": "golden-gpt-serve-baseline", "port": 8000, "load": "random prompts, input 8192 tokens, output 1024 tokens, at the sweep's peak concurrency, prefix caching off", "serving_config": { "deployments_json": "/home/you/.tpu-agent-suite/runs/20261130T120000Z-5a0e7c3b9d21/artifacts/tpu-model-onboarding/inference/deployments.json", "launch_recipe": "/home/you/.tpu-agent-suite/runs/20261130T120000Z-5a0e7c3b9d21/artifacts/tpu-model-onboarding/inference/launch_vllm.sh" } }, "fields": ["duty_cycle_percent", "mxu_utilization_percent", "step_time_ms"], "top_ops": 10 } Every trace in the profiling-result carries metrics (each with the XProf tool it came from), coverage (which devices actually carry op events), hot_ops (fusion, call shapes, per-call time) and levers, biggest first. A lever's kind is one of nine causes: kernel-block, exposed-collective, sharding-overhead, load-imbalance, host-critical-path, recompilation-padding, scheduler-batching, memory-capacity, other. You met most of them by hand: host-critical-path is Part 1's host sync, recompilation-padding is Part 1's per-token recompile and Part 3's buckets, exposed-collective is Part 4's FSDP all-gather. The ranking follows the metric you name: levers are ranked on decode "unless the caller asked about time to first token", which is why this request names TTFT for the prefill-heavy regime. Here is the shape of the top lever a run like this would hand back, as a skeleton of the schema rather than a result (the numbers exist only after a capture):
levers[0]: kind: ...