The Ryzen AI software provides support for these additional quantizers:
Vitis AI Quantizer for PyTorch/TensorFlow/TensorFlow 2: If you require Quantization Aware Training using the original model training framework, you can use Vitis AI PyTorch/Tensorflow 2/Tensorflow quantizer.
Olive Quantizer: If you are already familiar with the Olive framework and using it for other model transformations, quantization through Olive is also an option.
Vitis AI Quantizer for PyTorch/TensorFlow/TensorFlow 2#
The Vitis AI Quantizer, integrated as a component of either PyTorch, TensorFlow, or TensorFlow 2, is distributed through framework-specific Docker containers.
The Vitis AI Docker containers can be installed on Ubuntu 20.04, CentOS 7.8, 7.9, 8.1, and RHEL 8.3, 8.4. For developers working on Windows 11, WSL can be used to install the Vitis AI Docker containers.
Multiple versions of the Docker container are available, each tailored to specific frameworks. Follow the Docker download and running instructions as per the following links:
GPU-Accelerated Quantization Containers#
The standard Vitis AI Docker containers do not support GPU-accelerated quantization. To create a container with GPU-accelerated quantization enabled, download the following archive and follow the instructions in the README file.
In this documentation, “NPU” is used in descriptions, while “IPU” is retained in the tool’s language, code, screenshots, and commands. This intentional distinction aligns with existing tool references and does not affect functionality. Avoid making replacements in the code.
Microsoft Olive framework supports quantization with Vitis AI ONNX Quantization. The Olive Quantizer can be installed by following these steps:
Install the Olive Quantizer as follows:
pip install olive-ai[cpu]
The current version of the Olive Quantizer is not compatible with the latest version of the pydantic library. To make it compatible, downgrade the pydantic version using the following command:
pip install pydantic==1.10.9
For additional information regarding the installation of Olive, refer to the Microsoft Olive Documentation