model_calib
Calibration utilities.
Functions
Calibrate the model using max. |
|
Calibrate the model if given additonal_algorithm and then apply real quantization. |
|
Apply AWQ to the model. |
|
Smooth-Quant variant with per-channel weight scaling. |
- awq(model, algorithm='awq_lite', forward_loop=None, **kwargs)
Apply AWQ to the model.
- Parameters:
model (Module) –
algorithm (str) –
forward_loop (Callable[[Module], None] | None) –
- max_calibrate(model, forward_loop=None)
Calibrate the model using max.
- Parameters:
model (Module) –
forward_loop (Callable[[Module], None] | None) –
- real_quantize(model, forward_loop=None, **kwargs)
Calibrate the model if given additonal_algorithm and then apply real quantization.
- Parameters:
model (Module) –
forward_loop (Callable[[Module], None] | None) –
- smoothquant(model, forward_loop=None, alpha=1.0)
Smooth-Quant variant with per-channel weight scaling.
The parameters are as described in
SmoothQuantCalibConfig
.- Parameters:
model (Module) –
forward_loop (Callable[[Module], None] | None) –