quark-torch-result-validator

Validate Quark quantization outputs via file, tensor, and config checks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you validate whether a Quark-quantized model export preserved the right files, tensor identities, and configuration semantics without loading full model weights into memory.

Core Features & Use Cases

  • Auxiliary file verification: Confirms that non-weight files such as README, tokenizer assets, and helper documents were copied correctly to the quantized output.
  • Non-quantized tensor spot-checking: Uses exclude rules to compare raw tensor bytes by MD5 for weights that should remain unchanged.
  • Config parity checks: Deep-compares source and quantized config.json files after stripping quantization-specific keys.
  • Safetensors header analysis: Summarizes canonical tensor patterns and dtype counts from headers only, which is useful for quick integrity and mixed-precision checks.
  • Use case: After exporting a model, use this Skill to quickly confirm that the output is structurally sound before deploying it or running expensive downstream tests.

Quick Start

Ask the assistant to validate my Quark quantized model output against the source model and produce a validation report.

Frequently Asked Questions about quark-torch-result-validator

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

FAQPage Schema
How do I validate a Quark quantized model without loading weights into memory?

Validate your Quark quantized model by parsing safetensors headers, checking auxiliary file copying, and comparing excluded tensor MD5 bytes. This file-system traversal confirms structural soundness without loading full weights into memory.

What is the best way to check safetensors header patterns after quantization?

Checking safetensors header patterns involves parsing header metadata to summarize canonical tensor patterns and dtype counts. This quick integrity check verifies mixed-precision configurations in your quantized output.

How do I compare config.json files before and after Quark quantization?

Comparing config.json files involves deep-comparing source and quantized versions after stripping quantization-specific keys. This ensures configuration semantics remain equivalent between the original and exported models.

Can I verify non-quantized tensor identity for excluded weights in PyTorch models?

Verifying non-quantized tensor identity involves applying exclude rules to match unchanged weights, then comparing raw tensor bytes using MD5 spot checks. This confirms excluded weights were preserved correctly during export.

Does Quark export validation work with ONNX model directories and shard files?

Quark export validation applies to post-export verification of PyTorch and ONNX model directories, shard files, and file2file quantization results. It checks auxiliary files, tensor identities, and config equivalence across these formats.

Why do I need to validate auxiliary files after model quantization?

Validating auxiliary files after quantization confirms non-weight files like README, tokenizer assets, and helper documents were copied correctly to the quantized output, ensuring the exported model directory is complete and deployable.