qat_config Module¶
TrainingMethod¶
Select a QAT training method:
- class model_compression_toolkit.qat.TrainingMethod(value)¶
An enum for selecting a QAT training method
STE - Standard straight-through estimator. Includes PowerOfTwo, symmetric & uniform quantizers
DQA - DNN Quantization with Attention. Includes a smooth quantization introduces by DQA method
LSQ - Learned Step size Quantization. Includes PowerOfTwo, symmetric & uniform quantizers: https://arxiv.org/pdf/1902.08153.pdf
QATConfig¶
Class to configure the quantization process of the model when quantizing using Quantization-aware Training (QAT):
- class model_compression_toolkit.qat.QATConfig(weight_training_method=TrainingMethod.STE, activation_training_method=TrainingMethod.STE, weight_quantizer_params_override=None, activation_quantizer_params_override=None)¶
QAT configuration class.
- Parameters:
weight_training_method (TrainingMethod) – Training method for weight quantizers
activation_training_method (TrainingMethod) – Training method for activation quantizers:
weight_quantizer_params_override – A dictionary of parameters to override in weight quantization quantizer instantiation. Defaults to None (no parameters)
activation_quantizer_params_override – A dictionary of parameters to override in activation quantization quantizer instantiation. Defaults to None (no parameters)