quark-onnx-model-intake

Extracts ONNX model metadata needed for Quark PTQ planning and compatibility assessment.

154|27|Updated Jun 19, 2024
One-click install
npx skills add https://github.com/amd/Quark --skill quark-onnx-model-intake
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: quark-onnx-model-intake
Source: https://github.com/amd/Quark/tree/main/.claude/skills-impl/l1-atomic/onnx/quark-onnx-model-intake
Command: npx skills add https://github.com/amd/Quark --skill quark-onnx-model-intake

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prepares an ONNX model for Quark quantization planning by extracting the model facts that determine whether PTQ can proceed safely and what constraints must be handled first.

Core Features & Use Cases

  • Model validation: Confirms ONNX path integrity, detects external-data usage, and checks whether the model is already quantized or contains Quark custom ops.
  • Graph inspection: Identifies opset and IR versions, input and output shapes and dtypes, op-type histograms, quantizable layer counts, and architecture hints such as CNN or transformer.
  • Deployment risk assessment: Flags issues that affect CPU, CUDA, ROCm, AMD NPU CNN, and AMD NPU Transformer targets, including dynamic dimensions, layout mismatches, low opset versions, and unsupported custom domains.
  • Use case: When a user asks whether a .onnx model can be quantized with Quark, this Skill gathers the technical facts needed before choosing a preset or fixing the model.

Quick Start

Ask the assistant to inspect the provided ONNX model path and return Quark-ready metadata, compatibility risks, and the most realistic quantization preset candidates.

Frequently Asked Questions about quark-onnx-model-intake

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if my ONNX model is ready for Quark quantization?

To check ONNX model readiness for Quark quantization, inspect the graph to extract opset and IR versions, input/output shapes, and op-type histograms. This validation process confirms path integrity and detects if the model is already quantized before PTQ planning.

What ONNX model issues prevent Quark PTQ deployment on AMD NPU?

ONNX deployment risks for Quark PTQ on AMD NPU include dynamic dimensions, layout mismatches, low opset versions, and unsupported custom domains. Assessing these architecture hints and quantizable layer counts ensures compatibility across CPU, CUDA, ROCm, and NPU targets.

Can I run Quark quantization on an ONNX model with external data files?

Yes, Quark quantization can process ONNX models with external data. The model intake workflow detects external-data directory usage and validates path integrity, ensuring the graph inspection and op histogram counting proceed safely before PTQ planning.

What metadata is needed to plan ONNX model quantization?

ONNX quantization planning requires metadata including opset and IR versions, input/output shapes and dtypes, op-type histograms, and architecture hints like CNN or transformer. This data determines deployment compatibility and identifies constraints for Quark PTQ.

Does Quark PTQ work with ONNX models that already contain quantized ops?

Quark PTQ requires checking if an ONNX model is already quantized or contains custom ops. The intake workflow performs already-quantized checks and identifies unsupported custom domains, flagging these issues to prevent conflicts during post-training quantization.

Why does my ONNX model fail Quark quantization readiness checks?

ONNX models fail Quark quantization readiness checks due to low opset versions, dynamic dimensions, layout mismatches, or unsupported custom domains. Graph inspection identifies these deployment risks and architecture constraints before applying a quantization preset.