AMD Quark Model Optimizer

July 3, 2026 · View on GitHub

AMD Quark Model Optimizer

Documentation version license license

PyTorch Examples | ONNX Examples | Documentation | Release Notes

AMD Quark is a comprehensive cross-platform toolkit designed to simplify and enhance the quantization of deep learning models. Supporting both PyTorch and ONNX models, AMD Quark empowers developers to optimize their models for deployment on a wide range of hardware backends, achieving significant performance gains without compromising accuracy.

image

Features

Feature SetPyTorch backendONNX backend
Data Typesint4, uint4, int8, uint8, float16, bfloat16, OCP FP8 E4M3/E5M2, OCP MX INT8, OCP MX FP4, OCP MX FP6 E3M2/E2M3, OCP MX FP8 E4M3/E5M2int4, uint4, int8, uint8, int16, uint16, int32, uint32, float16, bfloat16, BFP16, MX4/MX6/MX9, OCP MX INT8, OCP MX FP4, OCP MX FP6 E3M2/E2M3, OCP MX FP8 E4M3/E5M2
Quant Modeeager mode, FX graph modeONNX graph mode
Quant Strategystatic quant, dynamic quant, weight-onlystatic quant, dynamic quant, weight-only
Quant Schemeper-tensor, per-channel, per-groupper-tensor, per-channel
Symmetricsymmetric, asymmetricsymmetric, asymmetric
Calibration MethodMinMax, Percentile, MSEMinMax, Percentile, MinMSE, Entropy, NonOverflow
Scale Typefloat16, float32float16, float32
KV-Cache QuantFP8 KV-Cache QuantN/A
Supported Ops.nn.Linear, nn.Conv2d, nn.ConvTranspose2d, nn.Embedding, nn.EmbeddingBag,Almost all ONNX ops,
nn.BatchNorm2d, nn.BatchNorm3d, nn.LeakyReLU, nn.AvgPool2d, nn.AdaptiveAvgPool2dsee Full List
Pre-Quant OptimizationSmoothQuant, QuaRotQuaRot, SmoothQuant, CLE
Quantization AlgorithmAWQ, GPTQ, QronosAdaQuant, AdaRound, GPTQ, Bias Correction
Export FormatONNX, JSON-Safetensors, GGUF(Q4_1)N/A
Operating SystemsLinux {ROCm, CUDA, CPU}, Windows {CPU}Linux {ROCm, CUDA, CPU}, Windows {CUDA, CPU}

Model Support Table

Quantization TechniqueSupported Models
LLM PruningModel Support
LLM Post Training Quantization (PTQ)Model Support
LLM Quantization Aware Training (QAT)Model Support
Vision Model QuantizationModel Support
Quark for ONNXModel Support

Installation

Official releases of AMD Quark are available on PyPI https://pypi.org/project/amd-quark/, and can be installed with pip:

pip install amd-quark

This pulls the universal wheel from PyPI, the recommended default for most users. AMD Quark also publishes optional pre-built wheels (for PyTorch 2.10+, Python 3.11–3.13) on the AMD package index, which ship pre-compiled C++ extensions so no C++ compiler or first-run kernel compilation is needed. To install one, point pip at the matching index:

pip install amd-quark --extra-index-url https://pypi.amd.com/quark/cpu/simple     # CPU (Linux, Windows)
pip install amd-quark --extra-index-url https://pypi.amd.com/quark/cu128/simple   # CUDA 12.8 (Linux, Windows)
pip install amd-quark --extra-index-url https://pypi.amd.com/quark/rocm71/simple  # ROCm 7.1 (Linux only)
pip install amd-quark --extra-index-url https://pypi.amd.com/quark/rocm72/simple  # ROCm 7.2 (Linux only)

Note


For full instructions to install AMD Quark from Python wheels (universal or pre-built) or ZIP files, refer to our 🛠️Installation Guide. The Installation Guide also contains verification steps that apply to building from source.

Not sure which command to run for your OS, Python, PyTorch, and accelerator? Use the interactive Quick Install Selector to generate the exact pip install command.

Installing from Source

  1. Clone or download this repository.
  2. Follow the steps from the PyTorch website to install the appropriate PyTorch package for your system.
  3. You can then build and install AMD Quark, and its dependencies, which are detailed in requirements.txt, by running:
git clone --recursive https://github.com/AMD/Quark
cd Quark

# [Optional] run git submodule if you are updating an existing Quark repository
git submodule sync
git submodule update --init --recursive

# Recommended: install torch first matching your accelerator
# (https://pytorch.org/get-started/locally/), then:
pip install --no-build-isolation .

# Without --no-build-isolation, pip pulls torch from PyPI for the isolated
# build env (defaults to CUDA on Linux); set PIP_EXTRA_INDEX_URL to override.
# QUARK_ACCELERATOR=cpu|cuda|rocm forces a specific build type.
# See CONTRIBUTING.md for details.

Resources

AMD Quark's documentation site contains Getting Started, API documentation for both PyTorch and ONNX backends, and other detailed information. The Installation Guide includes our Recommended First Time User Installation guide, to get set up with Quark quickly. Check out our Frequently Asked Questions for both PyTorch and ONNX for more details.

AMD Quark provides examples of Language Model and Image Classification model quantization, which can be found under examples/torch/ and examples/onnx/. These examples are documented here:

The examples folder also contain integrations of other quantizers under examples/torch/extensions/. You can read about those here:

Agent Skills

This repo ships a Claude Code skill system for Quark quantization workflows (PTQ planning, environment preflight, install, debug, export, and more).

User-facing skills are auto-discovered by Claude Code from .claude/skills/ — launch claude from the repo root and ask things like "quantize Qwen3-8B to FP8" or "check my environment".

Contributing

AMD Quark is not set up to accept community contributions (bug reports, feature requests, or Pull Requests) just yet. Please watch this space!

Copyright (C) 2025, Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: MIT. See LICENSE file for detail.