Model Zoo for AI Model Efficiency Toolkit
We provide a collection of popular neural network models and compare their floating point and quantized performance. Results demonstrate that quantized models can provide good accuracy, comparable to floating point models. Together with results, we also provide scripts and artifacts for users to quantize floating-point models using the AI Model Efficiency ToolKit (AIMET).
Table of Contents
Introduction
Quantized inference is significantly faster than floating-point inference, and enables models to run in a power-efficient manner on mobile and edge devices. We use AIMET, a library that includes state-of-the-art techniques for quantization, to quantize various models available in PyTorch and TensorFlow frameworks.
An original FP32 source model is quantized either using post-training quantization (PTQ) or Quantization-Aware-Training (QAT) technique available in AIMET. Example scripts for evaluation are provided for each model. When PTQ is needed, the evaluation script performs PTQ before evaluation. Wherever QAT is used, the fine-tuned model checkpoint is also provided.
PyTorch Models
[1] Model usage documentation
[2] Original FP32 model source
[3] FP32 model checkpoint
[4] Quantized Model: For models quantized with post-training technique, refers to FP32 model which can then be quantized using AIMET. For models optimized with QAT, refers to model checkpoint with fine-tuned weights. 8-bit weights and activations are typically used. For some models, 8-bit weights and 16-bit weights are used to further improve performance of post-training quantization.
[5] Results comparing float and quantized performance
[6] W8A8 indicates 8-bit weights, 8-bit activations
[7] W4A8 indicates 4-bit weights, 8-bit activations (Some models include a mix of W4A8 and W8A8 layers).
TBD indicates that support is NOT yet available
Tensorflow Models
Task | Network [1] | Model Source [2] | Floating Pt (FP32) Model [3] | Quantized Model [4] | TensorFlow Version | Results [5] | |||
---|---|---|---|---|---|---|---|---|---|
Metric | FP32 | W8A8[6] | W4A8[7] | ||||||
Image Classification | ResNet-50 (v1) | GitHub Repo | Pretrained Model | See Documentation | 1.15 | (ImageNet) Top-1 Accuracy | 75.21% | 74.96% | TBD |
ResNet-50-tf2 | GitHub Repo | Pretrained Model | Quantized Model | 2.4 | (ImageNet) Top-1 Accuracy | 74.9% | 74.8% | TBD | |
MobileNet-v2-1.4 | GitHub Repo | Pretrained Model | Quantized Model | 1.15 | (ImageNet) Top-1 Accuracy | 75% | 74.21% | TBD | |
MobileNet-v2-tf2 | GitHub Repo | Pretrained Model | See Example | 2.4 | (ImageNet) Top-1 Accuracy | 71.6% | 71.0% | TBD | |
EfficientNet Lite | GitHub Repo | Pretrained Model | Quantized Model | 2.4 | (ImageNet) Top-1 Accuracy | 74.93% | 74.99% | TBD | |
Object Detection | SSD MobileNet-v2 | GitHub Repo | Pretrained Model | See Example | 1.15 | (COCO) Mean Avg. Precision (mAP) | 0.2469 | 0.2456 | TBD |
RetinaNet | GitHub Repo | Pretrained Model | See Example | 1.15 | (COCO) mAP Detailed Results | 0.35 | 0.349 | TBD | |
MobileDet-EdgeTPU | GitHub Repo | Pretrained Model | See Example | 2.4 | (COCO) Mean Avg. Precision (mAP) | 0.281 | 0.279 | TBD | |
Pose Estimation | Pose Estimation | Based on Ref. | Based on Ref. | Quantized Model | 2.4 | (COCO) mAP | 0.383 | 0.379 | TBD |
(COCO) (mAR) | 0.452 | 0.446 | TBD | ||||||
Super Resolution | SRGAN | GitHub Repo | Pretrained Model | See Example | 2.4 | (BSD100) PSNR / SSIM Detailed Results | 25.45 / 0.668 | 24.78 / 0.628 | 25.41 / 0.666 (INT8W / INT16Act.) |
Semantic Segmentation | DeeplabV3plus_mbnv2 | GitHub Repo | Pretrained Model | See Example | 2.4 | (PascalVOC) mIOU | 72.28 | 71.71 | TBD |
DeeplabV3plus_xception | GitHub Repo | Pretrained Model | See Example | 2.4 | (PascalVOC) mIOU | 87.71 | 87.21 | TBD |
[1] Model usage documentation
[2] Original FP32 model source
[3] FP32 model checkpoint
[4] Quantized Model: For models quantized with post-training technique, refers to FP32 model which can then be quantized using AIMET. For models optimized with QAT, refers to model checkpoint with fine-tuned weights. 8-bit weights and activations are typically used. For some models, 8-bit weights and 16-bit activations (INT8W/INT16Act.) are used to further improve performance of post-training quantization.
[5] Results comparing float and quantized performance
[6] W8A8 indicates 8-bit weights, 8-bit activations
[7] W4A8 indicates 4-bit weights, 8-bit activations (Some models include a mix of W4A8 and W8A8 layers).
TBD indicates that support is NOT yet available
Installation and Usage
Install AIMET
Before you can run the evaluation script for a specific model, you need to install the AI Model Efficiency ToolKit (AIMET) software. Please see this Getting Started page for an overview. Then install AIMET and its dependencies using these Installation instructions.
Install AIMET model zoo
Follow the instructions on this page to install the AIMET model zoo python package(s).
Run model evaluation
The evaluation scripts run floating-point and quantized evaluations that demonstrate improved quantized model performance through the use of AIMET techniques. They generate and display the final accuracy results (as documented in the table above). To access the documentation and procedures for a specific model, refer to the relevant .md within the subfolder in TensorFlow or PyTorch folders.
Team
AIMET Model Zoo is a project maintained by Qualcomm Innovation Center, Inc.
License
Please see the LICENSE file for details.