yamle.quantization.static package#

class yamle.quantization.static.StaticQuantizer(activation_bits, weight_bits)[source]#

Bases: BaseQuantizer

This is the static quantizer class.

It performs static post-training quantization on the model. It does it with respect to a specific number of bits for the activation and weight. The quantization is simulated and the model is not actually quantized.

prepare(trainer, method)[source]#

This method is used to prepare the model for quantization.

Return type:

None

get_qconfig()[source]#

This method is used to get the quantization configuration.

We use the number of activation and weight bits to create the quantization configuration.

Return type:

Any