quark-onnx-result-validator

Validate Quark ONNX quantization outputs by checking auxiliary files, initializers, metadata, and QDQ signals.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps you confirm that a Quark ONNX quantization run actually produced the expected model changes without breaking the original model’s important properties.

Core Features & Use Cases

  • Auxiliary file alignment: Checks whether non-model support files were copied from the source directory to the quantized output directory.
  • Initializer integrity validation: Verifies that weights and other excluded initializers remain byte-identical when they are supposed to stay unchanged.
  • Metadata comparison: Compares model metadata and graph I/O signatures while ignoring Quark-injected opset domains.
  • Quantization signal inspection: Produces a header-only summary to detect QDQ patterns, custom Quark ops, node types, and dtype distributions.
  • Use case: After quantizing a PyTorch or ONNX model with Quark, use this Skill to quickly confirm the output looks correct before deeper testing or deployment.

Quick Start

Ask the assistant to validate my Quark ONNX quantization output and report auxiliary file, metadata, initializer, and QDQ checks.

Frequently Asked Questions about quark-onnx-result-validator

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

FAQPage Schema
How do I verify my Quark ONNX quantization output?

You can verify Quark ONNX quantization output by checking auxiliary file copying, initializer byte identity, model metadata consistency, and quantization signal presence. This Skill automates post-quantization inspection of model.onnx and model.onnx_data files.

How does initializer byte identity validation work for ONNX models?

Initializer byte identity validation works by reading external-data bytes and comparing weights that should remain unchanged after quantization. It ensures excluded initializers stay byte-identical between the source and quantized output directories.

What is QDQ pattern inspection in ONNX quantized models?

QDQ pattern inspection is a quantization signal detection process that produces a header-only summary. It identifies QDQ patterns, custom Quark ops, node types, and dtype distributions within the quantized ONNX model graph.

Does the metadata comparison ignore Quark-injected opset domains?

Yes, the metadata comparison ignores Quark-injected opset domains when checking model metadata and graph I/O signatures. This ensures validation focuses on original model properties rather than framework-specific quantization artifacts.

Can I validate external ONNX data files alongside the main model?

Yes, you can validate external ONNX data files alongside the main model. The Skill performs optional external-data byte reads to compare model.onnx and model.onnx_data files across source and output directories.

Why are my auxiliary files missing after ONNX quantization?

Auxiliary files may be missing if non-model support files were not copied from the source directory to the quantized output directory. This Skill checks auxiliary file alignment to confirm all required support files are present.