Quantization Analysis Tool

The quant_analysis.py provided in the algorithm package is an analysis tool for model deployment scenarios. It is used to verify the quantization sensitivity before deploying the model from floating-point (FP32) to quantization (such as INT8). The execution tool supports single-machine multi-card and multi-machine distributed operation.

Usage

Run the tools/quant_analysis.py script to load the specified configuration file, perform model quantization analysis, and output the analysis results to the designated directory.

Parameters Introduction

ParameterDescription
--config, -cPath to the config file.
--device-ids, -idsList of GPUs to use.
--dist-urlServer address for multi-machine training, default is auto.
--backendBackend used for multi-machine or multi-GPU communication.
--launcherLaunch method for distributed training. Please select "torch".

Usgae Example

python3 tools/quant_analysis.py \
        -c ./configs/bev/bevformer_tiny_resnet50_detection_nuscenes.py \
        -ids 0,1

For a detailed introduction to the configuration file, please refer to the [Configuration] section [config configuration] (../config/keywords).