def quantize_awq(self, model: Union[ModelProto, str], quant_config: dict[str, Any]) -> ModelProto:
        """Perform nvidia_awq quantization using ModelOpt's int4 quantize function.

        Args:
            model (ModelProto | str): The ONNX model or path to the model to quantize.
            quant_config (Dict[str, Any]): Configuration dictionary for quantization.

        Returns:
            ModelProto: The quantized ONNX model.

        """
        try:
            from modelopt.onnx.quantization.int4 import quantize as quantize_int4
        except ImportError:
            logger.exception(
                "Please ensure that 'modelopt' package is installed. Install it with 'pip install nvidia_modelopt'."
            )
            raise ImportError(
                "modelopt is not installed. Please install it using 'pip install nvidia_modelopt'. Exiting."
            ) from None

        logger.debug("Starting nvidia_awq quantization...")

        # Prepare calibration inputs
        calib_inputs = quant_config["calibration_data_reader"]

        # Perform quantization using ModelOpt's int4 quantize function
        quantized_model = quantize_int4(
            model,
            calibration_method=quant_config["calibration_method"],
            calibration_data_reader=calib_inputs,
        )

        logger.debug("Completed nvidia_awq quantization.")
        return quantized_model
Perform nvidia_awq quantization using ModelOpt's int4 quantize function.

        Args:
            model (ModelProto | str): The ONNX model or path to the model to quantize.
            quant_config (Dict[str, Any]): Configuration dictionary for quantization.

        Returns:
            ModelProto: The quantized ONNX model.

        
olive/passes/onnx/nvmo_quantization.py