mirror of
https://github.com/NVIDIA/Model-Optimizer.git
synced 2026-11-09 09:14:17 +08:00
## What does this PR do? **Type of change:** New Feature **Overview:** - Created an abstract parent class for ONNXQuantExporter - Created child classes for individual precisions - Implemented the INT4QuantExporter - Removed quantize_weights_to_int4 - Added a method to quantize weights of the ONNX model to low precision ## Testing ``` python torch_quant_to_onnx.py --quantize_mode=int4_awq \ --onnx_save_path=<onnx_path> \ ``` ## Before your PR is "*Ready for review*" <!-- If you haven't finished some of the above items you can still open `Draft` PR. --> - **Make sure you read and follow [Contributor guidelines](https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/main/CONTRIBUTING.md)** and your commits are signed. - **Is this change backward compatible?**: Yes - **Did you write any new necessary tests?**: No - **Did you add or update any necessary documentation?**: Yes - **Did you update [Changelog](https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/main/CHANGELOG.rst)?**: No <!--- Only for new features, API changes, critical bug fixes or bw breaking changes. --> --------- Signed-off-by: ajrasane <131806219+ajrasane@users.noreply.github.com>