Agent skill

Quark Torch Result Validator

by amd in amd/Quark

Validate Quark quantization output using four lightweight checks: auxiliary file copy alignment, excluded tensor MD5 byte-identity, config.json deep comparison after stripping quantization keys, and…

MITAuto-check passedAI & LLM Engineering

Install Quark Torch Result Validator

skills CLI
$ npx skills add amd/Quark --skill quark-torch-result-validator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install amd/Quark quark-torch-result-validator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/amd/Quark.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills-impl/l1-atomic/torch/quark-torch-result-validator .claude/skills/quark-torch-result-validator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
quark-torch-result-validator
GitHub stars
181
Token cost
~1.6k tokens
SKILL.md length
439 words
Files
3
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

Validate Quark quantization output using four lightweight checks: auxiliary file copy alignment, excluded tensor MD5 byte-identity, config.json deep comparison after stripping quantization keys, and…

  • Works in 5 steps: Confirm SKILL_DIR, source_model_dir, and… → Run self-test to verify scripts are… → Execute steps in cheap-to-expensive… → …
  • Validate quantization result
  • SKILL.md covers Purpose, Runtime Assumptions, Contracts and Inputs, plus 9 more sections
  • Runs Python scripts from its folder; calls python3

What it does

Quark Torch Result Validator is an agent skill from amd/Quark. Validate Quark quantization output using four lightweight checks: auxiliary file copy alignment, excluded tensor MD5 byte-identity, config.json deep comparison after stripping quantization keys, and safetensors header pattern/dtype summaries. Intended for post-export or file2file validation. Trigger for "validate quantization result", "check quantized model output", "verify exported weights".

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `quant_validation.py` and `run_validation.py`).

It sits in AI & LLM Engineering, covering LLM inference and serving. The licence is MIT.

When your agent uses it

  • Validate quantization result
  • Check quantized model output
  • Verify exported weights

Example prompts

  • “validate quantization result”
  • “check quantized model output”
  • “verify exported weights”
  • “/quark-torch-result-validator”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Confirm SKILL_DIR, source_model_dir, and quantized_model_dir are available.
  2. Run self-test to verify scripts are intact: python3 "$SKILL_DIR/run_validation.py" self-test
  3. Execute steps in cheap-to-expensive order (4 → 1 → 3 → 2).
  4. Collect JSON from stdout for each step; write validation_report.md.
  5. Surface any ok: false steps with their errors and mismatches.

What it can do on your machine

Read from SKILL.md and the folder at commit 313cb0b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Quark Torch Result Validator loads about 1.6k tokens when it runs. Until then it costs about 106 tokens; SKILL.md has 439 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~106
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from amd/Quark at commit 313cb0b, republished under its MIT licence (© amd). 439 words, ~1,574 tokens.

Download SKILL.mdSave it as .claude/skills/quark-torch-result-validator/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
quark-torch-result-validator
description
Validate Quark quantization output using four lightweight checks: auxiliary file copy alignment, excluded tensor MD5 byte-identity, config.json deep comparison after stripping quantization keys, and safetensors header pattern/dtype summaries. Intended for post-export or file2file validation. Trigger for "validate quantization result", "check quantized model output", "verify exported weights".
layer
l1-atomic
primary_artifact
validation_report.md
source_knowledge
examples/torch/language_modeling/llm_ptq/quantize_quark.py, quark/torch/export/api.py

quark-torch-result-validator

Purpose

Run four lightweight checks on a completed Quark export or file2file output. All checks read only safetensors headers or small metadata files — no full tensor payload is loaded except for the bounded MD5 spot-check. Results feed into a structured validation_report.md.

Runtime Assumptions

All scripts (quant_validation.py, run_validation.py) live in the same directory as this SKILL.md, under .claude/skills-impl/l1-atomic/torch/quark-torch-result-validator/.

Resolve SKILL_DIR from the repo root before running any command:

bash
SKILL_DIR=.claude/skills-impl/l1-atomic/torch/quark-torch-result-validator

run_validation.py writes JSON to stdout; quant_validation.py diagnostics go to stderr. Never treat stderr as structured output.

Contracts

  • Input: session_context.json, quant_plan.json (for exclude rules and model paths)
  • Output: validation_report.md (structured per the report template below)
  • Schemas: shared/contracts/validation_report.schema.json

Inputs

FieldSourceRequired
source_model_diruser or session_contextYes
quantized_model_diruser or run_manifestYes
quant_configquant_plan.json or user-supplied JSONFor step 2 only

Outputs

validation_report.md with one section per executed step. Unexecuted steps are marked skipped.

Interaction Flow

  1. Confirm SKILL_DIR, source_model_dir, and quantized_model_dir are available.
  2. Run self-test to verify scripts are intact: python3 "$SKILL_DIR/run_validation.py" self-test
  3. Execute steps in cheap-to-expensive order (4 → 1 → 3 → 2).
  4. Collect JSON from stdout for each step; write validation_report.md.
  5. Surface any ok: false steps with their errors and mismatches.

Four Validation Steps

