model_calib — Model Optimizer 0.31.0 (original) (raw)

TensorRT Model Optimizer

Calibration utilities.

Functions

awq Apply AWQ to the model.
max_calibrate Calibrate the model using max.
smoothquant Smooth-Quant variant with per-channel weight scaling.
svdquant Lite version of SVDQuant.

awq(model, forward_loop=None, algorithm='awq_lite', **kwargs)

Apply AWQ to the model.

Parameters:

See AWQFullCalibConfig for details on the remaining arguments.

max_calibrate(model, forward_loop=None, distributed_sync=True)

Calibrate the model using max.

Parameters:

See MaxCalibConfig for details on the remaining arguments.

smoothquant(model, forward_loop=None, alpha=1.0)

Smooth-Quant variant with per-channel weight scaling.

Parameters:

See SmoothQuantCalibConfig for details on the remaining arguments.

svdquant(model, forward_loop=None, lowrank=32, **kwargs)

Lite version of SVDQuant.

Parameters:

See SVDQuantConfig for details on the remaining arguments.