Add optimizing-models-with-quark entry-point skill - #147
Open
amd-zhaofeng wants to merge 2 commits into
Open
Conversation
The catalog had no answer for "quantize this model": `amd-skill-finder` routes such requests to amd/Quark, but could only hand back a repository address. Quark ships its own quantization skills, yet they live in the Quark repository and are not part of the `amd-quark` pip package, so an agent cannot reach them by installing the package. This skill is the bridge. With the user's consent it fetches Quark's skill tree into a cache directory outside the workspace, then routes to one of three starting points: Torch PTQ, ONNX PTQ, or Quark environment setup. It quantizes nothing itself and registers nothing as a skill, so the quantization knowledge stays upstream, versioned with the product, and nothing is left in the user's repository to clean up. The sparse checkout takes `.claude` plus the `llm_ptq` example, because the Torch workflow runs `quantize_quark.py` from the latter and the pip package does not ship it.
The clone and the pip install serve different purposes, and nothing said so outright. An agent reading the skill could plausibly conclude the cache directory is a Quark checkout to install from, which would leave the user with a broken environment: the `quark/` package source is not in the sparse checkout, so an install run from there cannot produce a working Quark. `quark-install` also documents a from-source option, so say plainly that PyPI is the endorsed path and source installs need the user to ask for them.
amd-zhaofeng
force-pushed
the
optimizing-models-with-quark
branch
2 times, most recently
from
August 17, 2026 06:57
97d85b4 to
932cf40
Compare
amd-zhaofeng
marked this pull request as ready for review
August 17, 2026 09:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
optimizing-models-with-quark, an entry-point skill that connects an agent to AMD Quark's own quantization skills. Implements #139.Why
amd-skill-finderalready routes "quantize this model to FP8" toamd/Quark, but all it can return is a repository address — the agent still has to read the docs and guess the flags. Quark ships skills of its own for exactly this work, and catalog users cannot reach them.The skill is deliberately thin: it quantizes nothing, installs no pip package, and registers nothing as a skill. The quantization knowledge stays upstream in Quark, versioned with the product, so there is no vendored copy here to go stale.
How it works
~/.cache/amd-quark-skills, or%LOCALAPPDATA%/amd-quark-skillson Windows).quark-torch-llm-ptq-workflow.onnxmodelquark-onnx-ptq-workflowquark-installInterim design for amd-quark v0.12
The proposal in #139 assumed
pip install amd-quarkwould deliver the skills.On amd-quark v0.12 it does not, so this PR takes a different route and says so plainly:
setup.pypackagesquarkandquark.*only; the skills live in the repository, so they are fetched from GitHub instead..claude/skills/holds thin stubs that defer to.claude/skills-impl/, whose files reference each other by relative path. The tree therefore travels as a unit — fetching individual files is not reliable.rm -rfof the cache directory.Once Quark ships its skills inside the
quarkpackage, the retrieval step goes away and this entry point can become what #139 originally described.Test plan
./.github/scripts/check.shpasses — 8 skills, 0 errors, both generated manifests report up to dategit clone --sparseplussparse-checkout setyields all four required files, ~2 MB on diskserving-llms-on-instinct/serving-llms-on-epycandmagpie-kernel-evaluatorSKILL.mdbody is 164 lines, well under the 500-line cap; reference is linked one level deepevals/evals.py, a walkthrough, and routing eval prompts — happy to add in a follow-up