quark-torch-llm-ptq-workflow

Orchestrate AMD Quark post-training quantization workflows for PyTorch and ONNX models.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the manual overhead of planning and executing a full post-training quantization workflow for large language models in AMD Quark, helping users move from a source model to a quantized output with clear checkpoints and safe execution.

Core Features & Use Cases

  • End-to-end PTQ orchestration: Guides model intake, quantization planning, manifest generation, and execution in the correct order.
  • Model-specific planning: Adapts quantization decisions for different model types, precision goals, hardware targets, and calibration settings.
  • Safe command generation: Produces an exact quantize_quark.py command and stops for user confirmation before running anything.
  • Use Case: A user wants to quantize a Llama, Qwen, or Mistral model to FP8 or INT4 and needs a structured workflow that ends with a quantized model artifact.

Quick Start

Ask the skill to quantize your LLM with AMD Quark, including the model path, desired precision, output directory, and hardware target.

Frequently Asked Questions about quark-torch-llm-ptq-workflow

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

FAQPage Schema
How do I run post-training quantization for a large language model using AMD Quark?

Post-training quantization for a large language model using AMD Quark is orchestrated end-to-end by guiding model intake, quantization planning, manifest generation, and execution in the correct order to produce a quantized model artifact safely.

What is the best way to plan PyTorch LLM quantization to FP8 or INT4?

Planning PyTorch LLM quantization to FP8 or INT4 is best handled by a workflow that adapts decisions for your specific model type, precision goals, and hardware target, culminating in a confirmation-gated executable command for safe execution.

Can I use AMD Quark to quantize Llama or Mistral models in PyTorch?

Yes, you can use AMD Quark to quantize Llama or Mistral models in PyTorch by following a model-specific planning workflow that adapts quantization decisions for different model types, precision goals, and hardware targets to generate a quantized output.

Does Quark PTQ workflow generate executable commands before running the quantization process?

Yes, the Quark PTQ workflow generates an exact quantize_quark.py command and stops for user confirmation before running anything, ensuring safe command generation, confirmation-gated execution, and reproducible quantized model artifacts.

Do I need to manually configure calibration settings for LLM post-training quantization?

You do not need to manually configure calibration settings for LLM post-training quantization because the workflow handles model analysis, quantization scheme selection, and calibration decisions automatically based on your specified precision goals and hardware targets.

When should I use a stepwise PTQ workflow instead of direct model optimization?

You should use a stepwise PTQ workflow instead of direct model optimization when you need clear checkpoints, safe execution, and reproducible results for complex PyTorch and ONNX-style models, removing manual overhead by planning intake, calibration, and command generation sequentially.