quark-torch-llm-ptq
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…
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-llm-ptq
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: ml, productivity
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. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/quark-torch-llm-ptq
What's inside
- Skill name
quark-torch-llm-ptq- Description
- 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, create reproducible artifacts, request execution approval, and produce a quantized model. Applies to Llama, Qwen, Mistral, and similar transformer LLM requests involving FP8, INT4, or another Quark scheme. Does not handle .onnx model inputs or ONNX PTQ.
- License
- MIT
- Instructions
- 198 lines in SKILL.md · view on GitHub
Files (12)
- .federated.json
- SKILL.md
- evals.json · evals/
- model_analysis.schema.json · references/contracts/
- quant_plan.schema.json · references/contracts/
- run_manifest.schema.json · references/contracts/
- environment.md · references/
- example-fp8-qwen3-8b.md · references/
- model-intake.md · references/
- quant-plan.md · references/
- troubleshooting.md · references/
- skill-card.md
SKILL.md (first lines)
# Quark Torch PTQ ## Purpose Take a PyTorch / Hugging Face LLM from model identification through confirmed AMD Quark PTQ. Perform intake, planning, manifest generation, execution, and output verification as one self-contained workflow. This skill stops at the quantized model. It does not accept `.onnx` model input, train or fine-tune a model, or modify Quark package/source files. ## Prerequisites - Python 3.11 to 3.13, accelerator-matched PyTorch 2.2 or newer, `amd-quark[cli]`, and `datasets`. - The required ROCm version and GPU architecture depend on the PyTorch build and selected quantization scheme. Record the actual runtime, GPU architecture (`gfx...` from `gcnArchName` on AMD), host kernel, and driver, and verify support for the confirmed plan. - No container image is required. If running in a container, record its image name or digest when available and verify GPU device access. - Inspect and preserve `HIP_VISIBLE_DEVICES`, `CUDA_VISIBLE_DEVICES`, `HSA_OVERRIDE_GFX_VERSION`, `PYTORCH_ROCM_ARCH`, and `PYTORCH_HIP_ALLOC_CONF`. Include any required changes to device visibility, architecture, or memory allocation in the confirmed plan. ## Inputs - Model source: a Hugging Face repository ID or local model directory. - Output directory. - Quantization intent: requested precision/scheme, target hardware, accuracy priority, and optional calibration settings. - Optional environment facts: Python, PyTorch, accelerator, available memory, installed `amd-quark`, and Transformers versions. Do not require pre-existing workflow artifacts. Create all artifacts in the user's working directory by following this skill's local references: - [`references/model-intake.md`](references/model-intake.md) - [`references/quant-plan.md`](references/quant-plan.md) - [`references/environment.md`](references/environment.md) - [`references/troubleshooting.md`](references/troubleshooting.md) ## Outputs Produce these three artifacts before or during execution: 1. `model_analysis.json`, validated against [`references/contracts/model_analysis.schema.json`](references/contracts/model_analysis.schema.json). 2. `quant_plan.json`, validated against [`references/contracts/quant_plan.schema.json`](references/contracts/quant_plan.schema.json). 3. `run_manifest.yaml`, validated against [`references/contracts/run_manifest.schema.json`](references/contracts/run_manifest.schema.json). The quantized model and its configuration/tokenizer files are written under the confirmed output directory. Record actual files and the final status in the manifest. ## Interaction Flow Always complete the following four steps in order. Show concrete facts, artifacts, and commands. Stop at every checkpoint and wait for the user. ### Step 1 — Model intake 1. Confirm whether the model source is local or remote. For a local source, resolve it to an absolute path and verify that the directory and `config.json` exist. For a remote source, preserve the repository ID. 2. Follow `references/model-intake.md`. Read configuration only; do not load model weights during intake. 3. Determine `model_type`, architecture/loading hints, hidden-layer facts, multimodal or MoE signals, default exclusions, compatibility risks, and a defensible estimate of quantizable linear layers. 4. Write schema-valid `model_analysis.json` and show its summary. #### Checkpoint 1 — Confirm the model analysis Ask the user to confirm or correct the model analysis. Do not plan quantization until the user confirms. ### Step 2 — Quantization plan 1. Follow `references/quant-plan.md` and use the confirmed analysis plus the user's priorities. 2. Select and explain the global scheme, optional KV-cache scheme, per-pattern overrides, exclusions, algorithms, and calibration data. 3. Treat scheme, algorithm, and model-template support as version-dependent. Use the current installed Quark API or `quark-cli torch-llm-ptq --help` when a choice needs verification; do not rely on historical list sizes. 4. Show a decision table, write schema-valid `quant_plan.json`, and set `requires_confirmation: true` until approved. #### Checkpoint 2 — Confirm the quantization plan Ask the user to confirm or adjust the complete plan. After confirmation, update `requires_confirmation` to `false`. If the user changes a decision, rewrite and revalidate the plan before continuing. ### Step 3 — Manifest and execution confirmation Use the public `quark-cli torch-llm-ptq` command installed by `amd-quark[cli]`. Do not import its implementation module directly or locate, copy, generate, or patch another PTQ runner. Build an argument-array-safe command equivalent to: ```bash quark-cli torch-llm-ptq \ --model_dir "<MODEL_OR_ABSOLUTE_LOCAL_PATH>" \ --output_dir "<ABSOLUTE_OUTPUT_PATH>" \ --quant_scheme "<SCHEME>" \ --num_calib_data "<N>" \ --seq_len "<LENGTH>" \ --device cuda \ --no_trust_remote_code ``` Add only confirmed options: - `--dataset <NAME>` and `--batch_size <N>` when the plan changed them from the CLI defaults. - `--kv_cache_dtype <SCHEME>` for confirmed KV-cache quantization. - One `--layer_quant_scheme <PATTERN> <SCHEME>` per override. - `--quant_algo <comma-separated-list>` when required. - `--exclude_layers <patterns...>` only when overriding template defaults.
From amd/skills, MIT.
More from amd/skills
- 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
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
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
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 - 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.695score
tracelens-analysis-orchestrator
amd
Orchestrates modular PyTorch profiler trace analysis with TraceLens: generates perf reports, prepares category data, runs system-level and compute-kernel…
SkillAFreshness: A★ 465Claude Code +9 - 0.695score
hyperloom-workload-optimizer
amd
Autonomously optimizes end-to-end LLM inference throughput on AMD Instinct GPUs and reports a validated gain, using the Hyperloom multi-agent optimizer.
SkillAFreshness: A★ 465Claude Code +9 - 0.695score
local-ai-app-integration
amd
Integrates local AI capabilities into applications using Embeddable Lemonade.
SkillAFreshness: A★ 465Claude Code +9 - 0.695score
magpie-kernel-evaluator
amd
Benchmarks LLM inference and drives GPU kernel optimization with Magpie.
SkillAFreshness: A★ 465Claude Code +9 - 0.695score
rocm-doctor
amd
Diagnoses why ROCm, the HIP SDK, PyTorch, or llama.cpp is broken on an AMD GPU on Linux, Windows, or WSL2, then applies a low-risk fix with consent or hands…
SkillAFreshness: A★ 465Claude Code +9 - 0.660score
apu-memory-tuner
amd
Inspects and tunes the shared-vs-dedicated memory split on AMD Ryzen APUs with unified memory (UMA) so larger LLMs and image-gen models fit on the iGPU, or so…
SkillBFreshness: B★ 465Claude Code +9 - 0.660score
serving-llms-on-instinct
amd
Serves AI models on AMD Instinct GPU hardware using vLLM.
SkillBFreshness: B★ 465Claude Code +9
Compare and alternatives
Featured in
Signals
- Stars
- 465
- Forks
- 44
- Open issues
- 45
- Last commit (this folder)
- Oct 1, 2026 (26 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/amd/skills
- Website
- developer.amd.com/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from amd
- 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
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 - 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.695score
local-ai-app-integration
amd
Integrates local AI capabilities into applications using Embeddable Lemonade.
SkillAFreshness: A★ 465Claude Code +9
Cite this page
quark-torch-llm-ptq skill. Agent Mart. https://agentmart.dev/skills/amd-quark-torch-llm-ptq (last updated 2026-10-24)