Deci-AI / super-gradients

Easily train or fine-tune SOTA computer vision models with one open source training library. The home of Yolo-NAS.
https://www.supergradients.com
Apache License 2.0
4.5k stars 489 forks source link

QAT. How to check that the model is successfully quantized? #1784

Open Bananaspirit opened 7 months ago

Bananaspirit commented 7 months ago

💡 Your Question

I tuned the quantization weights during training and got an onnx model with Q/DQ layers as output. However, when I use TensorRt to convert a file to an engine with int8 precision, I get the following message: Calibrator won't be used in explicit precision mode. Use quantization aware training to generate network with Quantize/Dequantize nodes

The command with which I started quantization:

trtexec --onnx=./yolox_s_tree_pole_16x3x640x640_qat.onnx --int8 --saveEngine=./yolox_s_tree_pole_16x3x640x640_qat.engine

Questions:

  1. Is this message objective?
  2. Is there anything you can recommend to ensure that the model is quantized to int8 precision?

Versions

No response

ranjitkathiriya544 commented 1 month ago

1244 , Any update on this issue, it's still the same.

[W] [TRT] Calibrator won't be used in explicit precision mode. Use quantization aware training to generate network with Quantize/Dequantize nodes.

I have used this command

trtexec --onnx=./yolo_pt_model.onnx --int8 --saveEngine=./res.trt