OrderFunctionCLI subcommandPurpose
1check_auxiliary_files_copiedauxiliaryCompare non-weight auxiliary files between source and quantized dirs
2check_non_quantized_tensors_md5_unchangedmd5MD5 spot-check payload bytes of exclude-listed tensors
3check_config_json_equal_except_quantizationconfigDeep compare config.json after stripping quantization keys
4get_fuzzy_tensor_namesfuzzySummarize canonical header patterns and dtype_counts

Run in cost order: 4 → 1 → 3 → 2.

Agent Execution Contract

Self-Test
bash
SKILL_DIR=.claude/skills-impl/l1-atomic/torch/quark-torch-result-validator
python3 "$SKILL_DIR/run_validation.py" self-test

Exits 0 and prints exported symbols self-test (__all__): ok on success.

Show full SKILL.md (175 more words)Show less
CLI Commands
bash
SKILL_DIR=.claude/skills-impl/l1-atomic/torch/quark-torch-result-validator

# 4. get_fuzzy_tensor_names (cheapest — header only)
python3 "$SKILL_DIR/run_validation.py" fuzzy \
  --model-path ./quantized-model

# 1. check_auxiliary_files_copied
python3 "$SKILL_DIR/run_validation.py" auxiliary \
  --source-model-dir ./original-model --quantized-model-dir ./quantized-model \
  --ignore 'README*'

# 3. check_config_json_equal_except_quantization
python3 "$SKILL_DIR/run_validation.py" config \
  --original-config ./original-model/config.json \
  --quantized-config ./quantized-model/config.json

# 2. check_non_quantized_tensors_md5_unchanged (most expensive)
python3 "$SKILL_DIR/run_validation.py" md5 \
  --source-model-dir ./original-model --output-model-dir ./quantized-model \
  --quant-config '{"exclude":["*.lm_head.weight"],"max_samples":50}'

For md5, --quant-config accepts a JSON string or a path to a JSON file. If SKILL_DIR or model paths cannot be resolved, mark the affected step skipped.

Public API (for direct Python import)

python
from quant_validation import (
    check_auxiliary_files_copied,
    check_non_quantized_tensors_md5_unchanged,
    check_config_json_equal_except_quantization,
    get_fuzzy_tensor_names,
)

All four functions are in __all__. Other public-named helpers are internal utility surface.

Recovery

FailureRecovery
Self-test exits non-zeroReport script integrity failure; do not run further steps
source_model_dir missingMark steps 1, 2, 3 as skipped; run step 4 on quantized dir only
No safetensors files foundMark steps 2 and 4 as skipped
quant_config missing exclude rulesMark step 2 as skipped
File too large for SHA256Recorded in hash_skipped_files; size comparison still runs

Report Template

text
## Validation Report — quark-torch-result-validator

**Step 4 — fuzzy tensor names**: ok / FAIL / skipped
  - patterns: <count>, mixed-dtype patterns: <count>
  - Notable: <pattern> → <dtype_counts>

**Step 1 — auxiliary files**: ok / FAIL / skipped
  - missing: <count>, mismatched: <count>, extra: <count>

**Step 3 — config.json**: ok / FAIL / skipped
  - mismatches: <count>
  - <key>: <source_value> / <quantized_value>

**Step 2 — MD5 spot-check**: ok / FAIL / skipped
  - candidates: <count>, checked: <count>, sampled: true/false
  - mismatches: <count>

Canonical Name Rules

  • Replace only pure numeric path segments with *: layers.12 → layers.*
  • Do not alter digits embedded in non-numeric names: norm1, w2 stay unchanged
  • dtype_counts is aggregated per pattern; multiple dtypes in one pattern signals mixed precision risk

Optional Dtype Hints

Heuristics only — not mandatory pass/fail rules:

  • FP8: dtypes such as F8_E4M3
  • MXFP4: often uint8-packed
  • INT schemes: depend on export naming convention

© amd, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in .claude/skills-impl/l1-atomic/torch/quark-torch-result-validator of amd/Quark.

  • SKILL.md
  • quant_validation.py
  • run_validation.py

Open the folder on GitHubat commit 313cb0b

Compare with similar skills

Quark Torch Result Validator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Quark Torch Result Validator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Quark Torch Result Validator this skillamd/Quark181—~1.6kAutomated safety check: PassMIT
SageMaker Serving Image Selectionhuggingface/skills11k1 repos~4.6kAutomated safety check: PassApache-2.0
Fine-Tuning ExpertJeffallan/claude-skills12k1 repos~1.7kAutomated safety check: PassMIT
Hugging Face Local Model Evalshuggingface/skills11k2 repos~1.6kAutomated safety check: PassApache-2.0
Qwen Mtp GgufR6410418/Jackrong-llm-finetuning-guide1.7k—~1.7kAutomated safety check: PassMIT
CI Fails Buildkiteguqiong96/Lvllm4642 repos~349Automated safety check: PassApache-2.0

