AIMET Examples
AIMET Examples provide reference code (in the form of Jupyter Notebooks) to learn how to apply AIMET quantization and compression features. It is also a quick way to become familiar with AIMET usage and APIs.
For more details on each of the features and APIs please refer: Links to User Guide and API Documentation
Browse the notebooks
The following table has links to browsable versions of the notebooks for different features.
Model Quantization Examples
Features |
PyTorch |
TensorFlow |
ONNX |
---|---|---|---|
Quantsim / Quantization-Aware Training (QAT) |
Link (no training) |
||
QAT with Range Learning |
|||
Cross-Layer Equalization (CLE) |
|||
Adaptive Rounding (AdaRound) |
|||
AutoQuant |
Model Compression Examples
Running the notebooks
Install Jupyter
Install the Jupyter metapackage as follows (pre-pend with “sudo -H” if appropriate):
python3 -m pip install jupyter
Start the notebook server as follows (please customize the command line options if appropriate):
jupyter notebook --ip=* --no-browser &
The above command will generate and display a URL in the terminal. Copy and paste it into your browser.
Run the notebooks
Navigate to one of the following paths under the Examples directory and launch your chosen Jupyter Notebook (.ipynb extension):
Examples/torch/quantization/
Examples/torch/compression/
Examples/tensorflow/quantization/keras/
Follow the instructions therein to execute the code.