{"id":28320269,"url":"https://github.com/amd/quark","last_synced_at":"2025-06-23T18:31:42.713Z","repository":{"id":285467521,"uuid":"817254643","full_name":"amd/Quark","owner":"amd","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-30T20:47:52.000Z","size":3844,"stargazers_count":23,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"release/0.8","last_synced_at":"2025-06-01T18:32:38.780Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-19T10:27:17.000Z","updated_at":"2025-05-23T01:15:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"5fd870ed-f4c8-4679-b7d0-d53cd31cd276","html_url":"https://github.com/amd/Quark","commit_stats":null,"previous_names":["amd/quark"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/amd/Quark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amd%2FQuark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amd%2FQuark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amd%2FQuark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amd%2FQuark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amd","download_url":"https://codeload.github.com/amd/Quark/tar.gz/refs/heads/release/0.8","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amd%2FQuark/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261533846,"owners_count":23173300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-25T10:08:46.365Z","updated_at":"2025-06-23T18:31:42.700Z","avatar_url":"https://github.com/amd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# AMD Quark Model Optimizer\n\n[![Documentation](https://img.shields.io/badge/Documentation-latest-brightgreen.svg?style=flat)](https://quark.docs.amd.com/latest/)\n[![version](https://img.shields.io/pypi/v/amd-quark?label=Release)](https://pypi.org/project/amd-quark/)\n[![license](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)\n[![license](https://img.shields.io/badge/python-3.12-green)](https://www.python.org/)\n\n[PyTorch Examples](https://quark.docs.amd.com/latest/pytorch/pytorch_examples.html) |\n[ONNX Examples](https://quark.docs.amd.com/latest/onnx/onnx_examples.html) |\n[Documentation](https://quark.docs.amd.com/) |\n[Release Notes](https://quark.docs.amd.com/latest/release_note.html)\n\n\u003c/div\u003e\n\n**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.\n\n![image](https://quark.docs.amd.com/latest/_images/quark_stack.png)\n\n## Features\n\n| Feature Set            | PyTorch backend                                                                                                                     | ONNX backend                                                                                  |\n| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |\n| Data Types             | int4, uint4, int8, uint8, float16, bfloat16, OCP FP8 E4M3/E5M2, OCP MX int8, OCP MX FP4, OCP MX FP6 E3M2/E2M3, OCP MX FP8 E4M3/E5M2 | int8, uint8, int16, uint16, int32, uint32, float16, bfloat16                                  |\n| Quant Mode             | eager mode, FX graph mode                                                                                                           | ONNX graph mode                                                                               |\n| Quant Strategy         | static quant, dynamic quant, weight-only                                                                                            | static quant, dynamic quant, weight-only                                                      |\n| Quant Scheme           | per-tensor, per-channel, per-group                                                                                                  | per-tensor, per-channel                                                                       |\n| Symmetric              | symmetric, asymmetric                                                                                                               | symmetric, asymmetric                                                                         |\n| Calibration Method     | MinMax, Percentile, MSE                                                                                                             | MinMax, Percentile, MinMSE, Entropy, NonOverflow                                              |\n| Scale Type             | float16, float32                                                                                                                    | float16, float32                                                                              |\n| KV-Cache Quant         | FP8 KV-Cache Quant                                                                                                                  | N/A                                                                                           |\n| Supported Ops.         | `nn.Linear`, `nn.Conv2d`, `nn.ConvTranspose2d`, `nn.Embedding`, `nn.EmbeddingBag`,                                                  | Most ONNX ops.                                                                                |\n|                        | `nn.BatchNorm2d`, `nn.BatchNorm3d`, `nn.LeakyReLU`, `nn.AvgPool2d`, `nn.AdaptiveAvgPool2d`                                          | [Full List](https://quark.docs.amd.com/latest/onnx/user_guide_supported_optype_datatype.html) |\n| Pre-Quant Optimization | SmoothQuant                                                                                                                         | QuaRot, SmoothQuant (Single\\_GPU/CPU), CLE, Bias Correction                                   |\n| Quantization Algorithm | AWQ, GPTQ                                                                                                                           | AdaQuant, AdaRound, GPTQ                                                                      |\n| Export Format          | ONNX, JSON-Safetensors, GGUF(Q4\\_1)                                                                                                 | N/A                                                                                           |\n| Operating  Systems     | Linux {ROCm, CUDA, CPU}, Windows {CPU}                                                                                              | Linux {ROCm, CUDA, CPU}, Windows {CPU}                                                        |\n\n## Model Support Table\n\n| Quantization Technique                | Supported Models                                                                                  |\n| ------------------------------------- | ------------------------------------------------------------------------------------------------- |\n| LLM Pruning                           | [Model Support](examples/torch/language_modeling/llm_pruning/example_quark_torch_llm_pruning.rst) |\n| LLM Post Training Quantization (PTQ)  | [Model Support](examples/torch/language_modeling/llm_ptq/example_quark_torch_llm_ptq.rst)         |\n| LLM Quantization Aware Training (QAT) | [Model Support](examples/torch/language_modeling/llm_qat/example_quark_torch_llm_qat.rst)         |\n| Vision Model Quantization             | [Model Support](examples/torch/vision/model_support.md)                                           |\n| Quark for ONNX                        | [Model Support](examples/onnx/model_support.md)\n\n## Installation\n\nOfficial releases of AMD Quark are available on PyPI https://pypi.org/project/amd-quark/, and can be installed with pip:\n\n```shell\npip install amd-quark\n```\n\nFor full instructions to install AMD Quark from Python wheels or ZIP files, refer to our [🛠️Installation Guide](https://quark.docs.amd.com/latest/install.html). The Installation Guide also contains verification steps that apply to building from source.\n\n### Installing from Source\n\n1. Clone or download this repository.\n2. Follow the steps from the [PyTorch](https://pytorch.org/get-started/locally/) website to install the appropriate PyTorch package for your system.\n3. You can then build and install AMD Quark, and its dependencies, which are detailed in [requirements.txt](requirements.txt), by running:\n\n```shell\ngit clone --recursive https://github.com/AMD/Quark\ncd Quark\n\n# [Optional] run git submodule if you are updating an existing Quark repository\ngit submodule sync\ngit submodule update --init --recursive\n\npip install .\n```\n\n## Resources\n\nAMD Quark's documentation site contains [Getting Started](https://quark.docs.amd.com/latest/basic_usage.html), _API documentation_ for both [PyTorch](https://quark.docs.amd.com/latest/autoapi/pytorch_apis.html) and [ONNX](https://quark.docs.amd.com/latest/autoapi/onnx_apis.html) backends, and other detailed information.\nThe Installation Guide includes our [Recommended First Time User Installation](https://quark.docs.amd.com/latest/install.html#recommended-first-time-user-installation) guide, to get set up with Quark quickly.\nCheck out our _Frequently Asked Questions_ for both [PyTorch](https://quark.docs.amd.com/latest/pytorch/pytorch_faq.html) and [ONNX](https://quark.docs.amd.com/latest/onnx/onnx_faq.html) for more details.\n\n* [📖Documentation](https://quark.docs.amd.com/)\n* [📄FAQ (PyTorch)](https://quark.docs.amd.com/latest/pytorch/pytorch_faq.html)\n* [📄FAQ (ONNX)](https://quark.docs.amd.com/latest/onnx/onnx_faq.html)\n\nAMD Quark provides examples of Language Model and Image Classification model quantization, which can be found under [examples/torch/](examples/torch/) and  [examples/onnx/](examples/onnx/).\nThese examples are documented here:\n\n* [💡PyTorch Examples](https://quark.docs.amd.com/latest/pytorch/pytorch_examples.html)\n* [💡ONNX Examples](https://quark.docs.amd.com/latest/onnx/onnx_examples.html)\n\nThe examples folder also contain integrations of other quantizers under [examples/torch/extensions/](examples/torch/extensions/). You can read about those here:\n\n* [Brevitas Integration](examples/torch/extensions/brevitas/example_quark_torch_brevitas.rst)\n* [Integration with AMD Pytorch-light (APL)](examples/torch/extensions/pytorch_light/example_quark_torch_pytorch_light.rst).\n\n## Contributing\n\nAMD Quark is not set up to accept community contributions (bug reports, feature requests, or Pull Requests) just yet.\nPlease watch this space!\n\n## License and Copyright\n\nCopyright (C) 2025, Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: MIT.\nSee [LICENSE](LICENSE) file for detail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famd%2Fquark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famd%2Fquark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famd%2Fquark/lists"}