The NVIDIA TensorRT Model Optimizer (ModelOpt) provides a unified toolkit for model optimization and deployment across NVIDIA GPUs, supporting quantization (PTQ, QAT), pruning, distillation, and TensorRT export. As of v0.33.1, the library is actively maintained and targets Python 3.10–3.12. Release cadence is approximately monthly.
pip install nvidia-modelopt-coreNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic scaffold to apply INT8 quantization to a PyTorch model. Replace with actual calibration data.
Uninstall `nvidia-modelopt` and install `nvidia-modelopt-core`. Update imports to use `modelopt.*` instead of `nvidia_modelopt.*`.
Assign the return value: `quantized_model = quantize(model, ...)`.
Use `modelopt.torch.sparsity` instead of `modelopt.torch.pruning`.
When exporting to ONNX, set `opset_version=17` in `torch.onnx.export`.