quark-onnx-eval-runner
SkillDev toolsManually verify that the Quark ONNX skill family behaves correctly across the four contract categories (routing, planning, artifact, recovery). Use when maintainers need to confirm that ONNX routing, planning, artifact generation, or error recovery skills still work as expected. Trigger for "verify the ONNX skills", "smoke-test ONNX routing", "check ONNX skill behavior", or before tagging a release that touches `quark-onnx-*` skills. This is a governance tool for skill maintainers, not for end users running ONNX model accuracy evaluation — for the latter use the upstream Quark ONNX evaluation tooling.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the quark-onnx-eval-runner skill
What this skill tells your AI
The instructions your AI receives, as published by amd/quark in .claude/skills-impl/meta/onnx/quark-onnx-eval-runner/SKILL.md and read by ahel’s review.
Purpose
Walk a maintainer through manual verification of the ONNX skill family across the four contract
categories: routing, planning, artifact, and recovery. Run this after modifying any
quark-onnx-* skill, after a Quark ONNX upgrade, or before tagging a release.
Inputs
- The current ONNX skill files under
.claude/skills-impl/{l1-atomic,l2-workflows,l3-recipes}/onnx/ - The entry stubs under
.claude/skills/quark-onnx-* - The contract schemas under
.claude/skills-impl/shared/contracts/ - The example prompts under
examples/agent_skills/prompts/(add ONNX-specific cases as the catalog grows)
Outputs: validation_report.md
A markdown report recording per-category pass/fail and concrete evidence for each finding.
Schema: validation_report.schema.json
# ONNX Skill Verification Report
## Summary
| Category | Cases Run | Pass | Fail |
|----------|-----------|------|------|
| routing | N | N | 0 |
| planning | N | N | 0 |
| artifact | N | N | 0 |
| recovery | N | N | 0 |
## Failures
### <category> / <case name>
- **Expected**: ...
- **Got**: ...
- **Impact**: ...
- **Fix**: ...
Manual Verification Protocol
For each category below, run at least one case and record the result in the report. As ONNX
prompts are not yet enumerated in examples/agent_skills/prompts/, the cases below double as the
seed catalog — add more as the ONNX skill set grows.
1. Routing
Goal: verify that quark-onnx-router (and Claude's auto-routing via the descriptions in
.claude/skills/quark-onnx-*) maps natural-language ONNX goals to the correct downstream skill
and never silently routes ONNX requests through a torch skill.
Manual procedure:
-
Pick a user-style prompt that names a
.onnxartifact or ONNX-specific vocabulary. -
In a fresh Claude Code session at the Quark repo root, paste the prompt.
-
Observe which skill Claude invokes first.
-
Compare against the expected target skill. Examples of expected mappings:
- "Quantize my
./models/yolov8n.onnxto XINT8 for AMD NPU CNN" →quark-onnx-ptq(which loadsquark-onnx-ptq-workflow) - "Run AutoSearchPro on this
.onnxwith theXINT8_SEARCHpreset" →quark-onnx-autosearch-pro - "Analyze this
.onnx— what opset is it, is it NPU-compatible, is it already QDQ?" →quark-onnx-model-intake - "Validate my quantized
model.onnx— did QDQ insertion happen, are the non-quantized initializers byte-identical?" →quark-onnx-result-validator - "
onnxruntime-gpuimport fails,CUDAExecutionProvidernot in providers list" →quark-onnx-install(orquark-onnx-debugif the user already attempted install) - "
quantize_staticfailed with custom-op library load failure forBFPQuantizeDequantize" →quark-onnx-debug - "Is
onnxruntime-rocminstalled correctly? Show me the install matrix" →quark-onnx-install
- "Quantize my
-
Cross-backend guard: also run one negative prompt that mentions a
.onnxpath and confirm Claude does not route toquark-torch-*(e.g., "quantize./models/foo.onnxwith FP8" must not land onquark-torch-ptq).
Pass criteria: the first skill invoked matches the expected target, and no ONNX prompt is routed to a torch skill.
2. Planning
Goal: verify that quark-onnx-quant-plan produces internally consistent plans for typical
ONNX inputs and that the deployment-target gates are respected.
Manual procedure:
- Construct (or take from a prior session) a
model_analysis.jsonproduced byquark-onnx-model-intakefor a representative model (e.g., YOLOv8n exported at opset 17, Conv-heavy, 6.2 MB inline). - Hand it to
quark-onnx-quant-planwith a target preset (e.g.,XINT8) and a deployment target (e.g.,AMD NPU CNN). - Inspect the produced
quant_plan.jsonfor:presetmatches the requested presetactivation_specandweight_specare consistent with the preset (e.g., bothXInt8SpecforXINT8)EnableNPUCnn=Trueis set when the target is AMD NPU CNNuse_external_data_formatisTrueiff the model is >2 GBalgo_configis a non-empty list when CLE or AdaRound was requested or recommendedexcludeis a list (may be empty) and never contains an op the plan also quantizesrequires_confirmationis set when the plan deviates from preset defaults- Negative gate: the plan refuses incompatible combos (e.g.,
BFP16+AMD NPU CNN) rather than silently downgrading
Pass criteria: the plan validates against quant_plan.schema.json, contains no internal
contradictions, and explicitly rejects unsupported deployment-target / preset combinations.
3. Artifact
Goal: verify that ONNX workflow output artifacts conform to their JSON schemas and that the
generated standalone script + manifest produced by quark-onnx-ptq-workflow agree with each
other.
Manual procedure:
- Take the
quant_plan.jsonfrom the planning case. - Run
quark-onnx-ptq-workflowto produce arun_manifest.yamland the standalone<name>_ptq.pyscript in the user's working directory. - Validate the manifest against
.claude/skills-impl/shared/contracts/run_manifest.schema.json(use any JSON-schema validator, e.g., thejsonschemaPython package). - Spot-check that:
- All required fields are present in the manifest
- The manifest's
commandreferences the generated script path and usespython3 - The manifest's resolved
QConfigmatches the plan'spreset/algo_config/EnableNPUCnn/use_external_data_format - The generated script imports only from
quark.onnxand the standard ORT calibration API (no editing of upstreamexamples/onnx/orquark/onnx/files) - Output paths reflect any
.onnx_datasidecar when external data is enabled
Pass criteria: schema validation passes; the manifest's resolved config matches the plan; the generated script is self-contained in the user's working directory.
4. Recovery
Goal: verify that quark-onnx-debug correctly diagnoses known ONNX-side error patterns and
that handoffs to quark-onnx-install happen for runtime/provider issues.
Manual procedure:
- Pick a known ONNX error scenario. Examples:
RuntimeError: CUDAExecutionProvider not in available providersafter installingonnxruntime(CPU build) instead ofonnxruntime-gpu.- Custom-op library load failure for
BFPQuantizeDequantizeorMXQuantizeDequantize(missing C++ build, ABI mismatch). model.onnx>2 GB and the run fails with "external data not found" becauseuse_external_data_formatwas not set or the sibling.onnx_datawas not staged.- OOM during calibration on a vision model with
num_calib_data=1000andbatch_size=4. - AdaRound divergence with default learning rate.
- NPU CNN run fails because activation scales are not power-of-two.
- Present the error (full traceback) to
quark-onnx-debug. - Verify the diagnosis:
- Root cause is correctly identified
- A concrete fix command or config change is provided
- For runtime/provider issues, the skill explicitly hands off to
quark-onnx-installinstead of silently swapping execution providers - For OOM, the skill suggests the documented ladder: reduce
num_calib_data→ dropbatch_sizeto 1 → move calibration to CPU (OptimDevice="cpu") - For custom-op load failures, the skill names the expected library path / build step rather than recommending the user ignore the op
Pass criteria: the diagnosis names the actual root cause, suggests a fix that would actually
work, and respects the "never silently fall back to CPU" rule from quark-onnx-ptq-workflow.
Rules
- Run at least one case per category before any ONNX release — even small wording changes in preset names or custom-op names can shift routing or break generated scripts.
- A failing case means the skill is broken, not the procedure — investigate the skill first. Only update the expected behavior if the skill change was intentional.
- Report all results, not just failures. A clean run is positive evidence and worth recording.
- Document new cases inline in the report. As the ONNX skill set grows (e.g. new deployment target, new preset, new AutoSearchPro preset), add cases that cover the new triggers.
- Cross-backend isolation is part of the protocol. Every routing case must include a guard
that confirms ONNX requests stay on
quark-onnx-*skills.
Interaction Flow
- Select scope: which categories to verify — all four, or a subset affected by a recent change?
- Pick or write cases: start from the examples above; add ONNX prompt files under
examples/agent_skills/prompts/as the catalog grows. - Run each case manually following the protocol above in a fresh Claude Code session.
- Record results in
validation_report.mdusing the template. - Hand off failures to
quark-onnx-skill-syncif they look like upstream drift, toquark-onnx-doc-drift-checkif they look like stale user-facing facts, or directly to the affected skill's owner if it's a content bug.
Recovery
- If a case can't run because a prerequisite artifact is missing (e.g., no
model_analysis.jsonfor the planning case), report the missing producer skill and stop — do not fabricate the input. - If the ONNX custom-op binaries are not built locally, the recovery case for the custom-op load failure may produce a real failure rather than a simulated one — note this distinction in the report so future runs don't confuse genuine environment gaps with skill bugs.
- If Claude Code itself is misbehaving (ONNX skill not discovered, stub not loading), that's an infrastructure issue separate from skill quality — record it distinctly in the report.
- If an ONNX prompt routes to a torch skill (or vice versa), this is a routing-category failure and must block the release — cross-backend mis-routing produces wrong artifacts silently.
Signals
- GitHub stars
- 166
- Forks
- 33
- Last commit
- Aug 2026
Advanced
- Catalog kind
- skill
- Gateway key
quark-onnx-eval-runner- Source
- github.com/amd/quark