quark-torch-result-validator
Validate Quark quantization output using four lightweight checks: auxiliary file copy alignment, excluded tensor MD5 byte-identity, config.json deep…
Skill by amd
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-torch-result-validator-db5ee1
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: writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/quark-torch-result-validator
What's inside
- Skill 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".
- License
- MIT
- Instructions
- 157 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (3)
- SKILL.md
- quant_validation.py
- run_validation.py
SKILL.md (first lines)
# 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
| Field | Source | Required |
|-------|--------|----------|
| `source_model_dir` | user or `session_context` | Yes |
| `quantized_model_dir` | user or `run_manifest` | Yes |
| `quant_config` | `quant_plan.json` or user-supplied JSON | For 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
| Order | Function | CLI subcommand | Purpose |
|-------|----------|----------------|---------|
| 1 | `check_auxiliary_files_copied` | `auxiliary` | Compare non-weight auxiliary files between source and quantized dirs |
| 2 | `check_non_quantized_tensors_md5_unchanged` | `md5` | MD5 spot-check payload bytes of exclude-listed tensors |
| 3 | `check_config_json_equal_except_quantization` | `config` | Deep compare `config.json` after stripping quantization keys |
| 4 | `get_fuzzy_tensor_names` | `fuzzy` | Summarize 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.
### 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
| Failure | Recovery |
|---------|----------|
| Self-test exits non-zero | Report script integrity failure; do not run further steps |
| `source_model_dir` missing | Mark steps 1, 2, 3 as skipped; run step 4 on quantized dir only |
| No safetensors files found | Mark steps 2 and 4 as skipped |
| `quant_config` missing exclude rules | Mark step 2 as skipped |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)
- Jul 9, 2026 (3 months 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.
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
Cite this page
quark-torch-result-validator skill. Agent Mart. https://agentmart.dev/skills/amd-quark-torch-result-validator-db5ee1 (last updated 2026-10-24)