quark-torch-ptq

Quantize PyTorch transformer models into deployment artifacts using AMD Quark PTQ workflows.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the full post-training quantization workflow for PyTorch and HuggingFace transformer models, helping you move from a safetensors model to a quantized output without manually stitching together planning, script generation, and execution steps.

Core Features & Use Cases

  • Model inspection and planning: Review the model and determine a suitable quantization path for common LLM PTQ scenarios.
  • Quantization script generation: Produce the workflow steps needed for AMD Quark quantization of PyTorch transformer models.
  • Optional execution support: Run the PTQ pipeline through to a quantized artifact, with a clear stop point before validation and evaluation.
  • Use case: Quantize a Llama, Qwen, or Mistral model with FP8 or INT4 for deployment preparation.

Quick Start

Ask to quantize your HuggingFace safetensors model with AMD Quark PTQ and generate the full PyTorch workflow through the quantized output.

Frequently Asked Questions about quark-torch-ptq

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

FAQPage Schema
How do I quantize a HuggingFace LLM using AMD Quark PTQ?

Quantize HuggingFace LLMs end to end by applying AMD Quark post-training quantization workflows to safetensors models, generating planning steps, scripts, and quantized artifacts without requiring ONNX inputs.

Can I apply FP8 or INT4 quantization to PyTorch transformer models?

Apply FP8 or INT4 quantization to PyTorch transformer models by inspecting the model, generating a quantization workflow, and producing a deployment-ready quantized artifact for common model families like Llama, Qwen, or Mistral.

What is the process for generating a quantization workflow from safetensors format?

Generating a quantization workflow from safetensors format involves model inspection, quantization path planning, and script generation for AMD Quark PTQ, culminating in a quantized output artifact ready for deployment preparation.

Does AMD Quark post-training quantization support PyTorch models without ONNX inputs?

AMD Quark post-training quantization supports PyTorch-specific quantization tasks directly on HuggingFace safetensors models without requiring ONNX inputs, streamlining the pipeline from planning to quantized artifact generation.

When do I need post-training quantization for PyTorch transformer models?

Use post-training quantization for PyTorch transformer models when preparing Llama, Qwen, or Mistral architectures for deployment, reducing model size and computational requirements through FP8 or INT4 quantization modes.

What are the limitations of end-to-end PyTorch LLM quantization workflows?

End-to-end PyTorch LLM quantization workflows stop at the quantized output artifact and do not include validation or evaluation steps, requiring separate downstream processes for performance verification and accuracy assessment.