Similar skills

  • Official

    Chooses the right serving container and current image URI for deploying a Hugging Face model to a SageMaker endpoint, preferring Hugging Face images over generic ones.

    11k GitHub starsUsed in 1 repo~4.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Fine-Tuning Expert

    Jeffallan/claude-skills

    Guides LLM fine-tuning with LoRA and QLoRA through Hugging Face PEFT, from dataset validation and training checks to adapter merging, quantization and deployment.

    12k GitHub starsUsed in 1 repo~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Official

    Runs evaluations of Hugging Face Hub models on local hardware with inspect-ai or lighteval, and helps choose between vLLM, Transformers and accelerate backends.

    11k GitHub starsUsed in 2 repos~1.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Qwen Mtp Gguf

    R6410418/Jackrong-llm-finetuning-guide

    Complete agent-ready workflow for Qwen-family MTP or nextn GGUF conversion and release.

    1.7k GitHub stars~1.7k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • CI Fails Buildkite

    guqiong96/Lvllm

    Fetch and diagnose vLLM Buildkite CI failure logs. An agent skill from guqiong96/Lvllm.

    464 GitHub starsUsed in 2 repos~349 tokens
    AI & LLM EngineeringAuto-check passed
  • Subwave LLM Bench

    perminder-klair/subwave

    Benchmark and compare LLM models for SUB/WAVE's on-air calls — track picks, segments, listener requests, DJ scripts, banter, and programme beats — in both candidate-pool and agent modes, using…

    1.4k GitHub stars~2.4k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes

More from amd/Quark

All 37 skills in this repo
  • Author or restructure a Quark Agent Skill so it conforms to this project's template, contracts, and layer rules.

    181 GitHub stars~3.1k tokensUpdated 10 days ago
    Auto-check passed
  • Run, resume, monitor, diagnose, and report Quark Quant-Perf workflows for PyTorch and HuggingFace transformers models.

    181 GitHub stars~3k tokensUpdated 10 days ago
    Auto-check passed
  • Author a new ShapeShifter graph-transformation pass for AMD Quark (ONNX or PyTorch) so it conforms to the pass framework's conventions and auto-registers.

    181 GitHub stars~2.9k tokensUpdated 10 days ago
    Auto-check passed
  • Collect and normalize environment facts (OS, Python, GPU, CUDA/ROCm, container state) before Quark installation or PTQ planning.

    181 GitHub stars~1.4k tokensUpdated 10 days ago
    Auto-check passed
  • Quark Install

    amd/Quark

    Install or verify the AMD Quark package and its dependencies.

    181 GitHub stars~1.8k tokensUpdated 10 days ago
    Auto-check: notes
  • L3 recipe that runs quark.onnx.AutoSearchPro end-to-end on a user .onnx model: intake → preset selection (or custom search space) → calibration / eval data reader → standalone autosearch script…

    181 GitHub stars~3.4k tokensUpdated 10 days ago
    Auto-check passed

Questions about Quark Torch Result Validator

What does Quark Torch Result Validator do?

Validate Quark quantization output using four lightweight checks: auxiliary file copy alignment, excluded tensor MD5 byte-identity, config.json deep comparison after stripping quantization keys, and…. Quark Torch Result Validator is an agent skill from amd/Quark.json deep comparison after stripping quantization keys, and safetensors header pattern/dtype summaries.

When should I use Quark Torch Result Validator?

Quark Torch Result Validator fits situations like: validate quantization result; check quantized model output; verify exported weights.

How do I install Quark Torch Result Validator in Claude Code?

Run `npx skills add amd/Quark --skill quark-torch-result-validator -a claude-code`. Or copy the skill folder (.claude/skills-impl/l1-atomic/torch/quark-torch-result-validator in amd/Quark) into .claude/skills/quark-torch-result-validator in your project. Claude Code loads it when a task matches its description.

How do I install Quark Torch Result Validator in Codex?

Run `npx skills add amd/Quark --skill quark-torch-result-validator -a codex`. Or copy the skill folder (.claude/skills-impl/l1-atomic/torch/quark-torch-result-validator in amd/Quark) into .agents/skills/quark-torch-result-validator in your project. Codex loads it when a task matches its description.

Can I use Quark Torch Result Validator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add amd/Quark --skill quark-torch-result-validator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/quark-torch-result-validator, .gemini/skills/quark-torch-result-validator, .github/skills/quark-torch-result-validator and .opencode/skills/quark-torch-result-validator in your project.

What does Quark Torch Result Validator need to run?

Going by SKILL.md and its folder, Quark Torch Result Validator needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Quark Torch Result Validator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Quark Torch Result Validator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Quark Torch Result Validator use?

Quark Torch Result Validator is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Quark Torch Result Validator use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Quark Torch Result Validator?

Skills that share tags, products or a category with Quark Torch Result Validator: SageMaker Serving Image Selection (huggingface/skills, 11k stars), Fine-Tuning Expert (Jeffallan/claude-skills, 12k stars), Hugging Face Local Model Evals (huggingface/skills, 11k stars) and Qwen Mtp Gguf (R6410418/Jackrong-llm-finetuning-guide, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Quark Torch Result Validator?

amd (a GitHub organization) maintains it in amd/Quark, which has 181 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on September 28, 2026.

Source: amd/Quark on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.