-
|
I am trying to do int8 quantization on a pytorch model and am confused as to how to select the accuracy aware method and provide the max accuracy drop. Any help with this would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @camhpj,
OpenVINO example: https://github.com/openvinotoolkit/nncf/tree/develop/examples/post_training_quantization/openvino/yolov8_quantize_with_accuracy_control
|
Beta Was this translation helpful? Give feedback.
Hi @camhpj,
nncf.quantize_with_accuracy_controldoes not yet support the PyTorch model directly, instead you can export a PyTorch model to OpenVINO or ONNX and runnncf.quantize_with_accuracy_controlon the exported model.OpenVINO example: https://github.com/openvinotoolkit/nncf/tree/develop/examples/post_training_quantization/openvino/yolov8_quantize_with_accuracy_control
ONNX example: https://github.com/openvinotoolkit/nncf/tree/develop/examples/post_training_quantization/onnx/yolov8_quantize_with_accuracy_control
nncf.quantize_with_accuracy_controlcontrols of accuracy metric by keeping the most impactful operations within the model in the original precision (OpenVINO documentation). …