quark-onnx-shapeshifter-run
Apply existing ShapeShifter graph passes to an .onnx model via the quark-cli shapeshifter CLI or a ShapeShifter YAML.
Skill by amd
Chalk Labs
Need help deploying quark-onnx-shapeshifter-run?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/amd-quark-onnx-shapeshifter-run-1e49b4
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: ml
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
quark-onnx-shapeshifter-run- Description
- Apply existing ShapeShifter graph passes to an .onnx model via the quark-cli shapeshifter CLI or a ShapeShifter YAML. Trigger for "run ShapeShifter on my .onnx", "apply an onnx_ pass", "fold batch norm / simplify / convert opset / fuse LayerNorm on my ONNX model", "preprocess my .onnx before quantization", "postprocess my quantized .onnx for XINT8/NPU". Operates on .onnx only. NOT authoring a new pass (use quark-create-shapeshifter-pass), NOT full quantization (use quark-onnx-ptq), NOT PyTorch models.
- License
- MIT
- Instructions
- 133 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- evals.json · evals/
SKILL.md (first lines)
# quark-onnx-shapeshifter-run
## Purpose
Apply one or more **existing** ShapeShifter ONNX passes to an `.onnx` model by authoring a
ShapeShifter YAML config and running the `quark-cli shapeshifter` CLI. ShapeShifter is Quark's
pass-based graph-transformation framework; this skill covers *invoking* its built-in `onnx_*`
passes (fold BatchNorm, simplify, convert opset, fuse LayerNorm/GELU, align scales, XINT8/NPU
adaptation, etc.) as a standalone file→file transform — separate from authoring a new pass
(`quark-create-shapeshifter-pass`) and from a full quantization run (`quark-onnx-ptq`). It exists so
graph preprocessing/postprocessing can be run and inspected on its own, and so the driving YAML is
a reusable, reviewable artifact.
## Inputs
- **Required**: path to an `.onnx` model (optionally with an adjacent `.onnx_data` external-weights
file).
- **Required**: the pass(es) to apply and their config keys. If the user names an effect ("fold
batch norm") rather than a pass name, map it to the pass via the catalog in
`docs/source/quark_shapeshifter_onnx_passes.rst`.
- **Required**: an output `.onnx` path.
- **Optional**: whether these are preprocessing (float model) or postprocessing (quantized Q/DQ
model) passes — affects which passes are valid and the recommended order.
## Outputs: shapeshifter_config.yaml
The primary artifact is the ShapeShifter YAML config that drives the run — reusable and reviewable.
Side effect: the transformed model written to the user's output `.onnx` path.
```yaml
input_model_path: /path/to/model.onnx
passes:
onnx_convert_opset_version:
target_opset_version: 21
onnx_simplify:
simplify: true
onnx_fold_batch_norm:
fold_batch_norm: true
output_model_path: /path/to/model_out.onnx
```
No JSON schema — this is a ShapeShifter CLI config (see `quark/shapeshifter/utils.py`), not a
cross-skill contract artifact.
## Interaction Flow
1. **Intake** — confirm the input `.onnx` path exists, capture the requested transformation(s) and
the output path. Map effect words to concrete pass names.
2. **Route** — verify every requested pass is an ONNX pass (`onnx_*`) and exists in
`quark/shapeshifter/passes/`. If the user asked to *create* a pass, hand off to
`quark-create-shapeshifter-pass`; if they asked to *quantize*, hand off to `quark-onnx-ptq`.
3. **Plan** — present the YAML config (pass order + config keys) before writing. Confirm the config
key for each pass (many passes are a silent no-op without their enable flag — see Recovery).
4. **Confirm** — get approval before running the CLI (it writes the output file).
5. **Execute or Summarize** — write `shapeshifter_config.yaml`, run the CLI, then verify the output
model loads and the transformation took effect. Summarize what changed.
## Invoking the CLI
Write the YAML (see Outputs), then:
```bash
quark-cli shapeshifter shapeshifter_config.yaml
```
The CLI loads the model, runs each pass **in the order listed** (each on the previous pass's
output), and writes `output_model_path`. JSON configs also work. An explicit model config is
equivalent to the flat form and clearer when in doubt:
```yaml
input_model_config:
model_type: onnx # discriminator
input_model_path: /path/to/model.onnx
passes: { ... }
output_model_path: /path/to/model_out.onnx
```
## Pass Selection
Full catalog + config keys: `docs/source/quark_shapeshifter_onnx_passes.rst`. Common choices:
| Intent | Pass | Config key |
|--------|------|-----------|
| Constant-fold / clean graph | `onnx_simplify` | `simplify: true` |
| Upgrade opset | `onnx_convert_opset_version` | `target_opset_version: 21` |
| Fold BatchNorm into Conv/Gemm | `onnx_fold_batch_norm` | `fold_batch_norm: true` |
| Fuse LayerNorm / GELU | `onnx_fuse_layer_norm` / `onnx_fuse_gelu` | `fuse_layer_norm: true` / `fuse_gelu: true` |
| Layout NCHW→NHWC | `onnx_convert_nchw_to_nhwc` | `convert_nchw_to_nhwc: true` |
| Cross-layer equalization | `onnx_cross_layer_equalization` | `cross_layer_equalization: true` |
| Align Q/DQ scales (quantized) | `onnx_align_scale` | `align_scale: [Concat, MaxPool]` |
| XINT8/NPU adapt (quantized) | `onnx_xint8_adjust` / `onnx_xint8_simulate` | `xint8_adjust: true` / `xint8_simulate: true` |
**Preprocessing** passes run on the **float** model (before quantization); **postprocessing**
passes (`onnx_align_scale`, `onnx_adjust_bias_scale`, `onnx_xint8_*`, bfloat16 passes) expect a
**quantized Q/DQ** model. Do not run postprocessing passes on a float model.
**Ordering tip:** put opset conversion and `onnx_simplify` first (some fusions require a newer
opset and a cleaner graph), then folding/fusion, then per-node initializer passes.
## Relationship to quantization
If the goal is to run these passes **as part of** quantization rather than standalone, they can be
driven from the quantizer instead via `extra_options={"ShapeShifterYaml": "config.yaml"}` with
`preprocess_passes:` / `postprocess_passes:` groups — that path belongs to `quark-onnx-ptq`. Use
this skill only for the standalone file→file transform.
## Recovery
- **Pass ran but nothing changed (silent no-op)** — most passes require their enable flag; e.g.
`onnx_convert_clip_to_relu` needs `convert_clip_to_relu: true`. A missing/`false` flag logs a
warning and returns the model unchanged. Re-check the config key against the docs.
- **`Pass '<name>' is not registered`** — misspelled pass name or a `pytorch_*` name. List valid
names with `ls quark/shapeshifter/passes/`; this skill is ONNX-only.
- **`ValueError: ... is not an ONNX pass`** — a `pytorch_*` pass slipped into the config. All passes
in one run must be ONNX.
- **Postprocessing pass errors on a float model** — `onnx_align_scale` / `onnx_xint8_*` need a
quantized Q/DQ model. Quantize first (`quark-onnx-ptq`), then apply.
- **CLI errors / onnxruntime traceback** — hand off to `quark-onnx-debug` with the exact message.
- **Output opset too low for a fusion** — `onnx_fuse_gelu` (opset ≥ 20) and `onnx_fuse_layer_norm`From amd/Quark, MIT.
More from amd/Quark
- 0.684score
quark-skill-creator
amd
Author or restructure a Quark Agent Skill so it conforms to this project's template, contracts, and layer rules.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-torch-llm-eval
amd
End-to-end LLM accuracy evaluation on AMD ROCm (ROCm-only) — container setup, vLLM/SGLang/ATOM serving, lm-eval / lighteval / evalscope benchmarks.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-env-preflight
amd
Collect and normalize environment facts (OS, Python, GPU, CUDA/ROCm, container state) before Quark installation or PTQ planning.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-torch-model-intake
amd
Inspect a target model and prepare metadata for Quark PTQ planning.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-torch-export
amd
Prepare export and downstream evaluation handoff for a planned or completed Quark PTQ run.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-torch-install
amd
Install or verify the correct PyTorch build for a user's accelerator backend before Quark installation.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-install
amd
Install or verify the AMD Quark package and its dependencies.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-onnx-install
amd
Install or verify the correct ONNX Runtime build (and the `onnx` package) for a user's accelerator backend before Quark's ONNX-to-ONNX flow.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-onnx-model-intake
amd
Inspect a target ONNX model and prepare metadata for Quark ONNX PTQ planning.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-onnx-router
amd
Route Quark ONNX user goals to the correct atomic skill.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-torch-debug
amd
Diagnose failed Quark installation, PTQ execution, script generation, or export attempts.
SkillAFreshness: A★ 186Claude Code +9 - 0.679score
quark-torch-quant-plan
amd
Build a Quark Torch LLM PTQ quantization plan from model analysis and user intent.
SkillAFreshness: A★ 186Claude Code +9
Signals
- Stars
- 186
- Forks
- 36
- Open issues
- 3
- Last commit (this folder)
- Sep 28, 2026 (1 month ago)
- Last release
- Sep 28, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/amd/Quark
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.674score
quark-onnx-shapeshifter-run
amd
Apply existing ShapeShifter graph passes to an .onnx model via the quark-cli shapeshifter CLI or a ShapeShifter YAML.
SkillAFreshness: A★ 186Claude Code +9 - 0.352score
quark-onnx-shapeshifter-run
amd
Apply existing ShapeShifter graph passes to an .onnx model via the quark-cli shapeshifter CLI or a ShapeShifter YAML.
SkillAFreshness: A★ 186Claude Code +9 - 0.339score
quark-onnx-shapeshifter-run
amd
Apply existing ShapeShifter graph passes to an .onnx model via the quark-cli shapeshifter CLI or a ShapeShifter YAML.
SkillAFreshness: A★ 186Claude Code +9
More from amd
- 0.700score
quark-torch-llm-ptq
amd
Runs an end-to-end AMD Quark post-training quantization workflow for PyTorch / Hugging Face LLMs: inspect a Hub or local model, choose a quantization plan…
SkillAFreshness: A★ 465Claude Code +9 - 0.700score
rocprofiler-pc-sampling
amd
Profiles a target application using rocprofv3 with program counter sampling enabled and then analyzes the results.
SkillAFreshness: A★ 465Claude Code +9 - 0.700score
local-ai-use
amd
Makes this agent generate images, transcribe audio, and synthesize speech on the user's own machine through a local Lemonade Server instead of a paid cloud API.
SkillAFreshness: A★ 465Claude Code +9 - 0.700score
quark-install
amd
Installs or verifies AMD Quark and ensures the selected Python environment has an accelerator-matched PyTorch.
SkillAFreshness: A★ 465Claude Code +9 - 0.700score
lemonade-router-builder
amd
Turns a natural-language description of routing intent into a valid Lemonade `collection.router` policy JSON.
SkillAFreshness: A★ 465Claude Code +9 - 0.700score
serving-llms-on-epyc
amd
Serves an LLM on a supported AMD EPYC server CPU using vLLM with zentorch, in Docker, Podman, or conda.
SkillAFreshness: A★ 465Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get quark-onnx-shapeshifter-run running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
quark-onnx-shapeshifter-run skill. Agent Mart. https://agentmart.dev/skills/amd-quark-onnx-shapeshifter-run-1e49b4 (last updated 2026-10-24)