Files
Model-Optimizer/tests/unit
Ajinkya Rasane 0a4f0a8b93 [OMNIML-2244] Implement the ONNX quantization exporter for INT4 (#575)
## 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>
2025-11-26 20:50:45 +00:00
..
2025-04-03 10:31:41 +05:30